Migrate omsorgapp to browser SPA, add Docker/CI build setup
Docker-Images bauen und veröffentlichen / build (, omsorgCore/Dockerfile, omsorgcore) (push) Successful in 3s
Docker-Images bauen und veröffentlichen / build (, omsorgWeb/Dockerfile, omsorgweb) (push) Failing after 4s
Docker-Images bauen und veröffentlichen / build (VITE_OMSORG_CORE_URL=${{ vars.OMSORG_CORE_PUBLIC_URL }}, omsorgapp/Dockerfile, omsorgapp) (push) Successful in 3s

- omsorgapp: drop Electron, run as a plain Vite/React browser app; refresh
  token moves to an HttpOnly cookie (omsorgCore), CORS added for the new
  browser origin, document download/preview switched to Blob-based browser
  APIs.
- Add Dockerfiles for omsorgCore, omsorgapp, and omsorgWeb, a docker-compose.yml
  wiring Postgres/MySQL/all three apps together, and a Gitea Actions workflow
  that builds and pushes images to the repo's container registry on push to
  main and on version tags.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Felix Kemmler
2026-08-10 17:42:45 +02:00
co-authored by Claude Sonnet 5
parent e9e96a57dc
commit 598dfcd38a
461 changed files with 59753 additions and 2859 deletions
File diff suppressed because it is too large Load Diff
@@ -131,6 +131,7 @@ class AuditLogApi
* @param string|null $entity_type entity_type (optional)
* @param string|null $entity_id entity_id (optional)
* @param string|null $actor_user_id actor_user_id (optional)
* @param \OmsorgCoreClient\Model\AuditEventCategory|null $category category (optional)
* @param \DateTime|null $from_utc from_utc (optional)
* @param \DateTime|null $to_utc to_utc (optional)
* @param int|null $page page (optional, default to 1)
@@ -141,9 +142,9 @@ class AuditLogApi
* @throws \InvalidArgumentException
* @return \OmsorgCoreClient\Model\AuditLogEntryResponsePagedResponse
*/
public function apiAuditLogGet($entity_type = null, $entity_id = null, $actor_user_id = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
public function apiAuditLogGet($entity_type = null, $entity_id = null, $actor_user_id = null, $category = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
{
list($response) = $this->apiAuditLogGetWithHttpInfo($entity_type, $entity_id, $actor_user_id, $from_utc, $to_utc, $page, $page_size, $contentType);
list($response) = $this->apiAuditLogGetWithHttpInfo($entity_type, $entity_id, $actor_user_id, $category, $from_utc, $to_utc, $page, $page_size, $contentType);
return $response;
}
@@ -153,6 +154,7 @@ class AuditLogApi
* @param string|null $entity_type (optional)
* @param string|null $entity_id (optional)
* @param string|null $actor_user_id (optional)
* @param \OmsorgCoreClient\Model\AuditEventCategory|null $category (optional)
* @param \DateTime|null $from_utc (optional)
* @param \DateTime|null $to_utc (optional)
* @param int|null $page (optional, default to 1)
@@ -163,9 +165,9 @@ class AuditLogApi
* @throws \InvalidArgumentException
* @return array of \OmsorgCoreClient\Model\AuditLogEntryResponsePagedResponse, HTTP status code, HTTP response headers (array of strings)
*/
public function apiAuditLogGetWithHttpInfo($entity_type = null, $entity_id = null, $actor_user_id = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
public function apiAuditLogGetWithHttpInfo($entity_type = null, $entity_id = null, $actor_user_id = null, $category = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
{
$request = $this->apiAuditLogGetRequest($entity_type, $entity_id, $actor_user_id, $from_utc, $to_utc, $page, $page_size, $contentType);
$request = $this->apiAuditLogGetRequest($entity_type, $entity_id, $actor_user_id, $category, $from_utc, $to_utc, $page, $page_size, $contentType);
try {
$options = $this->createHttpClientOption();
@@ -242,6 +244,7 @@ class AuditLogApi
* @param string|null $entity_type (optional)
* @param string|null $entity_id (optional)
* @param string|null $actor_user_id (optional)
* @param \OmsorgCoreClient\Model\AuditEventCategory|null $category (optional)
* @param \DateTime|null $from_utc (optional)
* @param \DateTime|null $to_utc (optional)
* @param int|null $page (optional, default to 1)
@@ -251,9 +254,9 @@ class AuditLogApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiAuditLogGetAsync($entity_type = null, $entity_id = null, $actor_user_id = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
public function apiAuditLogGetAsync($entity_type = null, $entity_id = null, $actor_user_id = null, $category = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
{
return $this->apiAuditLogGetAsyncWithHttpInfo($entity_type, $entity_id, $actor_user_id, $from_utc, $to_utc, $page, $page_size, $contentType)
return $this->apiAuditLogGetAsyncWithHttpInfo($entity_type, $entity_id, $actor_user_id, $category, $from_utc, $to_utc, $page, $page_size, $contentType)
->then(
function ($response) {
return $response[0];
@@ -267,6 +270,7 @@ class AuditLogApi
* @param string|null $entity_type (optional)
* @param string|null $entity_id (optional)
* @param string|null $actor_user_id (optional)
* @param \OmsorgCoreClient\Model\AuditEventCategory|null $category (optional)
* @param \DateTime|null $from_utc (optional)
* @param \DateTime|null $to_utc (optional)
* @param int|null $page (optional, default to 1)
@@ -276,10 +280,10 @@ class AuditLogApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiAuditLogGetAsyncWithHttpInfo($entity_type = null, $entity_id = null, $actor_user_id = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
public function apiAuditLogGetAsyncWithHttpInfo($entity_type = null, $entity_id = null, $actor_user_id = null, $category = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
{
$returnType = '\OmsorgCoreClient\Model\AuditLogEntryResponsePagedResponse';
$request = $this->apiAuditLogGetRequest($entity_type, $entity_id, $actor_user_id, $from_utc, $to_utc, $page, $page_size, $contentType);
$request = $this->apiAuditLogGetRequest($entity_type, $entity_id, $actor_user_id, $category, $from_utc, $to_utc, $page, $page_size, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -323,6 +327,7 @@ class AuditLogApi
* @param string|null $entity_type (optional)
* @param string|null $entity_id (optional)
* @param string|null $actor_user_id (optional)
* @param \OmsorgCoreClient\Model\AuditEventCategory|null $category (optional)
* @param \DateTime|null $from_utc (optional)
* @param \DateTime|null $to_utc (optional)
* @param int|null $page (optional, default to 1)
@@ -332,7 +337,7 @@ class AuditLogApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiAuditLogGetRequest($entity_type = null, $entity_id = null, $actor_user_id = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
public function apiAuditLogGetRequest($entity_type = null, $entity_id = null, $actor_user_id = null, $category = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
{
@@ -343,6 +348,7 @@ class AuditLogApi
$resourcePath = '/api/audit-log';
$formParams = [];
$queryParams = [];
@@ -378,6 +384,15 @@ class AuditLogApi
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$category,
'category', // param base name
'AuditEventCategory', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$from_utc,
'fromUtc', // param base name
@@ -77,6 +77,9 @@ class ContractsApi
'apiContractsGet' => [
'application/json',
],
'apiContractsIdDelete' => [
'application/json',
],
'apiContractsIdGet' => [
'application/json',
],
@@ -472,6 +475,220 @@ class ContractsApi
);
}
/**
* Operation apiContractsIdDelete
*
* @param string $id id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiContractsIdDelete'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return void
*/
public function apiContractsIdDelete($id, string $contentType = self::contentTypes['apiContractsIdDelete'][0])
{
$this->apiContractsIdDeleteWithHttpInfo($id, $contentType);
}
/**
* Operation apiContractsIdDeleteWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiContractsIdDelete'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function apiContractsIdDeleteWithHttpInfo($id, string $contentType = self::contentTypes['apiContractsIdDelete'][0])
{
$request = $this->apiContractsIdDeleteRequest($id, $contentType);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
);
} catch (ConnectException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
null,
null
);
}
$statusCode = $response->getStatusCode();
return [null, $statusCode, $response->getHeaders()];
} catch (ApiException $e) {
switch ($e->getCode()) {
}
throw $e;
}
}
/**
* Operation apiContractsIdDeleteAsync
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiContractsIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiContractsIdDeleteAsync($id, string $contentType = self::contentTypes['apiContractsIdDelete'][0])
{
return $this->apiContractsIdDeleteAsyncWithHttpInfo($id, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiContractsIdDeleteAsyncWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiContractsIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiContractsIdDeleteAsyncWithHttpInfo($id, string $contentType = self::contentTypes['apiContractsIdDelete'][0])
{
$returnType = '';
$request = $this->apiContractsIdDeleteRequest($id, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
return [null, $response->getStatusCode(), $response->getHeaders()];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}
);
}
/**
* Create request for operation 'apiContractsIdDelete'
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiContractsIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiContractsIdDeleteRequest($id, string $contentType = self::contentTypes['apiContractsIdDelete'][0])
{
// verify the required parameter 'id' is set
if ($id === null || (is_array($id) && count($id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $id when calling apiContractsIdDelete'
);
}
$resourcePath = '/api/contracts/{id}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if ($id !== null) {
$resourcePath = str_replace(
'{' . 'id' . '}',
ObjectSerializer::toPathValue($id),
$resourcePath
);
}
$headers = $this->headerSelector->selectHeaders(
[],
$contentType,
$multipart
);
// for model (json/xml)
if (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
foreach ($formParamValueItems as $formParamValueItem) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValueItem
];
}
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the form parameters
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
} else {
// for HTTP post (form)
$httpBody = ObjectSerializer::buildQuery($formParams);
}
}
// this endpoint requires Bearer (JWT) authentication (access token)
if (!empty($this->config->getAccessToken())) {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'DELETE',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Operation apiContractsIdGet
*
File diff suppressed because it is too large Load Diff
@@ -77,6 +77,9 @@ class EmployeesApi
'apiEmployeesGet' => [
'application/json',
],
'apiEmployeesIdDelete' => [
'application/json',
],
'apiEmployeesIdGet' => [
'application/json',
],
@@ -457,6 +460,220 @@ class EmployeesApi
);
}
/**
* Operation apiEmployeesIdDelete
*
* @param string $id id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return void
*/
public function apiEmployeesIdDelete($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][0])
{
$this->apiEmployeesIdDeleteWithHttpInfo($id, $contentType);
}
/**
* Operation apiEmployeesIdDeleteWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function apiEmployeesIdDeleteWithHttpInfo($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][0])
{
$request = $this->apiEmployeesIdDeleteRequest($id, $contentType);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
);
} catch (ConnectException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
null,
null
);
}
$statusCode = $response->getStatusCode();
return [null, $statusCode, $response->getHeaders()];
} catch (ApiException $e) {
switch ($e->getCode()) {
}
throw $e;
}
}
/**
* Operation apiEmployeesIdDeleteAsync
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiEmployeesIdDeleteAsync($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][0])
{
return $this->apiEmployeesIdDeleteAsyncWithHttpInfo($id, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiEmployeesIdDeleteAsyncWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiEmployeesIdDeleteAsyncWithHttpInfo($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][0])
{
$returnType = '';
$request = $this->apiEmployeesIdDeleteRequest($id, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
return [null, $response->getStatusCode(), $response->getHeaders()];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}
);
}
/**
* Create request for operation 'apiEmployeesIdDelete'
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiEmployeesIdDeleteRequest($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][0])
{
// verify the required parameter 'id' is set
if ($id === null || (is_array($id) && count($id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $id when calling apiEmployeesIdDelete'
);
}
$resourcePath = '/api/employees/{id}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if ($id !== null) {
$resourcePath = str_replace(
'{' . 'id' . '}',
ObjectSerializer::toPathValue($id),
$resourcePath
);
}
$headers = $this->headerSelector->selectHeaders(
[],
$contentType,
$multipart
);
// for model (json/xml)
if (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
foreach ($formParamValueItems as $formParamValueItem) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValueItem
];
}
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the form parameters
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
} else {
// for HTTP post (form)
$httpBody = ObjectSerializer::buildQuery($formParams);
}
}
// this endpoint requires Bearer (JWT) authentication (access token)
if (!empty($this->config->getAccessToken())) {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'DELETE',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Operation apiEmployeesIdGet
*
@@ -77,6 +77,9 @@ class FacilitiesApi
'apiFacilitiesGet' => [
'application/json',
],
'apiFacilitiesIdDelete' => [
'application/json',
],
'apiFacilitiesIdGet' => [
'application/json',
],
@@ -143,6 +146,7 @@ class FacilitiesApi
*
* @param string|null $search search (optional)
* @param string|null $crm_status crm_status (optional)
* @param bool|null $follow_up_due_only follow_up_due_only (optional, default to false)
* @param int|null $page page (optional, default to 1)
* @param int|null $page_size page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesGet'] to see the possible values for this operation
@@ -151,9 +155,9 @@ class FacilitiesApi
* @throws \InvalidArgumentException
* @return \OmsorgCoreClient\Model\FacilityResponsePagedResponse
*/
public function apiFacilitiesGet($search = null, $crm_status = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
public function apiFacilitiesGet($search = null, $crm_status = null, $follow_up_due_only = false, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
{
list($response) = $this->apiFacilitiesGetWithHttpInfo($search, $crm_status, $page, $page_size, $contentType);
list($response) = $this->apiFacilitiesGetWithHttpInfo($search, $crm_status, $follow_up_due_only, $page, $page_size, $contentType);
return $response;
}
@@ -162,6 +166,7 @@ class FacilitiesApi
*
* @param string|null $search (optional)
* @param string|null $crm_status (optional)
* @param bool|null $follow_up_due_only (optional, default to false)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesGet'] to see the possible values for this operation
@@ -170,9 +175,9 @@ class FacilitiesApi
* @throws \InvalidArgumentException
* @return array of \OmsorgCoreClient\Model\FacilityResponsePagedResponse, HTTP status code, HTTP response headers (array of strings)
*/
public function apiFacilitiesGetWithHttpInfo($search = null, $crm_status = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
public function apiFacilitiesGetWithHttpInfo($search = null, $crm_status = null, $follow_up_due_only = false, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
{
$request = $this->apiFacilitiesGetRequest($search, $crm_status, $page, $page_size, $contentType);
$request = $this->apiFacilitiesGetRequest($search, $crm_status, $follow_up_due_only, $page, $page_size, $contentType);
try {
$options = $this->createHttpClientOption();
@@ -248,6 +253,7 @@ class FacilitiesApi
*
* @param string|null $search (optional)
* @param string|null $crm_status (optional)
* @param bool|null $follow_up_due_only (optional, default to false)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesGet'] to see the possible values for this operation
@@ -255,9 +261,9 @@ class FacilitiesApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiFacilitiesGetAsync($search = null, $crm_status = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
public function apiFacilitiesGetAsync($search = null, $crm_status = null, $follow_up_due_only = false, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
{
return $this->apiFacilitiesGetAsyncWithHttpInfo($search, $crm_status, $page, $page_size, $contentType)
return $this->apiFacilitiesGetAsyncWithHttpInfo($search, $crm_status, $follow_up_due_only, $page, $page_size, $contentType)
->then(
function ($response) {
return $response[0];
@@ -270,6 +276,7 @@ class FacilitiesApi
*
* @param string|null $search (optional)
* @param string|null $crm_status (optional)
* @param bool|null $follow_up_due_only (optional, default to false)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesGet'] to see the possible values for this operation
@@ -277,10 +284,10 @@ class FacilitiesApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiFacilitiesGetAsyncWithHttpInfo($search = null, $crm_status = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
public function apiFacilitiesGetAsyncWithHttpInfo($search = null, $crm_status = null, $follow_up_due_only = false, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
{
$returnType = '\OmsorgCoreClient\Model\FacilityResponsePagedResponse';
$request = $this->apiFacilitiesGetRequest($search, $crm_status, $page, $page_size, $contentType);
$request = $this->apiFacilitiesGetRequest($search, $crm_status, $follow_up_due_only, $page, $page_size, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -323,6 +330,7 @@ class FacilitiesApi
*
* @param string|null $search (optional)
* @param string|null $crm_status (optional)
* @param bool|null $follow_up_due_only (optional, default to false)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesGet'] to see the possible values for this operation
@@ -330,7 +338,7 @@ class FacilitiesApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiFacilitiesGetRequest($search = null, $crm_status = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
public function apiFacilitiesGetRequest($search = null, $crm_status = null, $follow_up_due_only = false, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
{
@@ -338,6 +346,7 @@ class FacilitiesApi
$resourcePath = '/api/facilities';
$formParams = [];
$queryParams = [];
@@ -364,6 +373,15 @@ class FacilitiesApi
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$follow_up_due_only,
'followUpDueOnly', // param base name
'boolean', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$page,
'page', // param base name
@@ -442,6 +460,220 @@ class FacilitiesApi
);
}
/**
* Operation apiFacilitiesIdDelete
*
* @param string $id id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesIdDelete'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return void
*/
public function apiFacilitiesIdDelete($id, string $contentType = self::contentTypes['apiFacilitiesIdDelete'][0])
{
$this->apiFacilitiesIdDeleteWithHttpInfo($id, $contentType);
}
/**
* Operation apiFacilitiesIdDeleteWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesIdDelete'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function apiFacilitiesIdDeleteWithHttpInfo($id, string $contentType = self::contentTypes['apiFacilitiesIdDelete'][0])
{
$request = $this->apiFacilitiesIdDeleteRequest($id, $contentType);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
);
} catch (ConnectException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
null,
null
);
}
$statusCode = $response->getStatusCode();
return [null, $statusCode, $response->getHeaders()];
} catch (ApiException $e) {
switch ($e->getCode()) {
}
throw $e;
}
}
/**
* Operation apiFacilitiesIdDeleteAsync
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiFacilitiesIdDeleteAsync($id, string $contentType = self::contentTypes['apiFacilitiesIdDelete'][0])
{
return $this->apiFacilitiesIdDeleteAsyncWithHttpInfo($id, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiFacilitiesIdDeleteAsyncWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiFacilitiesIdDeleteAsyncWithHttpInfo($id, string $contentType = self::contentTypes['apiFacilitiesIdDelete'][0])
{
$returnType = '';
$request = $this->apiFacilitiesIdDeleteRequest($id, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
return [null, $response->getStatusCode(), $response->getHeaders()];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}
);
}
/**
* Create request for operation 'apiFacilitiesIdDelete'
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiFacilitiesIdDeleteRequest($id, string $contentType = self::contentTypes['apiFacilitiesIdDelete'][0])
{
// verify the required parameter 'id' is set
if ($id === null || (is_array($id) && count($id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $id when calling apiFacilitiesIdDelete'
);
}
$resourcePath = '/api/facilities/{id}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if ($id !== null) {
$resourcePath = str_replace(
'{' . 'id' . '}',
ObjectSerializer::toPathValue($id),
$resourcePath
);
}
$headers = $this->headerSelector->selectHeaders(
[],
$contentType,
$multipart
);
// for model (json/xml)
if (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
foreach ($formParamValueItems as $formParamValueItem) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValueItem
];
}
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the form parameters
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
} else {
// for HTTP post (form)
$httpBody = ObjectSerializer::buildQuery($formParams);
}
}
// this endpoint requires Bearer (JWT) authentication (access token)
if (!empty($this->config->getAccessToken())) {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'DELETE',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Operation apiFacilitiesIdGet
*
@@ -77,6 +77,9 @@ class FacilityContactsApi
'apiFacilitiesFacilityIdContactsGet' => [
'application/json',
],
'apiFacilitiesFacilityIdContactsIdDelete' => [
'application/json',
],
'apiFacilitiesFacilityIdContactsIdPut' => [
'application/json',
'text/json',
@@ -399,6 +402,240 @@ class FacilityContactsApi
);
}
/**
* Operation apiFacilitiesFacilityIdContactsIdDelete
*
* @param string $facility_id facility_id (required)
* @param string $id id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return void
*/
public function apiFacilitiesFacilityIdContactsIdDelete($facility_id, $id, string $contentType = self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'][0])
{
$this->apiFacilitiesFacilityIdContactsIdDeleteWithHttpInfo($facility_id, $id, $contentType);
}
/**
* Operation apiFacilitiesFacilityIdContactsIdDeleteWithHttpInfo
*
* @param string $facility_id (required)
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function apiFacilitiesFacilityIdContactsIdDeleteWithHttpInfo($facility_id, $id, string $contentType = self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'][0])
{
$request = $this->apiFacilitiesFacilityIdContactsIdDeleteRequest($facility_id, $id, $contentType);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
);
} catch (ConnectException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
null,
null
);
}
$statusCode = $response->getStatusCode();
return [null, $statusCode, $response->getHeaders()];
} catch (ApiException $e) {
switch ($e->getCode()) {
}
throw $e;
}
}
/**
* Operation apiFacilitiesFacilityIdContactsIdDeleteAsync
*
* @param string $facility_id (required)
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiFacilitiesFacilityIdContactsIdDeleteAsync($facility_id, $id, string $contentType = self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'][0])
{
return $this->apiFacilitiesFacilityIdContactsIdDeleteAsyncWithHttpInfo($facility_id, $id, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiFacilitiesFacilityIdContactsIdDeleteAsyncWithHttpInfo
*
* @param string $facility_id (required)
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiFacilitiesFacilityIdContactsIdDeleteAsyncWithHttpInfo($facility_id, $id, string $contentType = self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'][0])
{
$returnType = '';
$request = $this->apiFacilitiesFacilityIdContactsIdDeleteRequest($facility_id, $id, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
return [null, $response->getStatusCode(), $response->getHeaders()];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}
);
}
/**
* Create request for operation 'apiFacilitiesFacilityIdContactsIdDelete'
*
* @param string $facility_id (required)
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiFacilitiesFacilityIdContactsIdDeleteRequest($facility_id, $id, string $contentType = self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'][0])
{
// verify the required parameter 'facility_id' is set
if ($facility_id === null || (is_array($facility_id) && count($facility_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $facility_id when calling apiFacilitiesFacilityIdContactsIdDelete'
);
}
// verify the required parameter 'id' is set
if ($id === null || (is_array($id) && count($id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $id when calling apiFacilitiesFacilityIdContactsIdDelete'
);
}
$resourcePath = '/api/facilities/{facilityId}/contacts/{id}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if ($facility_id !== null) {
$resourcePath = str_replace(
'{' . 'facilityId' . '}',
ObjectSerializer::toPathValue($facility_id),
$resourcePath
);
}
// path params
if ($id !== null) {
$resourcePath = str_replace(
'{' . 'id' . '}',
ObjectSerializer::toPathValue($id),
$resourcePath
);
}
$headers = $this->headerSelector->selectHeaders(
[],
$contentType,
$multipart
);
// for model (json/xml)
if (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
foreach ($formParamValueItems as $formParamValueItem) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValueItem
];
}
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the form parameters
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
} else {
// for HTTP post (form)
$httpBody = ObjectSerializer::buildQuery($formParams);
}
}
// this endpoint requires Bearer (JWT) authentication (access token)
if (!empty($this->config->getAccessToken())) {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'DELETE',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Operation apiFacilitiesFacilityIdContactsIdPut
*
@@ -77,6 +77,9 @@ class OrdersApi
'apiOrdersGet' => [
'application/json',
],
'apiOrdersIdDelete' => [
'application/json',
],
'apiOrdersIdGet' => [
'application/json',
],
@@ -144,6 +147,9 @@ class OrdersApi
* @param string|null $search search (optional)
* @param string|null $status_id status_id (optional)
* @param string|null $facility_id facility_id (optional)
* @param string|null $priority priority (optional)
* @param string|null $required_qualification required_qualification (optional)
* @param string|null $shift_type shift_type (optional)
* @param int|null $page page (optional, default to 1)
* @param int|null $page_size page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersGet'] to see the possible values for this operation
@@ -152,9 +158,9 @@ class OrdersApi
* @throws \InvalidArgumentException
* @return \OmsorgCoreClient\Model\OrderResponsePagedResponse
*/
public function apiOrdersGet($search = null, $status_id = null, $facility_id = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
public function apiOrdersGet($search = null, $status_id = null, $facility_id = null, $priority = null, $required_qualification = null, $shift_type = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
{
list($response) = $this->apiOrdersGetWithHttpInfo($search, $status_id, $facility_id, $page, $page_size, $contentType);
list($response) = $this->apiOrdersGetWithHttpInfo($search, $status_id, $facility_id, $priority, $required_qualification, $shift_type, $page, $page_size, $contentType);
return $response;
}
@@ -164,6 +170,9 @@ class OrdersApi
* @param string|null $search (optional)
* @param string|null $status_id (optional)
* @param string|null $facility_id (optional)
* @param string|null $priority (optional)
* @param string|null $required_qualification (optional)
* @param string|null $shift_type (optional)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersGet'] to see the possible values for this operation
@@ -172,9 +181,9 @@ class OrdersApi
* @throws \InvalidArgumentException
* @return array of \OmsorgCoreClient\Model\OrderResponsePagedResponse, HTTP status code, HTTP response headers (array of strings)
*/
public function apiOrdersGetWithHttpInfo($search = null, $status_id = null, $facility_id = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
public function apiOrdersGetWithHttpInfo($search = null, $status_id = null, $facility_id = null, $priority = null, $required_qualification = null, $shift_type = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
{
$request = $this->apiOrdersGetRequest($search, $status_id, $facility_id, $page, $page_size, $contentType);
$request = $this->apiOrdersGetRequest($search, $status_id, $facility_id, $priority, $required_qualification, $shift_type, $page, $page_size, $contentType);
try {
$options = $this->createHttpClientOption();
@@ -251,6 +260,9 @@ class OrdersApi
* @param string|null $search (optional)
* @param string|null $status_id (optional)
* @param string|null $facility_id (optional)
* @param string|null $priority (optional)
* @param string|null $required_qualification (optional)
* @param string|null $shift_type (optional)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersGet'] to see the possible values for this operation
@@ -258,9 +270,9 @@ class OrdersApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiOrdersGetAsync($search = null, $status_id = null, $facility_id = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
public function apiOrdersGetAsync($search = null, $status_id = null, $facility_id = null, $priority = null, $required_qualification = null, $shift_type = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
{
return $this->apiOrdersGetAsyncWithHttpInfo($search, $status_id, $facility_id, $page, $page_size, $contentType)
return $this->apiOrdersGetAsyncWithHttpInfo($search, $status_id, $facility_id, $priority, $required_qualification, $shift_type, $page, $page_size, $contentType)
->then(
function ($response) {
return $response[0];
@@ -274,6 +286,9 @@ class OrdersApi
* @param string|null $search (optional)
* @param string|null $status_id (optional)
* @param string|null $facility_id (optional)
* @param string|null $priority (optional)
* @param string|null $required_qualification (optional)
* @param string|null $shift_type (optional)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersGet'] to see the possible values for this operation
@@ -281,10 +296,10 @@ class OrdersApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiOrdersGetAsyncWithHttpInfo($search = null, $status_id = null, $facility_id = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
public function apiOrdersGetAsyncWithHttpInfo($search = null, $status_id = null, $facility_id = null, $priority = null, $required_qualification = null, $shift_type = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
{
$returnType = '\OmsorgCoreClient\Model\OrderResponsePagedResponse';
$request = $this->apiOrdersGetRequest($search, $status_id, $facility_id, $page, $page_size, $contentType);
$request = $this->apiOrdersGetRequest($search, $status_id, $facility_id, $priority, $required_qualification, $shift_type, $page, $page_size, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -328,6 +343,9 @@ class OrdersApi
* @param string|null $search (optional)
* @param string|null $status_id (optional)
* @param string|null $facility_id (optional)
* @param string|null $priority (optional)
* @param string|null $required_qualification (optional)
* @param string|null $shift_type (optional)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersGet'] to see the possible values for this operation
@@ -335,7 +353,7 @@ class OrdersApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiOrdersGetRequest($search = null, $status_id = null, $facility_id = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
public function apiOrdersGetRequest($search = null, $status_id = null, $facility_id = null, $priority = null, $required_qualification = null, $shift_type = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
{
@@ -344,6 +362,9 @@ class OrdersApi
$resourcePath = '/api/orders';
$formParams = [];
$queryParams = [];
@@ -379,6 +400,33 @@ class OrdersApi
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$priority,
'priority', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$required_qualification,
'requiredQualification', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$shift_type,
'shiftType', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$page,
'page', // param base name
@@ -457,6 +505,220 @@ class OrdersApi
);
}
/**
* Operation apiOrdersIdDelete
*
* @param string $id id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersIdDelete'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return void
*/
public function apiOrdersIdDelete($id, string $contentType = self::contentTypes['apiOrdersIdDelete'][0])
{
$this->apiOrdersIdDeleteWithHttpInfo($id, $contentType);
}
/**
* Operation apiOrdersIdDeleteWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersIdDelete'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function apiOrdersIdDeleteWithHttpInfo($id, string $contentType = self::contentTypes['apiOrdersIdDelete'][0])
{
$request = $this->apiOrdersIdDeleteRequest($id, $contentType);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
);
} catch (ConnectException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
null,
null
);
}
$statusCode = $response->getStatusCode();
return [null, $statusCode, $response->getHeaders()];
} catch (ApiException $e) {
switch ($e->getCode()) {
}
throw $e;
}
}
/**
* Operation apiOrdersIdDeleteAsync
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiOrdersIdDeleteAsync($id, string $contentType = self::contentTypes['apiOrdersIdDelete'][0])
{
return $this->apiOrdersIdDeleteAsyncWithHttpInfo($id, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiOrdersIdDeleteAsyncWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiOrdersIdDeleteAsyncWithHttpInfo($id, string $contentType = self::contentTypes['apiOrdersIdDelete'][0])
{
$returnType = '';
$request = $this->apiOrdersIdDeleteRequest($id, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
return [null, $response->getStatusCode(), $response->getHeaders()];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}
);
}
/**
* Create request for operation 'apiOrdersIdDelete'
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiOrdersIdDeleteRequest($id, string $contentType = self::contentTypes['apiOrdersIdDelete'][0])
{
// verify the required parameter 'id' is set
if ($id === null || (is_array($id) && count($id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $id when calling apiOrdersIdDelete'
);
}
$resourcePath = '/api/orders/{id}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if ($id !== null) {
$resourcePath = str_replace(
'{' . 'id' . '}',
ObjectSerializer::toPathValue($id),
$resourcePath
);
}
$headers = $this->headerSelector->selectHeaders(
[],
$contentType,
$multipart
);
// for model (json/xml)
if (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
foreach ($formParamValueItems as $formParamValueItem) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValueItem
];
}
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the form parameters
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
} else {
// for HTTP post (form)
$httpBody = ObjectSerializer::buildQuery($formParams);
}
}
// this endpoint requires Bearer (JWT) authentication (access token)
if (!empty($this->config->getAccessToken())) {
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'DELETE',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Operation apiOrdersIdGet
*
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,457 @@
<?php
/**
* AbsenceDecisionRequest
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* AbsenceDecisionRequest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class AbsenceDecisionRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'AbsenceDecisionRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'status' => 'string',
'admin_note' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'status' => null,
'admin_note' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'status' => true,
'admin_note' => true
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'status' => 'status',
'admin_note' => 'adminNote'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'status' => 'setStatus',
'admin_note' => 'setAdminNote'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'status' => 'getStatus',
'admin_note' => 'getAdminNote'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('status', $data ?? [], null);
$this->setIfExists('admin_note', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets status
*
* @return string|null
*/
public function getStatus()
{
return $this->container['status'];
}
/**
* Sets status
*
* @param string|null $status status
*
* @return self
*/
public function setStatus($status)
{
if (is_null($status)) {
array_push($this->openAPINullablesSetToNull, 'status');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('status', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['status'] = $status;
return $this;
}
/**
* Gets admin_note
*
* @return string|null
*/
public function getAdminNote()
{
return $this->container['admin_note'];
}
/**
* Sets admin_note
*
* @param string|null $admin_note admin_note
*
* @return self
*/
public function setAdminNote($admin_note)
{
if (is_null($admin_note)) {
array_push($this->openAPINullablesSetToNull, 'admin_note');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('admin_note', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['admin_note'] = $admin_note;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,832 @@
<?php
/**
* AbsenceResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* AbsenceResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class AbsenceResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'AbsenceResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'employee_id' => 'string',
'employee_name' => 'string',
'type' => 'string',
'start_date' => '\DateTime',
'end_date' => '\DateTime',
'reason' => 'string',
'substitute' => 'string',
'note' => 'string',
'status' => 'string',
'admin_note' => 'string',
'created_at' => '\DateTime'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'id' => 'uuid',
'employee_id' => 'uuid',
'employee_name' => null,
'type' => null,
'start_date' => 'date',
'end_date' => 'date',
'reason' => null,
'substitute' => null,
'note' => null,
'status' => null,
'admin_note' => null,
'created_at' => 'date-time'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'employee_id' => false,
'employee_name' => true,
'type' => true,
'start_date' => false,
'end_date' => false,
'reason' => true,
'substitute' => true,
'note' => true,
'status' => true,
'admin_note' => true,
'created_at' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'id' => 'id',
'employee_id' => 'employeeId',
'employee_name' => 'employeeName',
'type' => 'type',
'start_date' => 'startDate',
'end_date' => 'endDate',
'reason' => 'reason',
'substitute' => 'substitute',
'note' => 'note',
'status' => 'status',
'admin_note' => 'adminNote',
'created_at' => 'createdAt'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'employee_id' => 'setEmployeeId',
'employee_name' => 'setEmployeeName',
'type' => 'setType',
'start_date' => 'setStartDate',
'end_date' => 'setEndDate',
'reason' => 'setReason',
'substitute' => 'setSubstitute',
'note' => 'setNote',
'status' => 'setStatus',
'admin_note' => 'setAdminNote',
'created_at' => 'setCreatedAt'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'employee_id' => 'getEmployeeId',
'employee_name' => 'getEmployeeName',
'type' => 'getType',
'start_date' => 'getStartDate',
'end_date' => 'getEndDate',
'reason' => 'getReason',
'substitute' => 'getSubstitute',
'note' => 'getNote',
'status' => 'getStatus',
'admin_note' => 'getAdminNote',
'created_at' => 'getCreatedAt'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('employee_id', $data ?? [], null);
$this->setIfExists('employee_name', $data ?? [], null);
$this->setIfExists('type', $data ?? [], null);
$this->setIfExists('start_date', $data ?? [], null);
$this->setIfExists('end_date', $data ?? [], null);
$this->setIfExists('reason', $data ?? [], null);
$this->setIfExists('substitute', $data ?? [], null);
$this->setIfExists('note', $data ?? [], null);
$this->setIfExists('status', $data ?? [], null);
$this->setIfExists('admin_note', $data ?? [], null);
$this->setIfExists('created_at', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets id
*
* @return string|null
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string|null $id id
*
* @return self
*/
public function setId($id)
{
if (is_null($id)) {
throw new \InvalidArgumentException('non-nullable id cannot be null');
}
$this->container['id'] = $id;
return $this;
}
/**
* Gets employee_id
*
* @return string|null
*/
public function getEmployeeId()
{
return $this->container['employee_id'];
}
/**
* Sets employee_id
*
* @param string|null $employee_id employee_id
*
* @return self
*/
public function setEmployeeId($employee_id)
{
if (is_null($employee_id)) {
throw new \InvalidArgumentException('non-nullable employee_id cannot be null');
}
$this->container['employee_id'] = $employee_id;
return $this;
}
/**
* Gets employee_name
*
* @return string|null
*/
public function getEmployeeName()
{
return $this->container['employee_name'];
}
/**
* Sets employee_name
*
* @param string|null $employee_name employee_name
*
* @return self
*/
public function setEmployeeName($employee_name)
{
if (is_null($employee_name)) {
array_push($this->openAPINullablesSetToNull, 'employee_name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('employee_name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['employee_name'] = $employee_name;
return $this;
}
/**
* Gets type
*
* @return string|null
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string|null $type type
*
* @return self
*/
public function setType($type)
{
if (is_null($type)) {
array_push($this->openAPINullablesSetToNull, 'type');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('type', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['type'] = $type;
return $this;
}
/**
* Gets start_date
*
* @return \DateTime|null
*/
public function getStartDate()
{
return $this->container['start_date'];
}
/**
* Sets start_date
*
* @param \DateTime|null $start_date start_date
*
* @return self
*/
public function setStartDate($start_date)
{
if (is_null($start_date)) {
throw new \InvalidArgumentException('non-nullable start_date cannot be null');
}
$this->container['start_date'] = $start_date;
return $this;
}
/**
* Gets end_date
*
* @return \DateTime|null
*/
public function getEndDate()
{
return $this->container['end_date'];
}
/**
* Sets end_date
*
* @param \DateTime|null $end_date end_date
*
* @return self
*/
public function setEndDate($end_date)
{
if (is_null($end_date)) {
throw new \InvalidArgumentException('non-nullable end_date cannot be null');
}
$this->container['end_date'] = $end_date;
return $this;
}
/**
* Gets reason
*
* @return string|null
*/
public function getReason()
{
return $this->container['reason'];
}
/**
* Sets reason
*
* @param string|null $reason reason
*
* @return self
*/
public function setReason($reason)
{
if (is_null($reason)) {
array_push($this->openAPINullablesSetToNull, 'reason');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('reason', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['reason'] = $reason;
return $this;
}
/**
* Gets substitute
*
* @return string|null
*/
public function getSubstitute()
{
return $this->container['substitute'];
}
/**
* Sets substitute
*
* @param string|null $substitute substitute
*
* @return self
*/
public function setSubstitute($substitute)
{
if (is_null($substitute)) {
array_push($this->openAPINullablesSetToNull, 'substitute');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('substitute', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['substitute'] = $substitute;
return $this;
}
/**
* Gets note
*
* @return string|null
*/
public function getNote()
{
return $this->container['note'];
}
/**
* Sets note
*
* @param string|null $note note
*
* @return self
*/
public function setNote($note)
{
if (is_null($note)) {
array_push($this->openAPINullablesSetToNull, 'note');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('note', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['note'] = $note;
return $this;
}
/**
* Gets status
*
* @return string|null
*/
public function getStatus()
{
return $this->container['status'];
}
/**
* Sets status
*
* @param string|null $status status
*
* @return self
*/
public function setStatus($status)
{
if (is_null($status)) {
array_push($this->openAPINullablesSetToNull, 'status');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('status', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['status'] = $status;
return $this;
}
/**
* Gets admin_note
*
* @return string|null
*/
public function getAdminNote()
{
return $this->container['admin_note'];
}
/**
* Sets admin_note
*
* @param string|null $admin_note admin_note
*
* @return self
*/
public function setAdminNote($admin_note)
{
if (is_null($admin_note)) {
array_push($this->openAPINullablesSetToNull, 'admin_note');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('admin_note', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['admin_note'] = $admin_note;
return $this;
}
/**
* Gets created_at
*
* @return \DateTime|null
*/
public function getCreatedAt()
{
return $this->container['created_at'];
}
/**
* Sets created_at
*
* @param \DateTime|null $created_at created_at
*
* @return self
*/
public function setCreatedAt($created_at)
{
if (is_null($created_at)) {
throw new \InvalidArgumentException('non-nullable created_at cannot be null');
}
$this->container['created_at'] = $created_at;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,518 @@
<?php
/**
* AbsenceResponsePagedResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* AbsenceResponsePagedResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class AbsenceResponsePagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'AbsenceResponsePagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'items' => '\OmsorgCoreClient\Model\AbsenceResponse[]',
'total_count' => 'int',
'page' => 'int',
'page_size' => 'int'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'items' => null,
'total_count' => 'int32',
'page' => 'int32',
'page_size' => 'int32'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'items' => true,
'total_count' => false,
'page' => false,
'page_size' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'items' => 'items',
'total_count' => 'totalCount',
'page' => 'page',
'page_size' => 'pageSize'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'items' => 'setItems',
'total_count' => 'setTotalCount',
'page' => 'setPage',
'page_size' => 'setPageSize'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'items' => 'getItems',
'total_count' => 'getTotalCount',
'page' => 'getPage',
'page_size' => 'getPageSize'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('items', $data ?? [], null);
$this->setIfExists('total_count', $data ?? [], null);
$this->setIfExists('page', $data ?? [], null);
$this->setIfExists('page_size', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets items
*
* @return \OmsorgCoreClient\Model\AbsenceResponse[]|null
*/
public function getItems()
{
return $this->container['items'];
}
/**
* Sets items
*
* @param \OmsorgCoreClient\Model\AbsenceResponse[]|null $items items
*
* @return self
*/
public function setItems($items)
{
if (is_null($items)) {
array_push($this->openAPINullablesSetToNull, 'items');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('items', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['items'] = $items;
return $this;
}
/**
* Gets total_count
*
* @return int|null
*/
public function getTotalCount()
{
return $this->container['total_count'];
}
/**
* Sets total_count
*
* @param int|null $total_count total_count
*
* @return self
*/
public function setTotalCount($total_count)
{
if (is_null($total_count)) {
throw new \InvalidArgumentException('non-nullable total_count cannot be null');
}
$this->container['total_count'] = $total_count;
return $this;
}
/**
* Gets page
*
* @return int|null
*/
public function getPage()
{
return $this->container['page'];
}
/**
* Sets page
*
* @param int|null $page page
*
* @return self
*/
public function setPage($page)
{
if (is_null($page)) {
throw new \InvalidArgumentException('non-nullable page cannot be null');
}
$this->container['page'] = $page;
return $this;
}
/**
* Gets page_size
*
* @return int|null
*/
public function getPageSize()
{
return $this->container['page_size'];
}
/**
* Sets page_size
*
* @param int|null $page_size page_size
*
* @return self
*/
public function setPageSize($page_size)
{
if (is_null($page_size)) {
throw new \InvalidArgumentException('non-nullable page_size cannot be null');
}
$this->container['page_size'] = $page_size;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -57,9 +57,10 @@ class AddUserPermissionOverrideRequest implements ModelInterface, ArrayAccess, \
* @var string[]
*/
protected static $openAPITypes = [
'module' => 'string',
'action' => 'string',
'effect' => 'string'
'module' => '\OmsorgCoreClient\Model\ModuleType',
'action' => '\OmsorgCoreClient\Model\PermissionAction',
'effect' => '\OmsorgCoreClient\Model\PermissionEffect',
'scope' => '\OmsorgCoreClient\Model\PermissionScope'
];
/**
@@ -72,7 +73,8 @@ class AddUserPermissionOverrideRequest implements ModelInterface, ArrayAccess, \
protected static $openAPIFormats = [
'module' => null,
'action' => null,
'effect' => null
'effect' => null,
'scope' => null
];
/**
@@ -81,9 +83,10 @@ class AddUserPermissionOverrideRequest implements ModelInterface, ArrayAccess, \
* @var boolean[]
*/
protected static array $openAPINullables = [
'module' => true,
'action' => true,
'effect' => true
'module' => false,
'action' => false,
'effect' => false,
'scope' => false
];
/**
@@ -174,7 +177,8 @@ class AddUserPermissionOverrideRequest implements ModelInterface, ArrayAccess, \
protected static $attributeMap = [
'module' => 'module',
'action' => 'action',
'effect' => 'effect'
'effect' => 'effect',
'scope' => 'scope'
];
/**
@@ -185,7 +189,8 @@ class AddUserPermissionOverrideRequest implements ModelInterface, ArrayAccess, \
protected static $setters = [
'module' => 'setModule',
'action' => 'setAction',
'effect' => 'setEffect'
'effect' => 'setEffect',
'scope' => 'setScope'
];
/**
@@ -196,7 +201,8 @@ class AddUserPermissionOverrideRequest implements ModelInterface, ArrayAccess, \
protected static $getters = [
'module' => 'getModule',
'action' => 'getAction',
'effect' => 'getEffect'
'effect' => 'getEffect',
'scope' => 'getScope'
];
/**
@@ -259,6 +265,7 @@ class AddUserPermissionOverrideRequest implements ModelInterface, ArrayAccess, \
$this->setIfExists('module', $data ?? [], null);
$this->setIfExists('action', $data ?? [], null);
$this->setIfExists('effect', $data ?? [], null);
$this->setIfExists('scope', $data ?? [], null);
}
/**
@@ -306,7 +313,7 @@ class AddUserPermissionOverrideRequest implements ModelInterface, ArrayAccess, \
/**
* Gets module
*
* @return string|null
* @return \OmsorgCoreClient\Model\ModuleType|null
*/
public function getModule()
{
@@ -316,21 +323,14 @@ class AddUserPermissionOverrideRequest implements ModelInterface, ArrayAccess, \
/**
* Sets module
*
* @param string|null $module module
* @param \OmsorgCoreClient\Model\ModuleType|null $module module
*
* @return self
*/
public function setModule($module)
{
if (is_null($module)) {
array_push($this->openAPINullablesSetToNull, 'module');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('module', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
throw new \InvalidArgumentException('non-nullable module cannot be null');
}
$this->container['module'] = $module;
@@ -340,7 +340,7 @@ class AddUserPermissionOverrideRequest implements ModelInterface, ArrayAccess, \
/**
* Gets action
*
* @return string|null
* @return \OmsorgCoreClient\Model\PermissionAction|null
*/
public function getAction()
{
@@ -350,21 +350,14 @@ class AddUserPermissionOverrideRequest implements ModelInterface, ArrayAccess, \
/**
* Sets action
*
* @param string|null $action action
* @param \OmsorgCoreClient\Model\PermissionAction|null $action action
*
* @return self
*/
public function setAction($action)
{
if (is_null($action)) {
array_push($this->openAPINullablesSetToNull, 'action');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('action', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
throw new \InvalidArgumentException('non-nullable action cannot be null');
}
$this->container['action'] = $action;
@@ -374,7 +367,7 @@ class AddUserPermissionOverrideRequest implements ModelInterface, ArrayAccess, \
/**
* Gets effect
*
* @return string|null
* @return \OmsorgCoreClient\Model\PermissionEffect|null
*/
public function getEffect()
{
@@ -384,26 +377,46 @@ class AddUserPermissionOverrideRequest implements ModelInterface, ArrayAccess, \
/**
* Sets effect
*
* @param string|null $effect effect
* @param \OmsorgCoreClient\Model\PermissionEffect|null $effect effect
*
* @return self
*/
public function setEffect($effect)
{
if (is_null($effect)) {
array_push($this->openAPINullablesSetToNull, 'effect');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('effect', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
throw new \InvalidArgumentException('non-nullable effect cannot be null');
}
$this->container['effect'] = $effect;
return $this;
}
/**
* Gets scope
*
* @return \OmsorgCoreClient\Model\PermissionScope|null
*/
public function getScope()
{
return $this->container['scope'];
}
/**
* Sets scope
*
* @param \OmsorgCoreClient\Model\PermissionScope|null $scope scope
*
* @return self
*/
public function setScope($scope)
{
if (is_null($scope)) {
throw new \InvalidArgumentException('non-nullable scope cannot be null');
}
$this->container['scope'] = $scope;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@@ -0,0 +1,62 @@
<?php
/**
* AuditEventCategory
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \OmsorgCoreClient\ObjectSerializer;
/**
* AuditEventCategory Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class AuditEventCategory
{
/**
* Possible values of this enum
*/
public const ENTITY_CHANGE = 'EntityChange';
public const BEHAVIORAL_EVENT = 'BehavioralEvent';
/**
* Gets allowable values of the enum
* @return string[]
*/
public static function getAllowableEnumValues()
{
return [
self::ENTITY_CHANGE,
self::BEHAVIORAL_EVENT
];
}
}
@@ -0,0 +1,607 @@
<?php
/**
* CreateAbsenceRequest
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* CreateAbsenceRequest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class CreateAbsenceRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'CreateAbsenceRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'type' => 'string',
'start_date' => '\DateTime',
'end_date' => '\DateTime',
'reason' => 'string',
'substitute' => 'string',
'note' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'type' => null,
'start_date' => 'date',
'end_date' => 'date',
'reason' => null,
'substitute' => null,
'note' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'type' => true,
'start_date' => false,
'end_date' => false,
'reason' => true,
'substitute' => true,
'note' => true
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'type' => 'type',
'start_date' => 'startDate',
'end_date' => 'endDate',
'reason' => 'reason',
'substitute' => 'substitute',
'note' => 'note'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'type' => 'setType',
'start_date' => 'setStartDate',
'end_date' => 'setEndDate',
'reason' => 'setReason',
'substitute' => 'setSubstitute',
'note' => 'setNote'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'type' => 'getType',
'start_date' => 'getStartDate',
'end_date' => 'getEndDate',
'reason' => 'getReason',
'substitute' => 'getSubstitute',
'note' => 'getNote'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('type', $data ?? [], null);
$this->setIfExists('start_date', $data ?? [], null);
$this->setIfExists('end_date', $data ?? [], null);
$this->setIfExists('reason', $data ?? [], null);
$this->setIfExists('substitute', $data ?? [], null);
$this->setIfExists('note', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets type
*
* @return string|null
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string|null $type type
*
* @return self
*/
public function setType($type)
{
if (is_null($type)) {
array_push($this->openAPINullablesSetToNull, 'type');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('type', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['type'] = $type;
return $this;
}
/**
* Gets start_date
*
* @return \DateTime|null
*/
public function getStartDate()
{
return $this->container['start_date'];
}
/**
* Sets start_date
*
* @param \DateTime|null $start_date start_date
*
* @return self
*/
public function setStartDate($start_date)
{
if (is_null($start_date)) {
throw new \InvalidArgumentException('non-nullable start_date cannot be null');
}
$this->container['start_date'] = $start_date;
return $this;
}
/**
* Gets end_date
*
* @return \DateTime|null
*/
public function getEndDate()
{
return $this->container['end_date'];
}
/**
* Sets end_date
*
* @param \DateTime|null $end_date end_date
*
* @return self
*/
public function setEndDate($end_date)
{
if (is_null($end_date)) {
throw new \InvalidArgumentException('non-nullable end_date cannot be null');
}
$this->container['end_date'] = $end_date;
return $this;
}
/**
* Gets reason
*
* @return string|null
*/
public function getReason()
{
return $this->container['reason'];
}
/**
* Sets reason
*
* @param string|null $reason reason
*
* @return self
*/
public function setReason($reason)
{
if (is_null($reason)) {
array_push($this->openAPINullablesSetToNull, 'reason');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('reason', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['reason'] = $reason;
return $this;
}
/**
* Gets substitute
*
* @return string|null
*/
public function getSubstitute()
{
return $this->container['substitute'];
}
/**
* Sets substitute
*
* @param string|null $substitute substitute
*
* @return self
*/
public function setSubstitute($substitute)
{
if (is_null($substitute)) {
array_push($this->openAPINullablesSetToNull, 'substitute');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('substitute', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['substitute'] = $substitute;
return $this;
}
/**
* Gets note
*
* @return string|null
*/
public function getNote()
{
return $this->container['note'];
}
/**
* Sets note
*
* @param string|null $note note
*
* @return self
*/
public function setNote($note)
{
if (is_null($note)) {
array_push($this->openAPINullablesSetToNull, 'note');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('note', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['note'] = $note;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,450 @@
<?php
/**
* CreateFacilityQualificationRateRequest
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* CreateFacilityQualificationRateRequest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class CreateFacilityQualificationRateRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'CreateFacilityQualificationRateRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'qualification' => 'string',
'rate' => 'float'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'qualification' => null,
'rate' => 'double'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'qualification' => true,
'rate' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'qualification' => 'qualification',
'rate' => 'rate'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'qualification' => 'setQualification',
'rate' => 'setRate'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'qualification' => 'getQualification',
'rate' => 'getRate'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('qualification', $data ?? [], null);
$this->setIfExists('rate', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets qualification
*
* @return string|null
*/
public function getQualification()
{
return $this->container['qualification'];
}
/**
* Sets qualification
*
* @param string|null $qualification qualification
*
* @return self
*/
public function setQualification($qualification)
{
if (is_null($qualification)) {
array_push($this->openAPINullablesSetToNull, 'qualification');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('qualification', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['qualification'] = $qualification;
return $this;
}
/**
* Gets rate
*
* @return float|null
*/
public function getRate()
{
return $this->container['rate'];
}
/**
* Sets rate
*
* @param float|null $rate rate
*
* @return self
*/
public function setRate($rate)
{
if (is_null($rate)) {
throw new \InvalidArgumentException('non-nullable rate cannot be null');
}
$this->container['rate'] = $rate;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -59,6 +59,7 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
protected static $openAPITypes = [
'name' => 'string',
'facility_type' => 'string',
'website' => 'string',
'street' => 'string',
'postal_code' => 'string',
'city' => 'string',
@@ -79,6 +80,7 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
protected static $openAPIFormats = [
'name' => null,
'facility_type' => null,
'website' => null,
'street' => null,
'postal_code' => null,
'city' => null,
@@ -97,6 +99,7 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
protected static array $openAPINullables = [
'name' => true,
'facility_type' => true,
'website' => true,
'street' => true,
'postal_code' => true,
'city' => true,
@@ -195,6 +198,7 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
protected static $attributeMap = [
'name' => 'name',
'facility_type' => 'facilityType',
'website' => 'website',
'street' => 'street',
'postal_code' => 'postalCode',
'city' => 'city',
@@ -213,6 +217,7 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
protected static $setters = [
'name' => 'setName',
'facility_type' => 'setFacilityType',
'website' => 'setWebsite',
'street' => 'setStreet',
'postal_code' => 'setPostalCode',
'city' => 'setCity',
@@ -231,6 +236,7 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
protected static $getters = [
'name' => 'getName',
'facility_type' => 'getFacilityType',
'website' => 'getWebsite',
'street' => 'getStreet',
'postal_code' => 'getPostalCode',
'city' => 'getCity',
@@ -300,6 +306,7 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
{
$this->setIfExists('name', $data ?? [], null);
$this->setIfExists('facility_type', $data ?? [], null);
$this->setIfExists('website', $data ?? [], null);
$this->setIfExists('street', $data ?? [], null);
$this->setIfExists('postal_code', $data ?? [], null);
$this->setIfExists('city', $data ?? [], null);
@@ -420,6 +427,40 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
return $this;
}
/**
* Gets website
*
* @return string|null
*/
public function getWebsite()
{
return $this->container['website'];
}
/**
* Sets website
*
* @param string|null $website website
*
* @return self
*/
public function setWebsite($website)
{
if (is_null($website)) {
array_push($this->openAPINullablesSetToNull, 'website');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('website', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['website'] = $website;
return $this;
}
/**
* Gets street
*
@@ -0,0 +1,681 @@
<?php
/**
* CreateTimeEntryRequest
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* CreateTimeEntryRequest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class CreateTimeEntryRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'CreateTimeEntryRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'order_id' => 'string',
'date' => '\DateTime',
'start' => 'string',
'end' => 'string',
'break_duration' => 'string',
'night_hours' => 'float',
'saturday_hours' => 'float',
'sunday_hours' => 'float',
'holiday_hours' => 'float'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'order_id' => 'uuid',
'date' => 'date',
'start' => 'time',
'end' => 'time',
'break_duration' => 'date-span',
'night_hours' => 'double',
'saturday_hours' => 'double',
'sunday_hours' => 'double',
'holiday_hours' => 'double'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'order_id' => false,
'date' => false,
'start' => false,
'end' => false,
'break_duration' => false,
'night_hours' => false,
'saturday_hours' => false,
'sunday_hours' => false,
'holiday_hours' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'order_id' => 'orderId',
'date' => 'date',
'start' => 'start',
'end' => 'end',
'break_duration' => 'breakDuration',
'night_hours' => 'nightHours',
'saturday_hours' => 'saturdayHours',
'sunday_hours' => 'sundayHours',
'holiday_hours' => 'holidayHours'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'order_id' => 'setOrderId',
'date' => 'setDate',
'start' => 'setStart',
'end' => 'setEnd',
'break_duration' => 'setBreakDuration',
'night_hours' => 'setNightHours',
'saturday_hours' => 'setSaturdayHours',
'sunday_hours' => 'setSundayHours',
'holiday_hours' => 'setHolidayHours'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'order_id' => 'getOrderId',
'date' => 'getDate',
'start' => 'getStart',
'end' => 'getEnd',
'break_duration' => 'getBreakDuration',
'night_hours' => 'getNightHours',
'saturday_hours' => 'getSaturdayHours',
'sunday_hours' => 'getSundayHours',
'holiday_hours' => 'getHolidayHours'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('order_id', $data ?? [], null);
$this->setIfExists('date', $data ?? [], null);
$this->setIfExists('start', $data ?? [], null);
$this->setIfExists('end', $data ?? [], null);
$this->setIfExists('break_duration', $data ?? [], null);
$this->setIfExists('night_hours', $data ?? [], null);
$this->setIfExists('saturday_hours', $data ?? [], null);
$this->setIfExists('sunday_hours', $data ?? [], null);
$this->setIfExists('holiday_hours', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets order_id
*
* @return string|null
*/
public function getOrderId()
{
return $this->container['order_id'];
}
/**
* Sets order_id
*
* @param string|null $order_id order_id
*
* @return self
*/
public function setOrderId($order_id)
{
if (is_null($order_id)) {
throw new \InvalidArgumentException('non-nullable order_id cannot be null');
}
$this->container['order_id'] = $order_id;
return $this;
}
/**
* Gets date
*
* @return \DateTime|null
*/
public function getDate()
{
return $this->container['date'];
}
/**
* Sets date
*
* @param \DateTime|null $date date
*
* @return self
*/
public function setDate($date)
{
if (is_null($date)) {
throw new \InvalidArgumentException('non-nullable date cannot be null');
}
$this->container['date'] = $date;
return $this;
}
/**
* Gets start
*
* @return string|null
*/
public function getStart()
{
return $this->container['start'];
}
/**
* Sets start
*
* @param string|null $start start
*
* @return self
*/
public function setStart($start)
{
if (is_null($start)) {
throw new \InvalidArgumentException('non-nullable start cannot be null');
}
$this->container['start'] = $start;
return $this;
}
/**
* Gets end
*
* @return string|null
*/
public function getEnd()
{
return $this->container['end'];
}
/**
* Sets end
*
* @param string|null $end end
*
* @return self
*/
public function setEnd($end)
{
if (is_null($end)) {
throw new \InvalidArgumentException('non-nullable end cannot be null');
}
$this->container['end'] = $end;
return $this;
}
/**
* Gets break_duration
*
* @return string|null
*/
public function getBreakDuration()
{
return $this->container['break_duration'];
}
/**
* Sets break_duration
*
* @param string|null $break_duration break_duration
*
* @return self
*/
public function setBreakDuration($break_duration)
{
if (is_null($break_duration)) {
throw new \InvalidArgumentException('non-nullable break_duration cannot be null');
}
$this->container['break_duration'] = $break_duration;
return $this;
}
/**
* Gets night_hours
*
* @return float|null
*/
public function getNightHours()
{
return $this->container['night_hours'];
}
/**
* Sets night_hours
*
* @param float|null $night_hours night_hours
*
* @return self
*/
public function setNightHours($night_hours)
{
if (is_null($night_hours)) {
throw new \InvalidArgumentException('non-nullable night_hours cannot be null');
}
$this->container['night_hours'] = $night_hours;
return $this;
}
/**
* Gets saturday_hours
*
* @return float|null
*/
public function getSaturdayHours()
{
return $this->container['saturday_hours'];
}
/**
* Sets saturday_hours
*
* @param float|null $saturday_hours saturday_hours
*
* @return self
*/
public function setSaturdayHours($saturday_hours)
{
if (is_null($saturday_hours)) {
throw new \InvalidArgumentException('non-nullable saturday_hours cannot be null');
}
$this->container['saturday_hours'] = $saturday_hours;
return $this;
}
/**
* Gets sunday_hours
*
* @return float|null
*/
public function getSundayHours()
{
return $this->container['sunday_hours'];
}
/**
* Sets sunday_hours
*
* @param float|null $sunday_hours sunday_hours
*
* @return self
*/
public function setSundayHours($sunday_hours)
{
if (is_null($sunday_hours)) {
throw new \InvalidArgumentException('non-nullable sunday_hours cannot be null');
}
$this->container['sunday_hours'] = $sunday_hours;
return $this;
}
/**
* Gets holiday_hours
*
* @return float|null
*/
public function getHolidayHours()
{
return $this->container['holiday_hours'];
}
/**
* Sets holiday_hours
*
* @param float|null $holiday_hours holiday_hours
*
* @return self
*/
public function setHolidayHours($holiday_hours)
{
if (is_null($holiday_hours)) {
throw new \InvalidArgumentException('non-nullable holiday_hours cannot be null');
}
$this->container['holiday_hours'] = $holiday_hours;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -61,7 +61,8 @@ class CreateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
'sort_order' => 'int',
'is_default' => 'bool',
'is_initial' => 'bool',
'is_terminal' => 'bool'
'is_terminal' => 'bool',
'triggers_follow_up' => 'bool'
];
/**
@@ -76,7 +77,8 @@ class CreateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
'sort_order' => 'int32',
'is_default' => null,
'is_initial' => null,
'is_terminal' => null
'is_terminal' => null,
'triggers_follow_up' => null
];
/**
@@ -89,7 +91,8 @@ class CreateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
'sort_order' => false,
'is_default' => false,
'is_initial' => false,
'is_terminal' => false
'is_terminal' => false,
'triggers_follow_up' => false
];
/**
@@ -182,7 +185,8 @@ class CreateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
'sort_order' => 'sortOrder',
'is_default' => 'isDefault',
'is_initial' => 'isInitial',
'is_terminal' => 'isTerminal'
'is_terminal' => 'isTerminal',
'triggers_follow_up' => 'triggersFollowUp'
];
/**
@@ -195,7 +199,8 @@ class CreateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
'sort_order' => 'setSortOrder',
'is_default' => 'setIsDefault',
'is_initial' => 'setIsInitial',
'is_terminal' => 'setIsTerminal'
'is_terminal' => 'setIsTerminal',
'triggers_follow_up' => 'setTriggersFollowUp'
];
/**
@@ -208,7 +213,8 @@ class CreateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
'sort_order' => 'getSortOrder',
'is_default' => 'getIsDefault',
'is_initial' => 'getIsInitial',
'is_terminal' => 'getIsTerminal'
'is_terminal' => 'getIsTerminal',
'triggers_follow_up' => 'getTriggersFollowUp'
];
/**
@@ -273,6 +279,7 @@ class CreateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
$this->setIfExists('is_default', $data ?? [], null);
$this->setIfExists('is_initial', $data ?? [], null);
$this->setIfExists('is_terminal', $data ?? [], null);
$this->setIfExists('triggers_follow_up', $data ?? [], null);
}
/**
@@ -458,6 +465,33 @@ class CreateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
return $this;
}
/**
* Gets triggers_follow_up
*
* @return bool|null
*/
public function getTriggersFollowUp()
{
return $this->container['triggers_follow_up'];
}
/**
* Sets triggers_follow_up
*
* @param bool|null $triggers_follow_up triggers_follow_up
*
* @return self
*/
public function setTriggersFollowUp($triggers_follow_up)
{
if (is_null($triggers_follow_up)) {
throw new \InvalidArgumentException('non-nullable triggers_follow_up cannot be null');
}
$this->container['triggers_follow_up'] = $triggers_follow_up;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@@ -0,0 +1,791 @@
<?php
/**
* DocumentResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* DocumentResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class DocumentResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'DocumentResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'entity_type' => 'string',
'entity_id' => 'string',
'category' => 'string',
'file_name' => 'string',
'content_type' => 'string',
'size_bytes' => 'int',
'description' => 'string',
'uploaded_by_user_id' => 'string',
'uploaded_by_username' => 'string',
'created_at' => '\DateTime'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'id' => 'uuid',
'entity_type' => null,
'entity_id' => 'uuid',
'category' => null,
'file_name' => null,
'content_type' => null,
'size_bytes' => 'int64',
'description' => null,
'uploaded_by_user_id' => 'uuid',
'uploaded_by_username' => null,
'created_at' => 'date-time'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'entity_type' => true,
'entity_id' => false,
'category' => true,
'file_name' => true,
'content_type' => true,
'size_bytes' => false,
'description' => true,
'uploaded_by_user_id' => false,
'uploaded_by_username' => true,
'created_at' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'id' => 'id',
'entity_type' => 'entityType',
'entity_id' => 'entityId',
'category' => 'category',
'file_name' => 'fileName',
'content_type' => 'contentType',
'size_bytes' => 'sizeBytes',
'description' => 'description',
'uploaded_by_user_id' => 'uploadedByUserId',
'uploaded_by_username' => 'uploadedByUsername',
'created_at' => 'createdAt'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'entity_type' => 'setEntityType',
'entity_id' => 'setEntityId',
'category' => 'setCategory',
'file_name' => 'setFileName',
'content_type' => 'setContentType',
'size_bytes' => 'setSizeBytes',
'description' => 'setDescription',
'uploaded_by_user_id' => 'setUploadedByUserId',
'uploaded_by_username' => 'setUploadedByUsername',
'created_at' => 'setCreatedAt'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'entity_type' => 'getEntityType',
'entity_id' => 'getEntityId',
'category' => 'getCategory',
'file_name' => 'getFileName',
'content_type' => 'getContentType',
'size_bytes' => 'getSizeBytes',
'description' => 'getDescription',
'uploaded_by_user_id' => 'getUploadedByUserId',
'uploaded_by_username' => 'getUploadedByUsername',
'created_at' => 'getCreatedAt'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('entity_type', $data ?? [], null);
$this->setIfExists('entity_id', $data ?? [], null);
$this->setIfExists('category', $data ?? [], null);
$this->setIfExists('file_name', $data ?? [], null);
$this->setIfExists('content_type', $data ?? [], null);
$this->setIfExists('size_bytes', $data ?? [], null);
$this->setIfExists('description', $data ?? [], null);
$this->setIfExists('uploaded_by_user_id', $data ?? [], null);
$this->setIfExists('uploaded_by_username', $data ?? [], null);
$this->setIfExists('created_at', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets id
*
* @return string|null
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string|null $id id
*
* @return self
*/
public function setId($id)
{
if (is_null($id)) {
throw new \InvalidArgumentException('non-nullable id cannot be null');
}
$this->container['id'] = $id;
return $this;
}
/**
* Gets entity_type
*
* @return string|null
*/
public function getEntityType()
{
return $this->container['entity_type'];
}
/**
* Sets entity_type
*
* @param string|null $entity_type entity_type
*
* @return self
*/
public function setEntityType($entity_type)
{
if (is_null($entity_type)) {
array_push($this->openAPINullablesSetToNull, 'entity_type');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('entity_type', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['entity_type'] = $entity_type;
return $this;
}
/**
* Gets entity_id
*
* @return string|null
*/
public function getEntityId()
{
return $this->container['entity_id'];
}
/**
* Sets entity_id
*
* @param string|null $entity_id entity_id
*
* @return self
*/
public function setEntityId($entity_id)
{
if (is_null($entity_id)) {
throw new \InvalidArgumentException('non-nullable entity_id cannot be null');
}
$this->container['entity_id'] = $entity_id;
return $this;
}
/**
* Gets category
*
* @return string|null
*/
public function getCategory()
{
return $this->container['category'];
}
/**
* Sets category
*
* @param string|null $category category
*
* @return self
*/
public function setCategory($category)
{
if (is_null($category)) {
array_push($this->openAPINullablesSetToNull, 'category');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('category', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['category'] = $category;
return $this;
}
/**
* Gets file_name
*
* @return string|null
*/
public function getFileName()
{
return $this->container['file_name'];
}
/**
* Sets file_name
*
* @param string|null $file_name file_name
*
* @return self
*/
public function setFileName($file_name)
{
if (is_null($file_name)) {
array_push($this->openAPINullablesSetToNull, 'file_name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('file_name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['file_name'] = $file_name;
return $this;
}
/**
* Gets content_type
*
* @return string|null
*/
public function getContentType()
{
return $this->container['content_type'];
}
/**
* Sets content_type
*
* @param string|null $content_type content_type
*
* @return self
*/
public function setContentType($content_type)
{
if (is_null($content_type)) {
array_push($this->openAPINullablesSetToNull, 'content_type');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('content_type', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['content_type'] = $content_type;
return $this;
}
/**
* Gets size_bytes
*
* @return int|null
*/
public function getSizeBytes()
{
return $this->container['size_bytes'];
}
/**
* Sets size_bytes
*
* @param int|null $size_bytes size_bytes
*
* @return self
*/
public function setSizeBytes($size_bytes)
{
if (is_null($size_bytes)) {
throw new \InvalidArgumentException('non-nullable size_bytes cannot be null');
}
$this->container['size_bytes'] = $size_bytes;
return $this;
}
/**
* Gets description
*
* @return string|null
*/
public function getDescription()
{
return $this->container['description'];
}
/**
* Sets description
*
* @param string|null $description description
*
* @return self
*/
public function setDescription($description)
{
if (is_null($description)) {
array_push($this->openAPINullablesSetToNull, 'description');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('description', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['description'] = $description;
return $this;
}
/**
* Gets uploaded_by_user_id
*
* @return string|null
*/
public function getUploadedByUserId()
{
return $this->container['uploaded_by_user_id'];
}
/**
* Sets uploaded_by_user_id
*
* @param string|null $uploaded_by_user_id uploaded_by_user_id
*
* @return self
*/
public function setUploadedByUserId($uploaded_by_user_id)
{
if (is_null($uploaded_by_user_id)) {
throw new \InvalidArgumentException('non-nullable uploaded_by_user_id cannot be null');
}
$this->container['uploaded_by_user_id'] = $uploaded_by_user_id;
return $this;
}
/**
* Gets uploaded_by_username
*
* @return string|null
*/
public function getUploadedByUsername()
{
return $this->container['uploaded_by_username'];
}
/**
* Sets uploaded_by_username
*
* @param string|null $uploaded_by_username uploaded_by_username
*
* @return self
*/
public function setUploadedByUsername($uploaded_by_username)
{
if (is_null($uploaded_by_username)) {
array_push($this->openAPINullablesSetToNull, 'uploaded_by_username');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('uploaded_by_username', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['uploaded_by_username'] = $uploaded_by_username;
return $this;
}
/**
* Gets created_at
*
* @return \DateTime|null
*/
public function getCreatedAt()
{
return $this->container['created_at'];
}
/**
* Sets created_at
*
* @param \DateTime|null $created_at created_at
*
* @return self
*/
public function setCreatedAt($created_at)
{
if (is_null($created_at)) {
throw new \InvalidArgumentException('non-nullable created_at cannot be null');
}
$this->container['created_at'] = $created_at;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,518 @@
<?php
/**
* FacilityQualificationRateResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* FacilityQualificationRateResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class FacilityQualificationRateResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'FacilityQualificationRateResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'facility_id' => 'string',
'qualification' => 'string',
'rate' => 'float'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'id' => 'uuid',
'facility_id' => 'uuid',
'qualification' => null,
'rate' => 'double'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'facility_id' => false,
'qualification' => true,
'rate' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'id' => 'id',
'facility_id' => 'facilityId',
'qualification' => 'qualification',
'rate' => 'rate'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'facility_id' => 'setFacilityId',
'qualification' => 'setQualification',
'rate' => 'setRate'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'facility_id' => 'getFacilityId',
'qualification' => 'getQualification',
'rate' => 'getRate'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('facility_id', $data ?? [], null);
$this->setIfExists('qualification', $data ?? [], null);
$this->setIfExists('rate', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets id
*
* @return string|null
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string|null $id id
*
* @return self
*/
public function setId($id)
{
if (is_null($id)) {
throw new \InvalidArgumentException('non-nullable id cannot be null');
}
$this->container['id'] = $id;
return $this;
}
/**
* Gets facility_id
*
* @return string|null
*/
public function getFacilityId()
{
return $this->container['facility_id'];
}
/**
* Sets facility_id
*
* @param string|null $facility_id facility_id
*
* @return self
*/
public function setFacilityId($facility_id)
{
if (is_null($facility_id)) {
throw new \InvalidArgumentException('non-nullable facility_id cannot be null');
}
$this->container['facility_id'] = $facility_id;
return $this;
}
/**
* Gets qualification
*
* @return string|null
*/
public function getQualification()
{
return $this->container['qualification'];
}
/**
* Sets qualification
*
* @param string|null $qualification qualification
*
* @return self
*/
public function setQualification($qualification)
{
if (is_null($qualification)) {
array_push($this->openAPINullablesSetToNull, 'qualification');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('qualification', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['qualification'] = $qualification;
return $this;
}
/**
* Gets rate
*
* @return float|null
*/
public function getRate()
{
return $this->container['rate'];
}
/**
* Sets rate
*
* @param float|null $rate rate
*
* @return self
*/
public function setRate($rate)
{
if (is_null($rate)) {
throw new \InvalidArgumentException('non-nullable rate cannot be null');
}
$this->container['rate'] = $rate;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -61,6 +61,7 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
'name' => 'string',
'crm_status' => 'string',
'facility_type' => 'string',
'website' => 'string',
'street' => 'string',
'postal_code' => 'string',
'city' => 'string',
@@ -68,7 +69,19 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
'billing_street' => 'string',
'billing_postal_code' => 'string',
'billing_city' => 'string',
'billing_country' => 'string'
'billing_country' => 'string',
'follow_up_due_date' => '\DateTime',
'billing_rate' => 'float',
'night_surcharge_percent' => 'float',
'saturday_surcharge_percent' => 'float',
'sunday_surcharge_percent' => 'float',
'holiday_surcharge_percent' => 'float',
'travel_cost_rate' => 'float',
'minimum_hours' => 'float',
'break_policy' => 'string',
'billing_interval' => 'string',
'payment_term_days' => 'int',
'individual_agreements' => 'string'
];
/**
@@ -83,6 +96,7 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
'name' => null,
'crm_status' => null,
'facility_type' => null,
'website' => null,
'street' => null,
'postal_code' => null,
'city' => null,
@@ -90,7 +104,19 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
'billing_street' => null,
'billing_postal_code' => null,
'billing_city' => null,
'billing_country' => null
'billing_country' => null,
'follow_up_due_date' => 'date-time',
'billing_rate' => 'double',
'night_surcharge_percent' => 'double',
'saturday_surcharge_percent' => 'double',
'sunday_surcharge_percent' => 'double',
'holiday_surcharge_percent' => 'double',
'travel_cost_rate' => 'double',
'minimum_hours' => 'double',
'break_policy' => null,
'billing_interval' => null,
'payment_term_days' => 'int32',
'individual_agreements' => null
];
/**
@@ -103,6 +129,7 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
'name' => true,
'crm_status' => true,
'facility_type' => true,
'website' => true,
'street' => true,
'postal_code' => true,
'city' => true,
@@ -110,7 +137,19 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
'billing_street' => true,
'billing_postal_code' => true,
'billing_city' => true,
'billing_country' => true
'billing_country' => true,
'follow_up_due_date' => true,
'billing_rate' => true,
'night_surcharge_percent' => true,
'saturday_surcharge_percent' => true,
'sunday_surcharge_percent' => true,
'holiday_surcharge_percent' => true,
'travel_cost_rate' => true,
'minimum_hours' => true,
'break_policy' => true,
'billing_interval' => true,
'payment_term_days' => true,
'individual_agreements' => true
];
/**
@@ -203,6 +242,7 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
'name' => 'name',
'crm_status' => 'crmStatus',
'facility_type' => 'facilityType',
'website' => 'website',
'street' => 'street',
'postal_code' => 'postalCode',
'city' => 'city',
@@ -210,7 +250,19 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
'billing_street' => 'billingStreet',
'billing_postal_code' => 'billingPostalCode',
'billing_city' => 'billingCity',
'billing_country' => 'billingCountry'
'billing_country' => 'billingCountry',
'follow_up_due_date' => 'followUpDueDate',
'billing_rate' => 'billingRate',
'night_surcharge_percent' => 'nightSurchargePercent',
'saturday_surcharge_percent' => 'saturdaySurchargePercent',
'sunday_surcharge_percent' => 'sundaySurchargePercent',
'holiday_surcharge_percent' => 'holidaySurchargePercent',
'travel_cost_rate' => 'travelCostRate',
'minimum_hours' => 'minimumHours',
'break_policy' => 'breakPolicy',
'billing_interval' => 'billingInterval',
'payment_term_days' => 'paymentTermDays',
'individual_agreements' => 'individualAgreements'
];
/**
@@ -223,6 +275,7 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
'name' => 'setName',
'crm_status' => 'setCrmStatus',
'facility_type' => 'setFacilityType',
'website' => 'setWebsite',
'street' => 'setStreet',
'postal_code' => 'setPostalCode',
'city' => 'setCity',
@@ -230,7 +283,19 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
'billing_street' => 'setBillingStreet',
'billing_postal_code' => 'setBillingPostalCode',
'billing_city' => 'setBillingCity',
'billing_country' => 'setBillingCountry'
'billing_country' => 'setBillingCountry',
'follow_up_due_date' => 'setFollowUpDueDate',
'billing_rate' => 'setBillingRate',
'night_surcharge_percent' => 'setNightSurchargePercent',
'saturday_surcharge_percent' => 'setSaturdaySurchargePercent',
'sunday_surcharge_percent' => 'setSundaySurchargePercent',
'holiday_surcharge_percent' => 'setHolidaySurchargePercent',
'travel_cost_rate' => 'setTravelCostRate',
'minimum_hours' => 'setMinimumHours',
'break_policy' => 'setBreakPolicy',
'billing_interval' => 'setBillingInterval',
'payment_term_days' => 'setPaymentTermDays',
'individual_agreements' => 'setIndividualAgreements'
];
/**
@@ -243,6 +308,7 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
'name' => 'getName',
'crm_status' => 'getCrmStatus',
'facility_type' => 'getFacilityType',
'website' => 'getWebsite',
'street' => 'getStreet',
'postal_code' => 'getPostalCode',
'city' => 'getCity',
@@ -250,7 +316,19 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
'billing_street' => 'getBillingStreet',
'billing_postal_code' => 'getBillingPostalCode',
'billing_city' => 'getBillingCity',
'billing_country' => 'getBillingCountry'
'billing_country' => 'getBillingCountry',
'follow_up_due_date' => 'getFollowUpDueDate',
'billing_rate' => 'getBillingRate',
'night_surcharge_percent' => 'getNightSurchargePercent',
'saturday_surcharge_percent' => 'getSaturdaySurchargePercent',
'sunday_surcharge_percent' => 'getSundaySurchargePercent',
'holiday_surcharge_percent' => 'getHolidaySurchargePercent',
'travel_cost_rate' => 'getTravelCostRate',
'minimum_hours' => 'getMinimumHours',
'break_policy' => 'getBreakPolicy',
'billing_interval' => 'getBillingInterval',
'payment_term_days' => 'getPaymentTermDays',
'individual_agreements' => 'getIndividualAgreements'
];
/**
@@ -314,6 +392,7 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
$this->setIfExists('name', $data ?? [], null);
$this->setIfExists('crm_status', $data ?? [], null);
$this->setIfExists('facility_type', $data ?? [], null);
$this->setIfExists('website', $data ?? [], null);
$this->setIfExists('street', $data ?? [], null);
$this->setIfExists('postal_code', $data ?? [], null);
$this->setIfExists('city', $data ?? [], null);
@@ -322,6 +401,18 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
$this->setIfExists('billing_postal_code', $data ?? [], null);
$this->setIfExists('billing_city', $data ?? [], null);
$this->setIfExists('billing_country', $data ?? [], null);
$this->setIfExists('follow_up_due_date', $data ?? [], null);
$this->setIfExists('billing_rate', $data ?? [], null);
$this->setIfExists('night_surcharge_percent', $data ?? [], null);
$this->setIfExists('saturday_surcharge_percent', $data ?? [], null);
$this->setIfExists('sunday_surcharge_percent', $data ?? [], null);
$this->setIfExists('holiday_surcharge_percent', $data ?? [], null);
$this->setIfExists('travel_cost_rate', $data ?? [], null);
$this->setIfExists('minimum_hours', $data ?? [], null);
$this->setIfExists('break_policy', $data ?? [], null);
$this->setIfExists('billing_interval', $data ?? [], null);
$this->setIfExists('payment_term_days', $data ?? [], null);
$this->setIfExists('individual_agreements', $data ?? [], null);
}
/**
@@ -495,6 +586,40 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
return $this;
}
/**
* Gets website
*
* @return string|null
*/
public function getWebsite()
{
return $this->container['website'];
}
/**
* Sets website
*
* @param string|null $website website
*
* @return self
*/
public function setWebsite($website)
{
if (is_null($website)) {
array_push($this->openAPINullablesSetToNull, 'website');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('website', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['website'] = $website;
return $this;
}
/**
* Gets street
*
@@ -766,6 +891,414 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
return $this;
}
/**
* Gets follow_up_due_date
*
* @return \DateTime|null
*/
public function getFollowUpDueDate()
{
return $this->container['follow_up_due_date'];
}
/**
* Sets follow_up_due_date
*
* @param \DateTime|null $follow_up_due_date follow_up_due_date
*
* @return self
*/
public function setFollowUpDueDate($follow_up_due_date)
{
if (is_null($follow_up_due_date)) {
array_push($this->openAPINullablesSetToNull, 'follow_up_due_date');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('follow_up_due_date', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['follow_up_due_date'] = $follow_up_due_date;
return $this;
}
/**
* Gets billing_rate
*
* @return float|null
*/
public function getBillingRate()
{
return $this->container['billing_rate'];
}
/**
* Sets billing_rate
*
* @param float|null $billing_rate billing_rate
*
* @return self
*/
public function setBillingRate($billing_rate)
{
if (is_null($billing_rate)) {
array_push($this->openAPINullablesSetToNull, 'billing_rate');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('billing_rate', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['billing_rate'] = $billing_rate;
return $this;
}
/**
* Gets night_surcharge_percent
*
* @return float|null
*/
public function getNightSurchargePercent()
{
return $this->container['night_surcharge_percent'];
}
/**
* Sets night_surcharge_percent
*
* @param float|null $night_surcharge_percent night_surcharge_percent
*
* @return self
*/
public function setNightSurchargePercent($night_surcharge_percent)
{
if (is_null($night_surcharge_percent)) {
array_push($this->openAPINullablesSetToNull, 'night_surcharge_percent');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('night_surcharge_percent', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['night_surcharge_percent'] = $night_surcharge_percent;
return $this;
}
/**
* Gets saturday_surcharge_percent
*
* @return float|null
*/
public function getSaturdaySurchargePercent()
{
return $this->container['saturday_surcharge_percent'];
}
/**
* Sets saturday_surcharge_percent
*
* @param float|null $saturday_surcharge_percent saturday_surcharge_percent
*
* @return self
*/
public function setSaturdaySurchargePercent($saturday_surcharge_percent)
{
if (is_null($saturday_surcharge_percent)) {
array_push($this->openAPINullablesSetToNull, 'saturday_surcharge_percent');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('saturday_surcharge_percent', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['saturday_surcharge_percent'] = $saturday_surcharge_percent;
return $this;
}
/**
* Gets sunday_surcharge_percent
*
* @return float|null
*/
public function getSundaySurchargePercent()
{
return $this->container['sunday_surcharge_percent'];
}
/**
* Sets sunday_surcharge_percent
*
* @param float|null $sunday_surcharge_percent sunday_surcharge_percent
*
* @return self
*/
public function setSundaySurchargePercent($sunday_surcharge_percent)
{
if (is_null($sunday_surcharge_percent)) {
array_push($this->openAPINullablesSetToNull, 'sunday_surcharge_percent');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('sunday_surcharge_percent', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['sunday_surcharge_percent'] = $sunday_surcharge_percent;
return $this;
}
/**
* Gets holiday_surcharge_percent
*
* @return float|null
*/
public function getHolidaySurchargePercent()
{
return $this->container['holiday_surcharge_percent'];
}
/**
* Sets holiday_surcharge_percent
*
* @param float|null $holiday_surcharge_percent holiday_surcharge_percent
*
* @return self
*/
public function setHolidaySurchargePercent($holiday_surcharge_percent)
{
if (is_null($holiday_surcharge_percent)) {
array_push($this->openAPINullablesSetToNull, 'holiday_surcharge_percent');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('holiday_surcharge_percent', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['holiday_surcharge_percent'] = $holiday_surcharge_percent;
return $this;
}
/**
* Gets travel_cost_rate
*
* @return float|null
*/
public function getTravelCostRate()
{
return $this->container['travel_cost_rate'];
}
/**
* Sets travel_cost_rate
*
* @param float|null $travel_cost_rate travel_cost_rate
*
* @return self
*/
public function setTravelCostRate($travel_cost_rate)
{
if (is_null($travel_cost_rate)) {
array_push($this->openAPINullablesSetToNull, 'travel_cost_rate');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('travel_cost_rate', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['travel_cost_rate'] = $travel_cost_rate;
return $this;
}
/**
* Gets minimum_hours
*
* @return float|null
*/
public function getMinimumHours()
{
return $this->container['minimum_hours'];
}
/**
* Sets minimum_hours
*
* @param float|null $minimum_hours minimum_hours
*
* @return self
*/
public function setMinimumHours($minimum_hours)
{
if (is_null($minimum_hours)) {
array_push($this->openAPINullablesSetToNull, 'minimum_hours');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('minimum_hours', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['minimum_hours'] = $minimum_hours;
return $this;
}
/**
* Gets break_policy
*
* @return string|null
*/
public function getBreakPolicy()
{
return $this->container['break_policy'];
}
/**
* Sets break_policy
*
* @param string|null $break_policy break_policy
*
* @return self
*/
public function setBreakPolicy($break_policy)
{
if (is_null($break_policy)) {
array_push($this->openAPINullablesSetToNull, 'break_policy');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('break_policy', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['break_policy'] = $break_policy;
return $this;
}
/**
* Gets billing_interval
*
* @return string|null
*/
public function getBillingInterval()
{
return $this->container['billing_interval'];
}
/**
* Sets billing_interval
*
* @param string|null $billing_interval billing_interval
*
* @return self
*/
public function setBillingInterval($billing_interval)
{
if (is_null($billing_interval)) {
array_push($this->openAPINullablesSetToNull, 'billing_interval');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('billing_interval', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['billing_interval'] = $billing_interval;
return $this;
}
/**
* Gets payment_term_days
*
* @return int|null
*/
public function getPaymentTermDays()
{
return $this->container['payment_term_days'];
}
/**
* Sets payment_term_days
*
* @param int|null $payment_term_days payment_term_days
*
* @return self
*/
public function setPaymentTermDays($payment_term_days)
{
if (is_null($payment_term_days)) {
array_push($this->openAPINullablesSetToNull, 'payment_term_days');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('payment_term_days', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['payment_term_days'] = $payment_term_days;
return $this;
}
/**
* Gets individual_agreements
*
* @return string|null
*/
public function getIndividualAgreements()
{
return $this->container['individual_agreements'];
}
/**
* Sets individual_agreements
*
* @param string|null $individual_agreements individual_agreements
*
* @return self
*/
public function setIndividualAgreements($individual_agreements)
{
if (is_null($individual_agreements)) {
array_push($this->openAPINullablesSetToNull, 'individual_agreements');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('individual_agreements', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['individual_agreements'] = $individual_agreements;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@@ -0,0 +1,98 @@
<?php
/**
* ModuleType
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \OmsorgCoreClient\ObjectSerializer;
/**
* ModuleType Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class ModuleType
{
/**
* Possible values of this enum
*/
public const EMPLOYEES = 'Employees';
public const FACILITIES = 'Facilities';
public const CONTRACTS = 'Contracts';
public const ORDERS = 'Orders';
public const TIME_ENTRIES = 'TimeEntries';
public const INVOICES = 'Invoices';
public const RECRUITING = 'Recruiting';
public const CONTROLLING = 'Controlling';
public const USER_MANAGEMENT = 'UserManagement';
public const AUDIT_LOG = 'AuditLog';
public const DOCUMENTS = 'Documents';
public const USERS = 'Users';
public const CONFIGURATION = 'Configuration';
public const ABSENCES = 'Absences';
/**
* Gets allowable values of the enum
* @return string[]
*/
public static function getAllowableEnumValues()
{
return [
self::EMPLOYEES,
self::FACILITIES,
self::CONTRACTS,
self::ORDERS,
self::TIME_ENTRIES,
self::INVOICES,
self::RECRUITING,
self::CONTROLLING,
self::USER_MANAGEMENT,
self::AUDIT_LOG,
self::DOCUMENTS,
self::USERS,
self::CONFIGURATION,
self::ABSENCES
];
}
}
@@ -0,0 +1,77 @@
<?php
/**
* PermissionAction
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \OmsorgCoreClient\ObjectSerializer;
/**
* PermissionAction Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class PermissionAction
{
/**
* Possible values of this enum
*/
public const VIEW = 'View';
public const CREATE = 'Create';
public const EDIT = 'Edit';
public const DELETE = 'Delete';
public const EXPORT = 'Export';
public const APPROVE = 'Approve';
public const RECOVER = 'Recover';
/**
* Gets allowable values of the enum
* @return string[]
*/
public static function getAllowableEnumValues()
{
return [
self::VIEW,
self::CREATE,
self::EDIT,
self::DELETE,
self::EXPORT,
self::APPROVE,
self::RECOVER
];
}
}
@@ -57,8 +57,9 @@ class PermissionDto implements ModelInterface, ArrayAccess, \JsonSerializable
* @var string[]
*/
protected static $openAPITypes = [
'module' => 'string',
'action' => 'string'
'module' => '\OmsorgCoreClient\Model\ModuleType',
'action' => '\OmsorgCoreClient\Model\PermissionAction',
'scope' => '\OmsorgCoreClient\Model\PermissionScope'
];
/**
@@ -70,7 +71,8 @@ class PermissionDto implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPIFormats = [
'module' => null,
'action' => null
'action' => null,
'scope' => null
];
/**
@@ -79,8 +81,9 @@ class PermissionDto implements ModelInterface, ArrayAccess, \JsonSerializable
* @var boolean[]
*/
protected static array $openAPINullables = [
'module' => true,
'action' => true
'module' => false,
'action' => false,
'scope' => false
];
/**
@@ -170,7 +173,8 @@ class PermissionDto implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $attributeMap = [
'module' => 'module',
'action' => 'action'
'action' => 'action',
'scope' => 'scope'
];
/**
@@ -180,7 +184,8 @@ class PermissionDto implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $setters = [
'module' => 'setModule',
'action' => 'setAction'
'action' => 'setAction',
'scope' => 'setScope'
];
/**
@@ -190,7 +195,8 @@ class PermissionDto implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $getters = [
'module' => 'getModule',
'action' => 'getAction'
'action' => 'getAction',
'scope' => 'getScope'
];
/**
@@ -252,6 +258,7 @@ class PermissionDto implements ModelInterface, ArrayAccess, \JsonSerializable
{
$this->setIfExists('module', $data ?? [], null);
$this->setIfExists('action', $data ?? [], null);
$this->setIfExists('scope', $data ?? [], null);
}
/**
@@ -299,7 +306,7 @@ class PermissionDto implements ModelInterface, ArrayAccess, \JsonSerializable
/**
* Gets module
*
* @return string|null
* @return \OmsorgCoreClient\Model\ModuleType|null
*/
public function getModule()
{
@@ -309,21 +316,14 @@ class PermissionDto implements ModelInterface, ArrayAccess, \JsonSerializable
/**
* Sets module
*
* @param string|null $module module
* @param \OmsorgCoreClient\Model\ModuleType|null $module module
*
* @return self
*/
public function setModule($module)
{
if (is_null($module)) {
array_push($this->openAPINullablesSetToNull, 'module');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('module', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
throw new \InvalidArgumentException('non-nullable module cannot be null');
}
$this->container['module'] = $module;
@@ -333,7 +333,7 @@ class PermissionDto implements ModelInterface, ArrayAccess, \JsonSerializable
/**
* Gets action
*
* @return string|null
* @return \OmsorgCoreClient\Model\PermissionAction|null
*/
public function getAction()
{
@@ -343,26 +343,46 @@ class PermissionDto implements ModelInterface, ArrayAccess, \JsonSerializable
/**
* Sets action
*
* @param string|null $action action
* @param \OmsorgCoreClient\Model\PermissionAction|null $action action
*
* @return self
*/
public function setAction($action)
{
if (is_null($action)) {
array_push($this->openAPINullablesSetToNull, 'action');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('action', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
throw new \InvalidArgumentException('non-nullable action cannot be null');
}
$this->container['action'] = $action;
return $this;
}
/**
* Gets scope
*
* @return \OmsorgCoreClient\Model\PermissionScope|null
*/
public function getScope()
{
return $this->container['scope'];
}
/**
* Sets scope
*
* @param \OmsorgCoreClient\Model\PermissionScope|null $scope scope
*
* @return self
*/
public function setScope($scope)
{
if (is_null($scope)) {
throw new \InvalidArgumentException('non-nullable scope cannot be null');
}
$this->container['scope'] = $scope;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@@ -0,0 +1,62 @@
<?php
/**
* PermissionEffect
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \OmsorgCoreClient\ObjectSerializer;
/**
* PermissionEffect Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class PermissionEffect
{
/**
* Possible values of this enum
*/
public const GRANT = 'Grant';
public const REVOKE = 'Revoke';
/**
* Gets allowable values of the enum
* @return string[]
*/
public static function getAllowableEnumValues()
{
return [
self::GRANT,
self::REVOKE
];
}
}
@@ -0,0 +1,62 @@
<?php
/**
* PermissionScope
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \OmsorgCoreClient\ObjectSerializer;
/**
* PermissionScope Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class PermissionScope
{
/**
* Possible values of this enum
*/
public const ALL = 'All';
public const OWN = 'Own';
/**
* Gets allowable values of the enum
* @return string[]
*/
public static function getAllowableEnumValues()
{
return [
self::ALL,
self::OWN
];
}
}
@@ -0,0 +1,450 @@
<?php
/**
* TimeEntryDecisionRequest
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* TimeEntryDecisionRequest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class TimeEntryDecisionRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'TimeEntryDecisionRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'status_id' => 'string',
'admin_note' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'status_id' => 'uuid',
'admin_note' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'status_id' => false,
'admin_note' => true
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'status_id' => 'statusId',
'admin_note' => 'adminNote'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'status_id' => 'setStatusId',
'admin_note' => 'setAdminNote'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'status_id' => 'getStatusId',
'admin_note' => 'getAdminNote'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('status_id', $data ?? [], null);
$this->setIfExists('admin_note', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets status_id
*
* @return string|null
*/
public function getStatusId()
{
return $this->container['status_id'];
}
/**
* Sets status_id
*
* @param string|null $status_id status_id
*
* @return self
*/
public function setStatusId($status_id)
{
if (is_null($status_id)) {
throw new \InvalidArgumentException('non-nullable status_id cannot be null');
}
$this->container['status_id'] = $status_id;
return $this;
}
/**
* Gets admin_note
*
* @return string|null
*/
public function getAdminNote()
{
return $this->container['admin_note'];
}
/**
* Sets admin_note
*
* @param string|null $admin_note admin_note
*
* @return self
*/
public function setAdminNote($admin_note)
{
if (is_null($admin_note)) {
array_push($this->openAPINullablesSetToNull, 'admin_note');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('admin_note', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['admin_note'] = $admin_note;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,518 @@
<?php
/**
* TimeEntryResponsePagedResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* TimeEntryResponsePagedResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class TimeEntryResponsePagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'TimeEntryResponsePagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'items' => '\OmsorgCoreClient\Model\TimeEntryResponse[]',
'total_count' => 'int',
'page' => 'int',
'page_size' => 'int'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'items' => null,
'total_count' => 'int32',
'page' => 'int32',
'page_size' => 'int32'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'items' => true,
'total_count' => false,
'page' => false,
'page_size' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'items' => 'items',
'total_count' => 'totalCount',
'page' => 'page',
'page_size' => 'pageSize'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'items' => 'setItems',
'total_count' => 'setTotalCount',
'page' => 'setPage',
'page_size' => 'setPageSize'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'items' => 'getItems',
'total_count' => 'getTotalCount',
'page' => 'getPage',
'page_size' => 'getPageSize'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('items', $data ?? [], null);
$this->setIfExists('total_count', $data ?? [], null);
$this->setIfExists('page', $data ?? [], null);
$this->setIfExists('page_size', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets items
*
* @return \OmsorgCoreClient\Model\TimeEntryResponse[]|null
*/
public function getItems()
{
return $this->container['items'];
}
/**
* Sets items
*
* @param \OmsorgCoreClient\Model\TimeEntryResponse[]|null $items items
*
* @return self
*/
public function setItems($items)
{
if (is_null($items)) {
array_push($this->openAPINullablesSetToNull, 'items');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('items', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['items'] = $items;
return $this;
}
/**
* Gets total_count
*
* @return int|null
*/
public function getTotalCount()
{
return $this->container['total_count'];
}
/**
* Sets total_count
*
* @param int|null $total_count total_count
*
* @return self
*/
public function setTotalCount($total_count)
{
if (is_null($total_count)) {
throw new \InvalidArgumentException('non-nullable total_count cannot be null');
}
$this->container['total_count'] = $total_count;
return $this;
}
/**
* Gets page
*
* @return int|null
*/
public function getPage()
{
return $this->container['page'];
}
/**
* Sets page
*
* @param int|null $page page
*
* @return self
*/
public function setPage($page)
{
if (is_null($page)) {
throw new \InvalidArgumentException('non-nullable page cannot be null');
}
$this->container['page'] = $page;
return $this;
}
/**
* Gets page_size
*
* @return int|null
*/
public function getPageSize()
{
return $this->container['page_size'];
}
/**
* Sets page_size
*
* @param int|null $page_size page_size
*
* @return self
*/
public function setPageSize($page_size)
{
if (is_null($page_size)) {
throw new \InvalidArgumentException('non-nullable page_size cannot be null');
}
$this->container['page_size'] = $page_size;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,491 @@
<?php
/**
* TrashAbsenceResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* TrashAbsenceResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class TrashAbsenceResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'TrashAbsenceResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'type' => 'string',
'deleted_at' => '\DateTime'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'id' => 'uuid',
'type' => null,
'deleted_at' => 'date-time'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'type' => true,
'deleted_at' => true
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'id' => 'id',
'type' => 'type',
'deleted_at' => 'deletedAt'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'type' => 'setType',
'deleted_at' => 'setDeletedAt'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'type' => 'getType',
'deleted_at' => 'getDeletedAt'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('type', $data ?? [], null);
$this->setIfExists('deleted_at', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets id
*
* @return string|null
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string|null $id id
*
* @return self
*/
public function setId($id)
{
if (is_null($id)) {
throw new \InvalidArgumentException('non-nullable id cannot be null');
}
$this->container['id'] = $id;
return $this;
}
/**
* Gets type
*
* @return string|null
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string|null $type type
*
* @return self
*/
public function setType($type)
{
if (is_null($type)) {
array_push($this->openAPINullablesSetToNull, 'type');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('type', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['type'] = $type;
return $this;
}
/**
* Gets deleted_at
*
* @return \DateTime|null
*/
public function getDeletedAt()
{
return $this->container['deleted_at'];
}
/**
* Sets deleted_at
*
* @param \DateTime|null $deleted_at deleted_at
*
* @return self
*/
public function setDeletedAt($deleted_at)
{
if (is_null($deleted_at)) {
array_push($this->openAPINullablesSetToNull, 'deleted_at');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('deleted_at', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['deleted_at'] = $deleted_at;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,491 @@
<?php
/**
* TrashContractResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* TrashContractResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class TrashContractResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'TrashContractResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'contract_type' => 'string',
'deleted_at' => '\DateTime'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'id' => 'uuid',
'contract_type' => null,
'deleted_at' => 'date-time'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'contract_type' => true,
'deleted_at' => true
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'id' => 'id',
'contract_type' => 'contractType',
'deleted_at' => 'deletedAt'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'contract_type' => 'setContractType',
'deleted_at' => 'setDeletedAt'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'contract_type' => 'getContractType',
'deleted_at' => 'getDeletedAt'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('contract_type', $data ?? [], null);
$this->setIfExists('deleted_at', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets id
*
* @return string|null
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string|null $id id
*
* @return self
*/
public function setId($id)
{
if (is_null($id)) {
throw new \InvalidArgumentException('non-nullable id cannot be null');
}
$this->container['id'] = $id;
return $this;
}
/**
* Gets contract_type
*
* @return string|null
*/
public function getContractType()
{
return $this->container['contract_type'];
}
/**
* Sets contract_type
*
* @param string|null $contract_type contract_type
*
* @return self
*/
public function setContractType($contract_type)
{
if (is_null($contract_type)) {
array_push($this->openAPINullablesSetToNull, 'contract_type');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('contract_type', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['contract_type'] = $contract_type;
return $this;
}
/**
* Gets deleted_at
*
* @return \DateTime|null
*/
public function getDeletedAt()
{
return $this->container['deleted_at'];
}
/**
* Sets deleted_at
*
* @param \DateTime|null $deleted_at deleted_at
*
* @return self
*/
public function setDeletedAt($deleted_at)
{
if (is_null($deleted_at)) {
array_push($this->openAPINullablesSetToNull, 'deleted_at');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('deleted_at', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['deleted_at'] = $deleted_at;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,532 @@
<?php
/**
* TrashEmployeeResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* TrashEmployeeResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class TrashEmployeeResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'TrashEmployeeResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'first_name' => 'string',
'last_name' => 'string',
'deleted_at' => '\DateTime'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'id' => 'uuid',
'first_name' => null,
'last_name' => null,
'deleted_at' => 'date-time'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'first_name' => true,
'last_name' => true,
'deleted_at' => true
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'id' => 'id',
'first_name' => 'firstName',
'last_name' => 'lastName',
'deleted_at' => 'deletedAt'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'first_name' => 'setFirstName',
'last_name' => 'setLastName',
'deleted_at' => 'setDeletedAt'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'first_name' => 'getFirstName',
'last_name' => 'getLastName',
'deleted_at' => 'getDeletedAt'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('first_name', $data ?? [], null);
$this->setIfExists('last_name', $data ?? [], null);
$this->setIfExists('deleted_at', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets id
*
* @return string|null
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string|null $id id
*
* @return self
*/
public function setId($id)
{
if (is_null($id)) {
throw new \InvalidArgumentException('non-nullable id cannot be null');
}
$this->container['id'] = $id;
return $this;
}
/**
* Gets first_name
*
* @return string|null
*/
public function getFirstName()
{
return $this->container['first_name'];
}
/**
* Sets first_name
*
* @param string|null $first_name first_name
*
* @return self
*/
public function setFirstName($first_name)
{
if (is_null($first_name)) {
array_push($this->openAPINullablesSetToNull, 'first_name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('first_name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['first_name'] = $first_name;
return $this;
}
/**
* Gets last_name
*
* @return string|null
*/
public function getLastName()
{
return $this->container['last_name'];
}
/**
* Sets last_name
*
* @param string|null $last_name last_name
*
* @return self
*/
public function setLastName($last_name)
{
if (is_null($last_name)) {
array_push($this->openAPINullablesSetToNull, 'last_name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('last_name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['last_name'] = $last_name;
return $this;
}
/**
* Gets deleted_at
*
* @return \DateTime|null
*/
public function getDeletedAt()
{
return $this->container['deleted_at'];
}
/**
* Sets deleted_at
*
* @param \DateTime|null $deleted_at deleted_at
*
* @return self
*/
public function setDeletedAt($deleted_at)
{
if (is_null($deleted_at)) {
array_push($this->openAPINullablesSetToNull, 'deleted_at');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('deleted_at', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['deleted_at'] = $deleted_at;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,525 @@
<?php
/**
* TrashFacilityContactResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* TrashFacilityContactResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class TrashFacilityContactResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'TrashFacilityContactResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'facility_id' => 'string',
'name' => 'string',
'deleted_at' => '\DateTime'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'id' => 'uuid',
'facility_id' => 'uuid',
'name' => null,
'deleted_at' => 'date-time'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'facility_id' => false,
'name' => true,
'deleted_at' => true
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'id' => 'id',
'facility_id' => 'facilityId',
'name' => 'name',
'deleted_at' => 'deletedAt'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'facility_id' => 'setFacilityId',
'name' => 'setName',
'deleted_at' => 'setDeletedAt'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'facility_id' => 'getFacilityId',
'name' => 'getName',
'deleted_at' => 'getDeletedAt'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('facility_id', $data ?? [], null);
$this->setIfExists('name', $data ?? [], null);
$this->setIfExists('deleted_at', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets id
*
* @return string|null
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string|null $id id
*
* @return self
*/
public function setId($id)
{
if (is_null($id)) {
throw new \InvalidArgumentException('non-nullable id cannot be null');
}
$this->container['id'] = $id;
return $this;
}
/**
* Gets facility_id
*
* @return string|null
*/
public function getFacilityId()
{
return $this->container['facility_id'];
}
/**
* Sets facility_id
*
* @param string|null $facility_id facility_id
*
* @return self
*/
public function setFacilityId($facility_id)
{
if (is_null($facility_id)) {
throw new \InvalidArgumentException('non-nullable facility_id cannot be null');
}
$this->container['facility_id'] = $facility_id;
return $this;
}
/**
* Gets name
*
* @return string|null
*/
public function getName()
{
return $this->container['name'];
}
/**
* Sets name
*
* @param string|null $name name
*
* @return self
*/
public function setName($name)
{
if (is_null($name)) {
array_push($this->openAPINullablesSetToNull, 'name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['name'] = $name;
return $this;
}
/**
* Gets deleted_at
*
* @return \DateTime|null
*/
public function getDeletedAt()
{
return $this->container['deleted_at'];
}
/**
* Sets deleted_at
*
* @param \DateTime|null $deleted_at deleted_at
*
* @return self
*/
public function setDeletedAt($deleted_at)
{
if (is_null($deleted_at)) {
array_push($this->openAPINullablesSetToNull, 'deleted_at');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('deleted_at', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['deleted_at'] = $deleted_at;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,525 @@
<?php
/**
* TrashFacilityQualificationRateResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* TrashFacilityQualificationRateResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class TrashFacilityQualificationRateResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'TrashFacilityQualificationRateResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'facility_id' => 'string',
'qualification' => 'string',
'deleted_at' => '\DateTime'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'id' => 'uuid',
'facility_id' => 'uuid',
'qualification' => null,
'deleted_at' => 'date-time'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'facility_id' => false,
'qualification' => true,
'deleted_at' => true
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'id' => 'id',
'facility_id' => 'facilityId',
'qualification' => 'qualification',
'deleted_at' => 'deletedAt'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'facility_id' => 'setFacilityId',
'qualification' => 'setQualification',
'deleted_at' => 'setDeletedAt'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'facility_id' => 'getFacilityId',
'qualification' => 'getQualification',
'deleted_at' => 'getDeletedAt'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('facility_id', $data ?? [], null);
$this->setIfExists('qualification', $data ?? [], null);
$this->setIfExists('deleted_at', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets id
*
* @return string|null
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string|null $id id
*
* @return self
*/
public function setId($id)
{
if (is_null($id)) {
throw new \InvalidArgumentException('non-nullable id cannot be null');
}
$this->container['id'] = $id;
return $this;
}
/**
* Gets facility_id
*
* @return string|null
*/
public function getFacilityId()
{
return $this->container['facility_id'];
}
/**
* Sets facility_id
*
* @param string|null $facility_id facility_id
*
* @return self
*/
public function setFacilityId($facility_id)
{
if (is_null($facility_id)) {
throw new \InvalidArgumentException('non-nullable facility_id cannot be null');
}
$this->container['facility_id'] = $facility_id;
return $this;
}
/**
* Gets qualification
*
* @return string|null
*/
public function getQualification()
{
return $this->container['qualification'];
}
/**
* Sets qualification
*
* @param string|null $qualification qualification
*
* @return self
*/
public function setQualification($qualification)
{
if (is_null($qualification)) {
array_push($this->openAPINullablesSetToNull, 'qualification');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('qualification', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['qualification'] = $qualification;
return $this;
}
/**
* Gets deleted_at
*
* @return \DateTime|null
*/
public function getDeletedAt()
{
return $this->container['deleted_at'];
}
/**
* Sets deleted_at
*
* @param \DateTime|null $deleted_at deleted_at
*
* @return self
*/
public function setDeletedAt($deleted_at)
{
if (is_null($deleted_at)) {
array_push($this->openAPINullablesSetToNull, 'deleted_at');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('deleted_at', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['deleted_at'] = $deleted_at;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,491 @@
<?php
/**
* TrashFacilityResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* TrashFacilityResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class TrashFacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'TrashFacilityResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'name' => 'string',
'deleted_at' => '\DateTime'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'id' => 'uuid',
'name' => null,
'deleted_at' => 'date-time'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'name' => true,
'deleted_at' => true
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'id' => 'id',
'name' => 'name',
'deleted_at' => 'deletedAt'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'name' => 'setName',
'deleted_at' => 'setDeletedAt'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'name' => 'getName',
'deleted_at' => 'getDeletedAt'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('name', $data ?? [], null);
$this->setIfExists('deleted_at', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets id
*
* @return string|null
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string|null $id id
*
* @return self
*/
public function setId($id)
{
if (is_null($id)) {
throw new \InvalidArgumentException('non-nullable id cannot be null');
}
$this->container['id'] = $id;
return $this;
}
/**
* Gets name
*
* @return string|null
*/
public function getName()
{
return $this->container['name'];
}
/**
* Sets name
*
* @param string|null $name name
*
* @return self
*/
public function setName($name)
{
if (is_null($name)) {
array_push($this->openAPINullablesSetToNull, 'name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['name'] = $name;
return $this;
}
/**
* Gets deleted_at
*
* @return \DateTime|null
*/
public function getDeletedAt()
{
return $this->container['deleted_at'];
}
/**
* Sets deleted_at
*
* @param \DateTime|null $deleted_at deleted_at
*
* @return self
*/
public function setDeletedAt($deleted_at)
{
if (is_null($deleted_at)) {
array_push($this->openAPINullablesSetToNull, 'deleted_at');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('deleted_at', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['deleted_at'] = $deleted_at;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,491 @@
<?php
/**
* TrashOrderResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* TrashOrderResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class TrashOrderResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'TrashOrderResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'required_qualification' => 'string',
'deleted_at' => '\DateTime'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'id' => 'uuid',
'required_qualification' => null,
'deleted_at' => 'date-time'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'required_qualification' => true,
'deleted_at' => true
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'id' => 'id',
'required_qualification' => 'requiredQualification',
'deleted_at' => 'deletedAt'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'required_qualification' => 'setRequiredQualification',
'deleted_at' => 'setDeletedAt'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'required_qualification' => 'getRequiredQualification',
'deleted_at' => 'getDeletedAt'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('required_qualification', $data ?? [], null);
$this->setIfExists('deleted_at', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets id
*
* @return string|null
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string|null $id id
*
* @return self
*/
public function setId($id)
{
if (is_null($id)) {
throw new \InvalidArgumentException('non-nullable id cannot be null');
}
$this->container['id'] = $id;
return $this;
}
/**
* Gets required_qualification
*
* @return string|null
*/
public function getRequiredQualification()
{
return $this->container['required_qualification'];
}
/**
* Sets required_qualification
*
* @param string|null $required_qualification required_qualification
*
* @return self
*/
public function setRequiredQualification($required_qualification)
{
if (is_null($required_qualification)) {
array_push($this->openAPINullablesSetToNull, 'required_qualification');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('required_qualification', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['required_qualification'] = $required_qualification;
return $this;
}
/**
* Gets deleted_at
*
* @return \DateTime|null
*/
public function getDeletedAt()
{
return $this->container['deleted_at'];
}
/**
* Sets deleted_at
*
* @param \DateTime|null $deleted_at deleted_at
*
* @return self
*/
public function setDeletedAt($deleted_at)
{
if (is_null($deleted_at)) {
array_push($this->openAPINullablesSetToNull, 'deleted_at');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('deleted_at', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['deleted_at'] = $deleted_at;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,484 @@
<?php
/**
* TrashTimeEntryResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* TrashTimeEntryResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class TrashTimeEntryResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'TrashTimeEntryResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'date' => '\DateTime',
'deleted_at' => '\DateTime'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'id' => 'uuid',
'date' => 'date',
'deleted_at' => 'date-time'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'date' => false,
'deleted_at' => true
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'id' => 'id',
'date' => 'date',
'deleted_at' => 'deletedAt'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'date' => 'setDate',
'deleted_at' => 'setDeletedAt'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'date' => 'getDate',
'deleted_at' => 'getDeletedAt'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('date', $data ?? [], null);
$this->setIfExists('deleted_at', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets id
*
* @return string|null
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string|null $id id
*
* @return self
*/
public function setId($id)
{
if (is_null($id)) {
throw new \InvalidArgumentException('non-nullable id cannot be null');
}
$this->container['id'] = $id;
return $this;
}
/**
* Gets date
*
* @return \DateTime|null
*/
public function getDate()
{
return $this->container['date'];
}
/**
* Sets date
*
* @param \DateTime|null $date date
*
* @return self
*/
public function setDate($date)
{
if (is_null($date)) {
throw new \InvalidArgumentException('non-nullable date cannot be null');
}
$this->container['date'] = $date;
return $this;
}
/**
* Gets deleted_at
*
* @return \DateTime|null
*/
public function getDeletedAt()
{
return $this->container['deleted_at'];
}
/**
* Sets deleted_at
*
* @param \DateTime|null $deleted_at deleted_at
*
* @return self
*/
public function setDeletedAt($deleted_at)
{
if (is_null($deleted_at)) {
array_push($this->openAPINullablesSetToNull, 'deleted_at');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('deleted_at', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['deleted_at'] = $deleted_at;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,607 @@
<?php
/**
* UpdateAbsenceRequest
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* UpdateAbsenceRequest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class UpdateAbsenceRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'UpdateAbsenceRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'type' => 'string',
'start_date' => '\DateTime',
'end_date' => '\DateTime',
'reason' => 'string',
'substitute' => 'string',
'note' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'type' => null,
'start_date' => 'date',
'end_date' => 'date',
'reason' => null,
'substitute' => null,
'note' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'type' => true,
'start_date' => false,
'end_date' => false,
'reason' => true,
'substitute' => true,
'note' => true
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'type' => 'type',
'start_date' => 'startDate',
'end_date' => 'endDate',
'reason' => 'reason',
'substitute' => 'substitute',
'note' => 'note'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'type' => 'setType',
'start_date' => 'setStartDate',
'end_date' => 'setEndDate',
'reason' => 'setReason',
'substitute' => 'setSubstitute',
'note' => 'setNote'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'type' => 'getType',
'start_date' => 'getStartDate',
'end_date' => 'getEndDate',
'reason' => 'getReason',
'substitute' => 'getSubstitute',
'note' => 'getNote'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('type', $data ?? [], null);
$this->setIfExists('start_date', $data ?? [], null);
$this->setIfExists('end_date', $data ?? [], null);
$this->setIfExists('reason', $data ?? [], null);
$this->setIfExists('substitute', $data ?? [], null);
$this->setIfExists('note', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets type
*
* @return string|null
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string|null $type type
*
* @return self
*/
public function setType($type)
{
if (is_null($type)) {
array_push($this->openAPINullablesSetToNull, 'type');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('type', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['type'] = $type;
return $this;
}
/**
* Gets start_date
*
* @return \DateTime|null
*/
public function getStartDate()
{
return $this->container['start_date'];
}
/**
* Sets start_date
*
* @param \DateTime|null $start_date start_date
*
* @return self
*/
public function setStartDate($start_date)
{
if (is_null($start_date)) {
throw new \InvalidArgumentException('non-nullable start_date cannot be null');
}
$this->container['start_date'] = $start_date;
return $this;
}
/**
* Gets end_date
*
* @return \DateTime|null
*/
public function getEndDate()
{
return $this->container['end_date'];
}
/**
* Sets end_date
*
* @param \DateTime|null $end_date end_date
*
* @return self
*/
public function setEndDate($end_date)
{
if (is_null($end_date)) {
throw new \InvalidArgumentException('non-nullable end_date cannot be null');
}
$this->container['end_date'] = $end_date;
return $this;
}
/**
* Gets reason
*
* @return string|null
*/
public function getReason()
{
return $this->container['reason'];
}
/**
* Sets reason
*
* @param string|null $reason reason
*
* @return self
*/
public function setReason($reason)
{
if (is_null($reason)) {
array_push($this->openAPINullablesSetToNull, 'reason');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('reason', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['reason'] = $reason;
return $this;
}
/**
* Gets substitute
*
* @return string|null
*/
public function getSubstitute()
{
return $this->container['substitute'];
}
/**
* Sets substitute
*
* @param string|null $substitute substitute
*
* @return self
*/
public function setSubstitute($substitute)
{
if (is_null($substitute)) {
array_push($this->openAPINullablesSetToNull, 'substitute');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('substitute', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['substitute'] = $substitute;
return $this;
}
/**
* Gets note
*
* @return string|null
*/
public function getNote()
{
return $this->container['note'];
}
/**
* Sets note
*
* @param string|null $note note
*
* @return self
*/
public function setNote($note)
{
if (is_null($note)) {
array_push($this->openAPINullablesSetToNull, 'note');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('note', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['note'] = $note;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,498 @@
<?php
/**
* UpdateDocumentRequest
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* UpdateDocumentRequest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class UpdateDocumentRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'UpdateDocumentRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'category' => 'string',
'description' => 'string',
'file_name' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'category' => null,
'description' => null,
'file_name' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'category' => true,
'description' => true,
'file_name' => true
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'category' => 'category',
'description' => 'description',
'file_name' => 'fileName'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'category' => 'setCategory',
'description' => 'setDescription',
'file_name' => 'setFileName'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'category' => 'getCategory',
'description' => 'getDescription',
'file_name' => 'getFileName'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('category', $data ?? [], null);
$this->setIfExists('description', $data ?? [], null);
$this->setIfExists('file_name', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets category
*
* @return string|null
*/
public function getCategory()
{
return $this->container['category'];
}
/**
* Sets category
*
* @param string|null $category category
*
* @return self
*/
public function setCategory($category)
{
if (is_null($category)) {
array_push($this->openAPINullablesSetToNull, 'category');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('category', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['category'] = $category;
return $this;
}
/**
* Gets description
*
* @return string|null
*/
public function getDescription()
{
return $this->container['description'];
}
/**
* Sets description
*
* @param string|null $description description
*
* @return self
*/
public function setDescription($description)
{
if (is_null($description)) {
array_push($this->openAPINullablesSetToNull, 'description');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('description', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['description'] = $description;
return $this;
}
/**
* Gets file_name
*
* @return string|null
*/
public function getFileName()
{
return $this->container['file_name'];
}
/**
* Sets file_name
*
* @param string|null $file_name file_name
*
* @return self
*/
public function setFileName($file_name)
{
if (is_null($file_name)) {
array_push($this->openAPINullablesSetToNull, 'file_name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('file_name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['file_name'] = $file_name;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,450 @@
<?php
/**
* UpdateFacilityQualificationRateRequest
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* UpdateFacilityQualificationRateRequest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class UpdateFacilityQualificationRateRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'UpdateFacilityQualificationRateRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'qualification' => 'string',
'rate' => 'float'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'qualification' => null,
'rate' => 'double'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'qualification' => true,
'rate' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'qualification' => 'qualification',
'rate' => 'rate'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'qualification' => 'setQualification',
'rate' => 'setRate'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'qualification' => 'getQualification',
'rate' => 'getRate'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('qualification', $data ?? [], null);
$this->setIfExists('rate', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets qualification
*
* @return string|null
*/
public function getQualification()
{
return $this->container['qualification'];
}
/**
* Sets qualification
*
* @param string|null $qualification qualification
*
* @return self
*/
public function setQualification($qualification)
{
if (is_null($qualification)) {
array_push($this->openAPINullablesSetToNull, 'qualification');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('qualification', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['qualification'] = $qualification;
return $this;
}
/**
* Gets rate
*
* @return float|null
*/
public function getRate()
{
return $this->container['rate'];
}
/**
* Sets rate
*
* @param float|null $rate rate
*
* @return self
*/
public function setRate($rate)
{
if (is_null($rate)) {
throw new \InvalidArgumentException('non-nullable rate cannot be null');
}
$this->container['rate'] = $rate;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -60,6 +60,7 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'name' => 'string',
'crm_status' => 'string',
'facility_type' => 'string',
'website' => 'string',
'street' => 'string',
'postal_code' => 'string',
'city' => 'string',
@@ -67,7 +68,19 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'billing_street' => 'string',
'billing_postal_code' => 'string',
'billing_city' => 'string',
'billing_country' => 'string'
'billing_country' => 'string',
'follow_up_days' => 'int',
'billing_rate' => 'float',
'night_surcharge_percent' => 'float',
'saturday_surcharge_percent' => 'float',
'sunday_surcharge_percent' => 'float',
'holiday_surcharge_percent' => 'float',
'travel_cost_rate' => 'float',
'minimum_hours' => 'float',
'break_policy' => 'string',
'billing_interval' => 'string',
'payment_term_days' => 'int',
'individual_agreements' => 'string'
];
/**
@@ -81,6 +94,7 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'name' => null,
'crm_status' => null,
'facility_type' => null,
'website' => null,
'street' => null,
'postal_code' => null,
'city' => null,
@@ -88,7 +102,19 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'billing_street' => null,
'billing_postal_code' => null,
'billing_city' => null,
'billing_country' => null
'billing_country' => null,
'follow_up_days' => 'int32',
'billing_rate' => 'double',
'night_surcharge_percent' => 'double',
'saturday_surcharge_percent' => 'double',
'sunday_surcharge_percent' => 'double',
'holiday_surcharge_percent' => 'double',
'travel_cost_rate' => 'double',
'minimum_hours' => 'double',
'break_policy' => null,
'billing_interval' => null,
'payment_term_days' => 'int32',
'individual_agreements' => null
];
/**
@@ -100,6 +126,7 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'name' => true,
'crm_status' => true,
'facility_type' => true,
'website' => true,
'street' => true,
'postal_code' => true,
'city' => true,
@@ -107,7 +134,19 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'billing_street' => true,
'billing_postal_code' => true,
'billing_city' => true,
'billing_country' => true
'billing_country' => true,
'follow_up_days' => true,
'billing_rate' => true,
'night_surcharge_percent' => true,
'saturday_surcharge_percent' => true,
'sunday_surcharge_percent' => true,
'holiday_surcharge_percent' => true,
'travel_cost_rate' => true,
'minimum_hours' => true,
'break_policy' => true,
'billing_interval' => true,
'payment_term_days' => true,
'individual_agreements' => true
];
/**
@@ -199,6 +238,7 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'name' => 'name',
'crm_status' => 'crmStatus',
'facility_type' => 'facilityType',
'website' => 'website',
'street' => 'street',
'postal_code' => 'postalCode',
'city' => 'city',
@@ -206,7 +246,19 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'billing_street' => 'billingStreet',
'billing_postal_code' => 'billingPostalCode',
'billing_city' => 'billingCity',
'billing_country' => 'billingCountry'
'billing_country' => 'billingCountry',
'follow_up_days' => 'followUpDays',
'billing_rate' => 'billingRate',
'night_surcharge_percent' => 'nightSurchargePercent',
'saturday_surcharge_percent' => 'saturdaySurchargePercent',
'sunday_surcharge_percent' => 'sundaySurchargePercent',
'holiday_surcharge_percent' => 'holidaySurchargePercent',
'travel_cost_rate' => 'travelCostRate',
'minimum_hours' => 'minimumHours',
'break_policy' => 'breakPolicy',
'billing_interval' => 'billingInterval',
'payment_term_days' => 'paymentTermDays',
'individual_agreements' => 'individualAgreements'
];
/**
@@ -218,6 +270,7 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'name' => 'setName',
'crm_status' => 'setCrmStatus',
'facility_type' => 'setFacilityType',
'website' => 'setWebsite',
'street' => 'setStreet',
'postal_code' => 'setPostalCode',
'city' => 'setCity',
@@ -225,7 +278,19 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'billing_street' => 'setBillingStreet',
'billing_postal_code' => 'setBillingPostalCode',
'billing_city' => 'setBillingCity',
'billing_country' => 'setBillingCountry'
'billing_country' => 'setBillingCountry',
'follow_up_days' => 'setFollowUpDays',
'billing_rate' => 'setBillingRate',
'night_surcharge_percent' => 'setNightSurchargePercent',
'saturday_surcharge_percent' => 'setSaturdaySurchargePercent',
'sunday_surcharge_percent' => 'setSundaySurchargePercent',
'holiday_surcharge_percent' => 'setHolidaySurchargePercent',
'travel_cost_rate' => 'setTravelCostRate',
'minimum_hours' => 'setMinimumHours',
'break_policy' => 'setBreakPolicy',
'billing_interval' => 'setBillingInterval',
'payment_term_days' => 'setPaymentTermDays',
'individual_agreements' => 'setIndividualAgreements'
];
/**
@@ -237,6 +302,7 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'name' => 'getName',
'crm_status' => 'getCrmStatus',
'facility_type' => 'getFacilityType',
'website' => 'getWebsite',
'street' => 'getStreet',
'postal_code' => 'getPostalCode',
'city' => 'getCity',
@@ -244,7 +310,19 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'billing_street' => 'getBillingStreet',
'billing_postal_code' => 'getBillingPostalCode',
'billing_city' => 'getBillingCity',
'billing_country' => 'getBillingCountry'
'billing_country' => 'getBillingCountry',
'follow_up_days' => 'getFollowUpDays',
'billing_rate' => 'getBillingRate',
'night_surcharge_percent' => 'getNightSurchargePercent',
'saturday_surcharge_percent' => 'getSaturdaySurchargePercent',
'sunday_surcharge_percent' => 'getSundaySurchargePercent',
'holiday_surcharge_percent' => 'getHolidaySurchargePercent',
'travel_cost_rate' => 'getTravelCostRate',
'minimum_hours' => 'getMinimumHours',
'break_policy' => 'getBreakPolicy',
'billing_interval' => 'getBillingInterval',
'payment_term_days' => 'getPaymentTermDays',
'individual_agreements' => 'getIndividualAgreements'
];
/**
@@ -307,6 +385,7 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
$this->setIfExists('name', $data ?? [], null);
$this->setIfExists('crm_status', $data ?? [], null);
$this->setIfExists('facility_type', $data ?? [], null);
$this->setIfExists('website', $data ?? [], null);
$this->setIfExists('street', $data ?? [], null);
$this->setIfExists('postal_code', $data ?? [], null);
$this->setIfExists('city', $data ?? [], null);
@@ -315,6 +394,18 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
$this->setIfExists('billing_postal_code', $data ?? [], null);
$this->setIfExists('billing_city', $data ?? [], null);
$this->setIfExists('billing_country', $data ?? [], null);
$this->setIfExists('follow_up_days', $data ?? [], null);
$this->setIfExists('billing_rate', $data ?? [], null);
$this->setIfExists('night_surcharge_percent', $data ?? [], null);
$this->setIfExists('saturday_surcharge_percent', $data ?? [], null);
$this->setIfExists('sunday_surcharge_percent', $data ?? [], null);
$this->setIfExists('holiday_surcharge_percent', $data ?? [], null);
$this->setIfExists('travel_cost_rate', $data ?? [], null);
$this->setIfExists('minimum_hours', $data ?? [], null);
$this->setIfExists('break_policy', $data ?? [], null);
$this->setIfExists('billing_interval', $data ?? [], null);
$this->setIfExists('payment_term_days', $data ?? [], null);
$this->setIfExists('individual_agreements', $data ?? [], null);
}
/**
@@ -461,6 +552,40 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
return $this;
}
/**
* Gets website
*
* @return string|null
*/
public function getWebsite()
{
return $this->container['website'];
}
/**
* Sets website
*
* @param string|null $website website
*
* @return self
*/
public function setWebsite($website)
{
if (is_null($website)) {
array_push($this->openAPINullablesSetToNull, 'website');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('website', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['website'] = $website;
return $this;
}
/**
* Gets street
*
@@ -732,6 +857,414 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
return $this;
}
/**
* Gets follow_up_days
*
* @return int|null
*/
public function getFollowUpDays()
{
return $this->container['follow_up_days'];
}
/**
* Sets follow_up_days
*
* @param int|null $follow_up_days follow_up_days
*
* @return self
*/
public function setFollowUpDays($follow_up_days)
{
if (is_null($follow_up_days)) {
array_push($this->openAPINullablesSetToNull, 'follow_up_days');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('follow_up_days', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['follow_up_days'] = $follow_up_days;
return $this;
}
/**
* Gets billing_rate
*
* @return float|null
*/
public function getBillingRate()
{
return $this->container['billing_rate'];
}
/**
* Sets billing_rate
*
* @param float|null $billing_rate billing_rate
*
* @return self
*/
public function setBillingRate($billing_rate)
{
if (is_null($billing_rate)) {
array_push($this->openAPINullablesSetToNull, 'billing_rate');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('billing_rate', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['billing_rate'] = $billing_rate;
return $this;
}
/**
* Gets night_surcharge_percent
*
* @return float|null
*/
public function getNightSurchargePercent()
{
return $this->container['night_surcharge_percent'];
}
/**
* Sets night_surcharge_percent
*
* @param float|null $night_surcharge_percent night_surcharge_percent
*
* @return self
*/
public function setNightSurchargePercent($night_surcharge_percent)
{
if (is_null($night_surcharge_percent)) {
array_push($this->openAPINullablesSetToNull, 'night_surcharge_percent');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('night_surcharge_percent', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['night_surcharge_percent'] = $night_surcharge_percent;
return $this;
}
/**
* Gets saturday_surcharge_percent
*
* @return float|null
*/
public function getSaturdaySurchargePercent()
{
return $this->container['saturday_surcharge_percent'];
}
/**
* Sets saturday_surcharge_percent
*
* @param float|null $saturday_surcharge_percent saturday_surcharge_percent
*
* @return self
*/
public function setSaturdaySurchargePercent($saturday_surcharge_percent)
{
if (is_null($saturday_surcharge_percent)) {
array_push($this->openAPINullablesSetToNull, 'saturday_surcharge_percent');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('saturday_surcharge_percent', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['saturday_surcharge_percent'] = $saturday_surcharge_percent;
return $this;
}
/**
* Gets sunday_surcharge_percent
*
* @return float|null
*/
public function getSundaySurchargePercent()
{
return $this->container['sunday_surcharge_percent'];
}
/**
* Sets sunday_surcharge_percent
*
* @param float|null $sunday_surcharge_percent sunday_surcharge_percent
*
* @return self
*/
public function setSundaySurchargePercent($sunday_surcharge_percent)
{
if (is_null($sunday_surcharge_percent)) {
array_push($this->openAPINullablesSetToNull, 'sunday_surcharge_percent');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('sunday_surcharge_percent', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['sunday_surcharge_percent'] = $sunday_surcharge_percent;
return $this;
}
/**
* Gets holiday_surcharge_percent
*
* @return float|null
*/
public function getHolidaySurchargePercent()
{
return $this->container['holiday_surcharge_percent'];
}
/**
* Sets holiday_surcharge_percent
*
* @param float|null $holiday_surcharge_percent holiday_surcharge_percent
*
* @return self
*/
public function setHolidaySurchargePercent($holiday_surcharge_percent)
{
if (is_null($holiday_surcharge_percent)) {
array_push($this->openAPINullablesSetToNull, 'holiday_surcharge_percent');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('holiday_surcharge_percent', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['holiday_surcharge_percent'] = $holiday_surcharge_percent;
return $this;
}
/**
* Gets travel_cost_rate
*
* @return float|null
*/
public function getTravelCostRate()
{
return $this->container['travel_cost_rate'];
}
/**
* Sets travel_cost_rate
*
* @param float|null $travel_cost_rate travel_cost_rate
*
* @return self
*/
public function setTravelCostRate($travel_cost_rate)
{
if (is_null($travel_cost_rate)) {
array_push($this->openAPINullablesSetToNull, 'travel_cost_rate');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('travel_cost_rate', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['travel_cost_rate'] = $travel_cost_rate;
return $this;
}
/**
* Gets minimum_hours
*
* @return float|null
*/
public function getMinimumHours()
{
return $this->container['minimum_hours'];
}
/**
* Sets minimum_hours
*
* @param float|null $minimum_hours minimum_hours
*
* @return self
*/
public function setMinimumHours($minimum_hours)
{
if (is_null($minimum_hours)) {
array_push($this->openAPINullablesSetToNull, 'minimum_hours');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('minimum_hours', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['minimum_hours'] = $minimum_hours;
return $this;
}
/**
* Gets break_policy
*
* @return string|null
*/
public function getBreakPolicy()
{
return $this->container['break_policy'];
}
/**
* Sets break_policy
*
* @param string|null $break_policy break_policy
*
* @return self
*/
public function setBreakPolicy($break_policy)
{
if (is_null($break_policy)) {
array_push($this->openAPINullablesSetToNull, 'break_policy');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('break_policy', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['break_policy'] = $break_policy;
return $this;
}
/**
* Gets billing_interval
*
* @return string|null
*/
public function getBillingInterval()
{
return $this->container['billing_interval'];
}
/**
* Sets billing_interval
*
* @param string|null $billing_interval billing_interval
*
* @return self
*/
public function setBillingInterval($billing_interval)
{
if (is_null($billing_interval)) {
array_push($this->openAPINullablesSetToNull, 'billing_interval');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('billing_interval', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['billing_interval'] = $billing_interval;
return $this;
}
/**
* Gets payment_term_days
*
* @return int|null
*/
public function getPaymentTermDays()
{
return $this->container['payment_term_days'];
}
/**
* Sets payment_term_days
*
* @param int|null $payment_term_days payment_term_days
*
* @return self
*/
public function setPaymentTermDays($payment_term_days)
{
if (is_null($payment_term_days)) {
array_push($this->openAPINullablesSetToNull, 'payment_term_days');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('payment_term_days', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['payment_term_days'] = $payment_term_days;
return $this;
}
/**
* Gets individual_agreements
*
* @return string|null
*/
public function getIndividualAgreements()
{
return $this->container['individual_agreements'];
}
/**
* Sets individual_agreements
*
* @param string|null $individual_agreements individual_agreements
*
* @return self
*/
public function setIndividualAgreements($individual_agreements)
{
if (is_null($individual_agreements)) {
array_push($this->openAPINullablesSetToNull, 'individual_agreements');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('individual_agreements', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['individual_agreements'] = $individual_agreements;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@@ -0,0 +1,681 @@
<?php
/**
* UpdateTimeEntryRequest
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* UpdateTimeEntryRequest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class UpdateTimeEntryRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'UpdateTimeEntryRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'order_id' => 'string',
'date' => '\DateTime',
'start' => 'string',
'end' => 'string',
'break_duration' => 'string',
'night_hours' => 'float',
'saturday_hours' => 'float',
'sunday_hours' => 'float',
'holiday_hours' => 'float'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'order_id' => 'uuid',
'date' => 'date',
'start' => 'time',
'end' => 'time',
'break_duration' => 'date-span',
'night_hours' => 'double',
'saturday_hours' => 'double',
'sunday_hours' => 'double',
'holiday_hours' => 'double'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'order_id' => false,
'date' => false,
'start' => false,
'end' => false,
'break_duration' => false,
'night_hours' => false,
'saturday_hours' => false,
'sunday_hours' => false,
'holiday_hours' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'order_id' => 'orderId',
'date' => 'date',
'start' => 'start',
'end' => 'end',
'break_duration' => 'breakDuration',
'night_hours' => 'nightHours',
'saturday_hours' => 'saturdayHours',
'sunday_hours' => 'sundayHours',
'holiday_hours' => 'holidayHours'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'order_id' => 'setOrderId',
'date' => 'setDate',
'start' => 'setStart',
'end' => 'setEnd',
'break_duration' => 'setBreakDuration',
'night_hours' => 'setNightHours',
'saturday_hours' => 'setSaturdayHours',
'sunday_hours' => 'setSundayHours',
'holiday_hours' => 'setHolidayHours'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'order_id' => 'getOrderId',
'date' => 'getDate',
'start' => 'getStart',
'end' => 'getEnd',
'break_duration' => 'getBreakDuration',
'night_hours' => 'getNightHours',
'saturday_hours' => 'getSaturdayHours',
'sunday_hours' => 'getSundayHours',
'holiday_hours' => 'getHolidayHours'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('order_id', $data ?? [], null);
$this->setIfExists('date', $data ?? [], null);
$this->setIfExists('start', $data ?? [], null);
$this->setIfExists('end', $data ?? [], null);
$this->setIfExists('break_duration', $data ?? [], null);
$this->setIfExists('night_hours', $data ?? [], null);
$this->setIfExists('saturday_hours', $data ?? [], null);
$this->setIfExists('sunday_hours', $data ?? [], null);
$this->setIfExists('holiday_hours', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets order_id
*
* @return string|null
*/
public function getOrderId()
{
return $this->container['order_id'];
}
/**
* Sets order_id
*
* @param string|null $order_id order_id
*
* @return self
*/
public function setOrderId($order_id)
{
if (is_null($order_id)) {
throw new \InvalidArgumentException('non-nullable order_id cannot be null');
}
$this->container['order_id'] = $order_id;
return $this;
}
/**
* Gets date
*
* @return \DateTime|null
*/
public function getDate()
{
return $this->container['date'];
}
/**
* Sets date
*
* @param \DateTime|null $date date
*
* @return self
*/
public function setDate($date)
{
if (is_null($date)) {
throw new \InvalidArgumentException('non-nullable date cannot be null');
}
$this->container['date'] = $date;
return $this;
}
/**
* Gets start
*
* @return string|null
*/
public function getStart()
{
return $this->container['start'];
}
/**
* Sets start
*
* @param string|null $start start
*
* @return self
*/
public function setStart($start)
{
if (is_null($start)) {
throw new \InvalidArgumentException('non-nullable start cannot be null');
}
$this->container['start'] = $start;
return $this;
}
/**
* Gets end
*
* @return string|null
*/
public function getEnd()
{
return $this->container['end'];
}
/**
* Sets end
*
* @param string|null $end end
*
* @return self
*/
public function setEnd($end)
{
if (is_null($end)) {
throw new \InvalidArgumentException('non-nullable end cannot be null');
}
$this->container['end'] = $end;
return $this;
}
/**
* Gets break_duration
*
* @return string|null
*/
public function getBreakDuration()
{
return $this->container['break_duration'];
}
/**
* Sets break_duration
*
* @param string|null $break_duration break_duration
*
* @return self
*/
public function setBreakDuration($break_duration)
{
if (is_null($break_duration)) {
throw new \InvalidArgumentException('non-nullable break_duration cannot be null');
}
$this->container['break_duration'] = $break_duration;
return $this;
}
/**
* Gets night_hours
*
* @return float|null
*/
public function getNightHours()
{
return $this->container['night_hours'];
}
/**
* Sets night_hours
*
* @param float|null $night_hours night_hours
*
* @return self
*/
public function setNightHours($night_hours)
{
if (is_null($night_hours)) {
throw new \InvalidArgumentException('non-nullable night_hours cannot be null');
}
$this->container['night_hours'] = $night_hours;
return $this;
}
/**
* Gets saturday_hours
*
* @return float|null
*/
public function getSaturdayHours()
{
return $this->container['saturday_hours'];
}
/**
* Sets saturday_hours
*
* @param float|null $saturday_hours saturday_hours
*
* @return self
*/
public function setSaturdayHours($saturday_hours)
{
if (is_null($saturday_hours)) {
throw new \InvalidArgumentException('non-nullable saturday_hours cannot be null');
}
$this->container['saturday_hours'] = $saturday_hours;
return $this;
}
/**
* Gets sunday_hours
*
* @return float|null
*/
public function getSundayHours()
{
return $this->container['sunday_hours'];
}
/**
* Sets sunday_hours
*
* @param float|null $sunday_hours sunday_hours
*
* @return self
*/
public function setSundayHours($sunday_hours)
{
if (is_null($sunday_hours)) {
throw new \InvalidArgumentException('non-nullable sunday_hours cannot be null');
}
$this->container['sunday_hours'] = $sunday_hours;
return $this;
}
/**
* Gets holiday_hours
*
* @return float|null
*/
public function getHolidayHours()
{
return $this->container['holiday_hours'];
}
/**
* Sets holiday_hours
*
* @param float|null $holiday_hours holiday_hours
*
* @return self
*/
public function setHolidayHours($holiday_hours)
{
if (is_null($holiday_hours)) {
throw new \InvalidArgumentException('non-nullable holiday_hours cannot be null');
}
$this->container['holiday_hours'] = $holiday_hours;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -61,7 +61,8 @@ class UpdateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
'sort_order' => 'int',
'is_default' => 'bool',
'is_initial' => 'bool',
'is_terminal' => 'bool'
'is_terminal' => 'bool',
'triggers_follow_up' => 'bool'
];
/**
@@ -76,7 +77,8 @@ class UpdateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
'sort_order' => 'int32',
'is_default' => null,
'is_initial' => null,
'is_terminal' => null
'is_terminal' => null,
'triggers_follow_up' => null
];
/**
@@ -89,7 +91,8 @@ class UpdateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
'sort_order' => false,
'is_default' => false,
'is_initial' => false,
'is_terminal' => false
'is_terminal' => false,
'triggers_follow_up' => false
];
/**
@@ -182,7 +185,8 @@ class UpdateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
'sort_order' => 'sortOrder',
'is_default' => 'isDefault',
'is_initial' => 'isInitial',
'is_terminal' => 'isTerminal'
'is_terminal' => 'isTerminal',
'triggers_follow_up' => 'triggersFollowUp'
];
/**
@@ -195,7 +199,8 @@ class UpdateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
'sort_order' => 'setSortOrder',
'is_default' => 'setIsDefault',
'is_initial' => 'setIsInitial',
'is_terminal' => 'setIsTerminal'
'is_terminal' => 'setIsTerminal',
'triggers_follow_up' => 'setTriggersFollowUp'
];
/**
@@ -208,7 +213,8 @@ class UpdateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
'sort_order' => 'getSortOrder',
'is_default' => 'getIsDefault',
'is_initial' => 'getIsInitial',
'is_terminal' => 'getIsTerminal'
'is_terminal' => 'getIsTerminal',
'triggers_follow_up' => 'getTriggersFollowUp'
];
/**
@@ -273,6 +279,7 @@ class UpdateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
$this->setIfExists('is_default', $data ?? [], null);
$this->setIfExists('is_initial', $data ?? [], null);
$this->setIfExists('is_terminal', $data ?? [], null);
$this->setIfExists('triggers_follow_up', $data ?? [], null);
}
/**
@@ -458,6 +465,33 @@ class UpdateValueListItemRequest implements ModelInterface, ArrayAccess, \JsonSe
return $this;
}
/**
* Gets triggers_follow_up
*
* @return bool|null
*/
public function getTriggersFollowUp()
{
return $this->container['triggers_follow_up'];
}
/**
* Sets triggers_follow_up
*
* @param bool|null $triggers_follow_up triggers_follow_up
*
* @return self
*/
public function setTriggersFollowUp($triggers_follow_up)
{
if (is_null($triggers_follow_up)) {
throw new \InvalidArgumentException('non-nullable triggers_follow_up cannot be null');
}
$this->container['triggers_follow_up'] = $triggers_follow_up;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@@ -58,9 +58,10 @@ class UserPermissionOverrideResponse implements ModelInterface, ArrayAccess, \Js
*/
protected static $openAPITypes = [
'id' => 'string',
'module' => 'string',
'action' => 'string',
'effect' => 'string'
'module' => '\OmsorgCoreClient\Model\ModuleType',
'action' => '\OmsorgCoreClient\Model\PermissionAction',
'effect' => '\OmsorgCoreClient\Model\PermissionEffect',
'scope' => '\OmsorgCoreClient\Model\PermissionScope'
];
/**
@@ -74,7 +75,8 @@ class UserPermissionOverrideResponse implements ModelInterface, ArrayAccess, \Js
'id' => 'uuid',
'module' => null,
'action' => null,
'effect' => null
'effect' => null,
'scope' => null
];
/**
@@ -84,9 +86,10 @@ class UserPermissionOverrideResponse implements ModelInterface, ArrayAccess, \Js
*/
protected static array $openAPINullables = [
'id' => false,
'module' => true,
'action' => true,
'effect' => true
'module' => false,
'action' => false,
'effect' => false,
'scope' => false
];
/**
@@ -178,7 +181,8 @@ class UserPermissionOverrideResponse implements ModelInterface, ArrayAccess, \Js
'id' => 'id',
'module' => 'module',
'action' => 'action',
'effect' => 'effect'
'effect' => 'effect',
'scope' => 'scope'
];
/**
@@ -190,7 +194,8 @@ class UserPermissionOverrideResponse implements ModelInterface, ArrayAccess, \Js
'id' => 'setId',
'module' => 'setModule',
'action' => 'setAction',
'effect' => 'setEffect'
'effect' => 'setEffect',
'scope' => 'setScope'
];
/**
@@ -202,7 +207,8 @@ class UserPermissionOverrideResponse implements ModelInterface, ArrayAccess, \Js
'id' => 'getId',
'module' => 'getModule',
'action' => 'getAction',
'effect' => 'getEffect'
'effect' => 'getEffect',
'scope' => 'getScope'
];
/**
@@ -266,6 +272,7 @@ class UserPermissionOverrideResponse implements ModelInterface, ArrayAccess, \Js
$this->setIfExists('module', $data ?? [], null);
$this->setIfExists('action', $data ?? [], null);
$this->setIfExists('effect', $data ?? [], null);
$this->setIfExists('scope', $data ?? [], null);
}
/**
@@ -340,7 +347,7 @@ class UserPermissionOverrideResponse implements ModelInterface, ArrayAccess, \Js
/**
* Gets module
*
* @return string|null
* @return \OmsorgCoreClient\Model\ModuleType|null
*/
public function getModule()
{
@@ -350,21 +357,14 @@ class UserPermissionOverrideResponse implements ModelInterface, ArrayAccess, \Js
/**
* Sets module
*
* @param string|null $module module
* @param \OmsorgCoreClient\Model\ModuleType|null $module module
*
* @return self
*/
public function setModule($module)
{
if (is_null($module)) {
array_push($this->openAPINullablesSetToNull, 'module');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('module', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
throw new \InvalidArgumentException('non-nullable module cannot be null');
}
$this->container['module'] = $module;
@@ -374,7 +374,7 @@ class UserPermissionOverrideResponse implements ModelInterface, ArrayAccess, \Js
/**
* Gets action
*
* @return string|null
* @return \OmsorgCoreClient\Model\PermissionAction|null
*/
public function getAction()
{
@@ -384,21 +384,14 @@ class UserPermissionOverrideResponse implements ModelInterface, ArrayAccess, \Js
/**
* Sets action
*
* @param string|null $action action
* @param \OmsorgCoreClient\Model\PermissionAction|null $action action
*
* @return self
*/
public function setAction($action)
{
if (is_null($action)) {
array_push($this->openAPINullablesSetToNull, 'action');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('action', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
throw new \InvalidArgumentException('non-nullable action cannot be null');
}
$this->container['action'] = $action;
@@ -408,7 +401,7 @@ class UserPermissionOverrideResponse implements ModelInterface, ArrayAccess, \Js
/**
* Gets effect
*
* @return string|null
* @return \OmsorgCoreClient\Model\PermissionEffect|null
*/
public function getEffect()
{
@@ -418,26 +411,46 @@ class UserPermissionOverrideResponse implements ModelInterface, ArrayAccess, \Js
/**
* Sets effect
*
* @param string|null $effect effect
* @param \OmsorgCoreClient\Model\PermissionEffect|null $effect effect
*
* @return self
*/
public function setEffect($effect)
{
if (is_null($effect)) {
array_push($this->openAPINullablesSetToNull, 'effect');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('effect', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
throw new \InvalidArgumentException('non-nullable effect cannot be null');
}
$this->container['effect'] = $effect;
return $this;
}
/**
* Gets scope
*
* @return \OmsorgCoreClient\Model\PermissionScope|null
*/
public function getScope()
{
return $this->container['scope'];
}
/**
* Sets scope
*
* @param \OmsorgCoreClient\Model\PermissionScope|null $scope scope
*
* @return self
*/
public function setScope($scope)
{
if (is_null($scope)) {
throw new \InvalidArgumentException('non-nullable scope cannot be null');
}
$this->container['scope'] = $scope;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@@ -62,7 +62,8 @@ class ValueListItemResponse implements ModelInterface, ArrayAccess, \JsonSeriali
'sort_order' => 'int',
'is_default' => 'bool',
'is_initial' => 'bool',
'is_terminal' => 'bool'
'is_terminal' => 'bool',
'triggers_follow_up' => 'bool'
];
/**
@@ -78,7 +79,8 @@ class ValueListItemResponse implements ModelInterface, ArrayAccess, \JsonSeriali
'sort_order' => 'int32',
'is_default' => null,
'is_initial' => null,
'is_terminal' => null
'is_terminal' => null,
'triggers_follow_up' => null
];
/**
@@ -92,7 +94,8 @@ class ValueListItemResponse implements ModelInterface, ArrayAccess, \JsonSeriali
'sort_order' => false,
'is_default' => false,
'is_initial' => false,
'is_terminal' => false
'is_terminal' => false,
'triggers_follow_up' => false
];
/**
@@ -186,7 +189,8 @@ class ValueListItemResponse implements ModelInterface, ArrayAccess, \JsonSeriali
'sort_order' => 'sortOrder',
'is_default' => 'isDefault',
'is_initial' => 'isInitial',
'is_terminal' => 'isTerminal'
'is_terminal' => 'isTerminal',
'triggers_follow_up' => 'triggersFollowUp'
];
/**
@@ -200,7 +204,8 @@ class ValueListItemResponse implements ModelInterface, ArrayAccess, \JsonSeriali
'sort_order' => 'setSortOrder',
'is_default' => 'setIsDefault',
'is_initial' => 'setIsInitial',
'is_terminal' => 'setIsTerminal'
'is_terminal' => 'setIsTerminal',
'triggers_follow_up' => 'setTriggersFollowUp'
];
/**
@@ -214,7 +219,8 @@ class ValueListItemResponse implements ModelInterface, ArrayAccess, \JsonSeriali
'sort_order' => 'getSortOrder',
'is_default' => 'getIsDefault',
'is_initial' => 'getIsInitial',
'is_terminal' => 'getIsTerminal'
'is_terminal' => 'getIsTerminal',
'triggers_follow_up' => 'getTriggersFollowUp'
];
/**
@@ -280,6 +286,7 @@ class ValueListItemResponse implements ModelInterface, ArrayAccess, \JsonSeriali
$this->setIfExists('is_default', $data ?? [], null);
$this->setIfExists('is_initial', $data ?? [], null);
$this->setIfExists('is_terminal', $data ?? [], null);
$this->setIfExists('triggers_follow_up', $data ?? [], null);
}
/**
@@ -492,6 +499,33 @@ class ValueListItemResponse implements ModelInterface, ArrayAccess, \JsonSeriali
return $this;
}
/**
* Gets triggers_follow_up
*
* @return bool|null
*/
public function getTriggersFollowUp()
{
return $this->container['triggers_follow_up'];
}
/**
* Sets triggers_follow_up
*
* @param bool|null $triggers_follow_up triggers_follow_up
*
* @return self
*/
public function setTriggersFollowUp($triggers_follow_up)
{
if (is_null($triggers_follow_up)) {
throw new \InvalidArgumentException('non-nullable triggers_follow_up cannot be null');
}
$this->container['triggers_follow_up'] = $triggers_follow_up;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@@ -59,7 +59,8 @@ class ValueListTransitionResponse implements ModelInterface, ArrayAccess, \JsonS
protected static $openAPITypes = [
'id' => 'string',
'from_item_id' => 'string',
'to_item_id' => 'string'
'to_item_id' => 'string',
'requires_approval' => 'bool'
];
/**
@@ -72,7 +73,8 @@ class ValueListTransitionResponse implements ModelInterface, ArrayAccess, \JsonS
protected static $openAPIFormats = [
'id' => 'uuid',
'from_item_id' => 'uuid',
'to_item_id' => 'uuid'
'to_item_id' => 'uuid',
'requires_approval' => null
];
/**
@@ -83,7 +85,8 @@ class ValueListTransitionResponse implements ModelInterface, ArrayAccess, \JsonS
protected static array $openAPINullables = [
'id' => false,
'from_item_id' => false,
'to_item_id' => false
'to_item_id' => false,
'requires_approval' => false
];
/**
@@ -174,7 +177,8 @@ class ValueListTransitionResponse implements ModelInterface, ArrayAccess, \JsonS
protected static $attributeMap = [
'id' => 'id',
'from_item_id' => 'fromItemId',
'to_item_id' => 'toItemId'
'to_item_id' => 'toItemId',
'requires_approval' => 'requiresApproval'
];
/**
@@ -185,7 +189,8 @@ class ValueListTransitionResponse implements ModelInterface, ArrayAccess, \JsonS
protected static $setters = [
'id' => 'setId',
'from_item_id' => 'setFromItemId',
'to_item_id' => 'setToItemId'
'to_item_id' => 'setToItemId',
'requires_approval' => 'setRequiresApproval'
];
/**
@@ -196,7 +201,8 @@ class ValueListTransitionResponse implements ModelInterface, ArrayAccess, \JsonS
protected static $getters = [
'id' => 'getId',
'from_item_id' => 'getFromItemId',
'to_item_id' => 'getToItemId'
'to_item_id' => 'getToItemId',
'requires_approval' => 'getRequiresApproval'
];
/**
@@ -259,6 +265,7 @@ class ValueListTransitionResponse implements ModelInterface, ArrayAccess, \JsonS
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('from_item_id', $data ?? [], null);
$this->setIfExists('to_item_id', $data ?? [], null);
$this->setIfExists('requires_approval', $data ?? [], null);
}
/**
@@ -383,6 +390,33 @@ class ValueListTransitionResponse implements ModelInterface, ArrayAccess, \JsonS
return $this;
}
/**
* Gets requires_approval
*
* @return bool|null
*/
public function getRequiresApproval()
{
return $this->container['requires_approval'];
}
/**
* Sets requires_approval
*
* @param bool|null $requires_approval requires_approval
*
* @return self
*/
public function setRequiresApproval($requires_approval)
{
if (is_null($requires_approval)) {
throw new \InvalidArgumentException('non-nullable requires_approval cannot be null');
}
$this->container['requires_approval'] = $requires_approval;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*