From 9fe2effc11c21a278e3567fc3a593feba05561e3 Mon Sep 17 00:00:00 2001 From: activitysmith-bot Date: Sat, 7 Nov 2026 07:35:22 +0000 Subject: [PATCH] chore: regenerate SDK --- generated/Api/DevicesApi.php | 558 ++++++++++++ generated/Model/AccountDevice.php | 832 ++++++++++++++++++ generated/Model/AccountDeviceListResponse.php | 449 ++++++++++ .../Model/AccountDeviceListResponseMeta.php | 604 +++++++++++++ generated/openapi-source.json | 4 +- 5 files changed, 2445 insertions(+), 2 deletions(-) create mode 100644 generated/Api/DevicesApi.php create mode 100644 generated/Model/AccountDevice.php create mode 100644 generated/Model/AccountDeviceListResponse.php create mode 100644 generated/Model/AccountDeviceListResponseMeta.php diff --git a/generated/Api/DevicesApi.php b/generated/Api/DevicesApi.php new file mode 100644 index 0000000..618be76 --- /dev/null +++ b/generated/Api/DevicesApi.php @@ -0,0 +1,558 @@ + [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ClientInterface $client = null, + Configuration $config = null, + HeaderSelector $selector = null, + $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation listAccountDevices + * + * List paired devices + * + * @param int $limit Maximum devices to return, 1 to 100. Defaults to 100. (optional, default to 100) + * @param int $offset Devices to skip. Use meta.next_offset from the previous page. (optional, default to 0) + * @param bool $includeInactive Include devices that can no longer receive deliveries, such as unpaired phones. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAccountDevices'] to see the possible values for this operation + * + * @throws \ActivitySmith\Generated\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return \ActivitySmith\Generated\Model\AccountDeviceListResponse|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\RateLimitError + */ + public function listAccountDevices($limit = 100, $offset = 0, $includeInactive = false, string $contentType = self::contentTypes['listAccountDevices'][0]) + { + list($response) = $this->listAccountDevicesWithHttpInfo($limit, $offset, $includeInactive, $contentType); + return $response; + } + + /** + * Operation listAccountDevicesWithHttpInfo + * + * List paired devices + * + * @param int $limit Maximum devices to return, 1 to 100. Defaults to 100. (optional, default to 100) + * @param int $offset Devices to skip. Use meta.next_offset from the previous page. (optional, default to 0) + * @param bool $includeInactive Include devices that can no longer receive deliveries, such as unpaired phones. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAccountDevices'] to see the possible values for this operation + * + * @throws \ActivitySmith\Generated\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of \ActivitySmith\Generated\Model\AccountDeviceListResponse|\ActivitySmith\Generated\Model\ForbiddenError|\ActivitySmith\Generated\Model\RateLimitError, HTTP status code, HTTP response headers (array of strings) + */ + public function listAccountDevicesWithHttpInfo($limit = 100, $offset = 0, $includeInactive = false, string $contentType = self::contentTypes['listAccountDevices'][0]) + { + $request = $this->listAccountDevicesRequest($limit, $offset, $includeInactive, $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(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\ActivitySmith\Generated\Model\AccountDeviceListResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\ActivitySmith\Generated\Model\AccountDeviceListResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\ActivitySmith\Generated\Model\AccountDeviceListResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\ActivitySmith\Generated\Model\ForbiddenError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\ActivitySmith\Generated\Model\ForbiddenError' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\ActivitySmith\Generated\Model\ForbiddenError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 429: + if ('\ActivitySmith\Generated\Model\RateLimitError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\ActivitySmith\Generated\Model\RateLimitError' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\ActivitySmith\Generated\Model\RateLimitError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\ActivitySmith\Generated\Model\AccountDeviceListResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\ActivitySmith\Generated\Model\AccountDeviceListResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\ActivitySmith\Generated\Model\ForbiddenError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\ActivitySmith\Generated\Model\RateLimitError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation listAccountDevicesAsync + * + * List paired devices + * + * @param int $limit Maximum devices to return, 1 to 100. Defaults to 100. (optional, default to 100) + * @param int $offset Devices to skip. Use meta.next_offset from the previous page. (optional, default to 0) + * @param bool $includeInactive Include devices that can no longer receive deliveries, such as unpaired phones. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAccountDevices'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listAccountDevicesAsync($limit = 100, $offset = 0, $includeInactive = false, string $contentType = self::contentTypes['listAccountDevices'][0]) + { + return $this->listAccountDevicesAsyncWithHttpInfo($limit, $offset, $includeInactive, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listAccountDevicesAsyncWithHttpInfo + * + * List paired devices + * + * @param int $limit Maximum devices to return, 1 to 100. Defaults to 100. (optional, default to 100) + * @param int $offset Devices to skip. Use meta.next_offset from the previous page. (optional, default to 0) + * @param bool $includeInactive Include devices that can no longer receive deliveries, such as unpaired phones. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAccountDevices'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listAccountDevicesAsyncWithHttpInfo($limit = 100, $offset = 0, $includeInactive = false, string $contentType = self::contentTypes['listAccountDevices'][0]) + { + $returnType = '\ActivitySmith\Generated\Model\AccountDeviceListResponse'; + $request = $this->listAccountDevicesRequest($limit, $offset, $includeInactive, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listAccountDevices' + * + * @param int $limit Maximum devices to return, 1 to 100. Defaults to 100. (optional, default to 100) + * @param int $offset Devices to skip. Use meta.next_offset from the previous page. (optional, default to 0) + * @param bool $includeInactive Include devices that can no longer receive deliveries, such as unpaired phones. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAccountDevices'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listAccountDevicesRequest($limit = 100, $offset = 0, $includeInactive = false, string $contentType = self::contentTypes['listAccountDevices'][0]) + { + + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling DevicesApi.listAccountDevices, must be smaller than or equal to 100.'); + } + if ($limit !== null && $limit < 1) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling DevicesApi.listAccountDevices, must be bigger than or equal to 1.'); + } + + if ($offset !== null && $offset < 0) { + throw new \InvalidArgumentException('invalid value for "$offset" when calling DevicesApi.listAccountDevices, must be bigger than or equal to 0.'); + } + + + + $resourcePath = '/account/devices'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $offset, + 'offset', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $includeInactive, + 'include_inactive', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $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 (API Key) 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( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/generated/Model/AccountDevice.php b/generated/Model/AccountDevice.php new file mode 100644 index 0000000..27c1d27 --- /dev/null +++ b/generated/Model/AccountDevice.php @@ -0,0 +1,832 @@ + + */ +class AccountDevice implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountDevice'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'userEmail' => 'string', + 'deviceId' => 'string', + 'deviceType' => 'string', + 'isActive' => 'bool', + 'tokenStatus' => 'array', + 'appVersion' => 'string', + 'deviceName' => 'string', + 'systemName' => 'string', + 'systemVersion' => 'string', + 'createdAt' => '\DateTime', + 'updatedAt' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'userEmail' => null, + 'deviceId' => null, + 'deviceType' => null, + 'isActive' => null, + 'tokenStatus' => null, + 'appVersion' => null, + 'deviceName' => null, + 'systemName' => null, + 'systemVersion' => null, + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'userEmail' => false, + 'deviceId' => false, + 'deviceType' => true, + 'isActive' => false, + 'tokenStatus' => false, + 'appVersion' => true, + 'deviceName' => true, + 'systemName' => true, + 'systemVersion' => true, + 'createdAt' => true, + 'updatedAt' => 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 = [ + 'userEmail' => 'user_email', + 'deviceId' => 'device_id', + 'deviceType' => 'device_type', + 'isActive' => 'is_active', + 'tokenStatus' => 'token_status', + 'appVersion' => 'app_version', + 'deviceName' => 'device_name', + 'systemName' => 'system_name', + 'systemVersion' => 'system_version', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'userEmail' => 'setUserEmail', + 'deviceId' => 'setDeviceId', + 'deviceType' => 'setDeviceType', + 'isActive' => 'setIsActive', + 'tokenStatus' => 'setTokenStatus', + 'appVersion' => 'setAppVersion', + 'deviceName' => 'setDeviceName', + 'systemName' => 'setSystemName', + 'systemVersion' => 'setSystemVersion', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'userEmail' => 'getUserEmail', + 'deviceId' => 'getDeviceId', + 'deviceType' => 'getDeviceType', + 'isActive' => 'getIsActive', + 'tokenStatus' => 'getTokenStatus', + 'appVersion' => 'getAppVersion', + 'deviceName' => 'getDeviceName', + 'systemName' => 'getSystemName', + 'systemVersion' => 'getSystemVersion', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('userEmail', $data ?? [], null); + $this->setIfExists('deviceId', $data ?? [], null); + $this->setIfExists('deviceType', $data ?? [], null); + $this->setIfExists('isActive', $data ?? [], null); + $this->setIfExists('tokenStatus', $data ?? [], null); + $this->setIfExists('appVersion', $data ?? [], null); + $this->setIfExists('deviceName', $data ?? [], null); + $this->setIfExists('systemName', $data ?? [], null); + $this->setIfExists('systemVersion', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); + $this->setIfExists('updatedAt', $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 = []; + + if ($this->container['userEmail'] === null) { + $invalidProperties[] = "'userEmail' can't be null"; + } + if ($this->container['deviceId'] === null) { + $invalidProperties[] = "'deviceId' can't be null"; + } + if ($this->container['deviceType'] === null) { + $invalidProperties[] = "'deviceType' can't be null"; + } + if ($this->container['isActive'] === null) { + $invalidProperties[] = "'isActive' can't be null"; + } + if ($this->container['tokenStatus'] === null) { + $invalidProperties[] = "'tokenStatus' can't be null"; + } + if ($this->container['appVersion'] === null) { + $invalidProperties[] = "'appVersion' can't be null"; + } + if ($this->container['deviceName'] === null) { + $invalidProperties[] = "'deviceName' can't be null"; + } + if ($this->container['systemName'] === null) { + $invalidProperties[] = "'systemName' can't be null"; + } + if ($this->container['systemVersion'] === null) { + $invalidProperties[] = "'systemVersion' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets userEmail + * + * @return string + */ + public function getUserEmail() + { + return $this->container['userEmail']; + } + + /** + * Sets userEmail + * + * @param string $userEmail Email of the account member who paired the device. + * + * @return self + */ + public function setUserEmail($userEmail) + { + if (is_null($userEmail)) { + throw new \InvalidArgumentException('non-nullable userEmail cannot be null'); + } + $this->container['userEmail'] = $userEmail; + + return $this; + } + + /** + * Gets deviceId + * + * @return string + */ + public function getDeviceId() + { + return $this->container['deviceId']; + } + + /** + * Sets deviceId + * + * @param string $deviceId Device ID. Use it to assign the device to Channels. + * + * @return self + */ + public function setDeviceId($deviceId) + { + if (is_null($deviceId)) { + throw new \InvalidArgumentException('non-nullable deviceId cannot be null'); + } + $this->container['deviceId'] = $deviceId; + + return $this; + } + + /** + * Gets deviceType + * + * @return string + */ + public function getDeviceType() + { + return $this->container['deviceType']; + } + + /** + * Sets deviceType + * + * @param string $deviceType Device platform, such as ios. iPhones and iPads both report ios; use system_name to tell them apart. + * + * @return self + */ + public function setDeviceType($deviceType) + { + if (is_null($deviceType)) { + array_push($this->openAPINullablesSetToNull, 'deviceType'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deviceType', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['deviceType'] = $deviceType; + + return $this; + } + + /** + * Gets isActive + * + * @return bool + */ + public function getIsActive() + { + return $this->container['isActive']; + } + + /** + * Sets isActive + * + * @param bool $isActive True when the device can receive Push Notifications or Live Activities. + * + * @return self + */ + public function setIsActive($isActive) + { + if (is_null($isActive)) { + throw new \InvalidArgumentException('non-nullable isActive cannot be null'); + } + $this->container['isActive'] = $isActive; + + return $this; + } + + /** + * Gets tokenStatus + * + * @return array + */ + public function getTokenStatus() + { + return $this->container['tokenStatus']; + } + + /** + * Sets tokenStatus + * + * @param array $tokenStatus Whether each delivery token is active, keyed by token type (push, start_live_activity). + * + * @return self + */ + public function setTokenStatus($tokenStatus) + { + if (is_null($tokenStatus)) { + throw new \InvalidArgumentException('non-nullable tokenStatus cannot be null'); + } + $this->container['tokenStatus'] = $tokenStatus; + + return $this; + } + + /** + * Gets appVersion + * + * @return string + */ + public function getAppVersion() + { + return $this->container['appVersion']; + } + + /** + * Sets appVersion + * + * @param string $appVersion ActivitySmith app version on the device. + * + * @return self + */ + public function setAppVersion($appVersion) + { + if (is_null($appVersion)) { + array_push($this->openAPINullablesSetToNull, 'appVersion'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('appVersion', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['appVersion'] = $appVersion; + + return $this; + } + + /** + * Gets deviceName + * + * @return string + */ + public function getDeviceName() + { + return $this->container['deviceName']; + } + + /** + * Sets deviceName + * + * @param string $deviceName Device name set on the device. + * + * @return self + */ + public function setDeviceName($deviceName) + { + if (is_null($deviceName)) { + array_push($this->openAPINullablesSetToNull, 'deviceName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deviceName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['deviceName'] = $deviceName; + + return $this; + } + + /** + * Gets systemName + * + * @return string + */ + public function getSystemName() + { + return $this->container['systemName']; + } + + /** + * Sets systemName + * + * @param string $systemName Operating system name, such as iOS or iPadOS. + * + * @return self + */ + public function setSystemName($systemName) + { + if (is_null($systemName)) { + array_push($this->openAPINullablesSetToNull, 'systemName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('systemName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['systemName'] = $systemName; + + return $this; + } + + /** + * Gets systemVersion + * + * @return string + */ + public function getSystemVersion() + { + return $this->container['systemVersion']; + } + + /** + * Sets systemVersion + * + * @param string $systemVersion Operating system version. + * + * @return self + */ + public function setSystemVersion($systemVersion) + { + if (is_null($systemVersion)) { + array_push($this->openAPINullablesSetToNull, 'systemVersion'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('systemVersion', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['systemVersion'] = $systemVersion; + + return $this; + } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt When the device was first paired. + * + * @return self + */ + public function setCreatedAt($createdAt) + { + if (is_null($createdAt)) { + array_push($this->openAPINullablesSetToNull, 'createdAt'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('createdAt', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets updatedAt + * + * @return \DateTime + */ + public function getUpdatedAt() + { + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param \DateTime $updatedAt When the device last updated its pairing. + * + * @return self + */ + public function setUpdatedAt($updatedAt) + { + if (is_null($updatedAt)) { + array_push($this->openAPINullablesSetToNull, 'updatedAt'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('updatedAt', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['updatedAt'] = $updatedAt; + + 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)); + } +} + + diff --git a/generated/Model/AccountDeviceListResponse.php b/generated/Model/AccountDeviceListResponse.php new file mode 100644 index 0000000..b402ab6 --- /dev/null +++ b/generated/Model/AccountDeviceListResponse.php @@ -0,0 +1,449 @@ + + */ +class AccountDeviceListResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountDeviceListResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'devices' => '\ActivitySmith\Generated\Model\AccountDevice[]', + 'meta' => '\ActivitySmith\Generated\Model\AccountDeviceListResponseMeta' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'devices' => null, + 'meta' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'devices' => false, + 'meta' => 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 = [ + 'devices' => 'devices', + 'meta' => 'meta' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'devices' => 'setDevices', + 'meta' => 'setMeta' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'devices' => 'getDevices', + 'meta' => 'getMeta' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('devices', $data ?? [], null); + $this->setIfExists('meta', $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 = []; + + if ($this->container['devices'] === null) { + $invalidProperties[] = "'devices' can't be null"; + } + if ($this->container['meta'] === null) { + $invalidProperties[] = "'meta' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets devices + * + * @return \ActivitySmith\Generated\Model\AccountDevice[] + */ + public function getDevices() + { + return $this->container['devices']; + } + + /** + * Sets devices + * + * @param \ActivitySmith\Generated\Model\AccountDevice[] $devices devices + * + * @return self + */ + public function setDevices($devices) + { + if (is_null($devices)) { + throw new \InvalidArgumentException('non-nullable devices cannot be null'); + } + $this->container['devices'] = $devices; + + return $this; + } + + /** + * Gets meta + * + * @return \ActivitySmith\Generated\Model\AccountDeviceListResponseMeta + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \ActivitySmith\Generated\Model\AccountDeviceListResponseMeta $meta meta + * + * @return self + */ + public function setMeta($meta) + { + if (is_null($meta)) { + throw new \InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + 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)); + } +} + + diff --git a/generated/Model/AccountDeviceListResponseMeta.php b/generated/Model/AccountDeviceListResponseMeta.php new file mode 100644 index 0000000..01b2a33 --- /dev/null +++ b/generated/Model/AccountDeviceListResponseMeta.php @@ -0,0 +1,604 @@ + + */ +class AccountDeviceListResponseMeta implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountDeviceListResponse_meta'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'total' => 'int', + 'limit' => 'int', + 'offset' => 'int', + 'hasMore' => 'bool', + 'nextOffset' => 'int', + 'includeInactive' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'total' => null, + 'limit' => null, + 'offset' => null, + 'hasMore' => null, + 'nextOffset' => null, + 'includeInactive' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'total' => false, + 'limit' => false, + 'offset' => false, + 'hasMore' => false, + 'nextOffset' => true, + 'includeInactive' => 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 = [ + 'total' => 'total', + 'limit' => 'limit', + 'offset' => 'offset', + 'hasMore' => 'has_more', + 'nextOffset' => 'next_offset', + 'includeInactive' => 'include_inactive' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal', + 'limit' => 'setLimit', + 'offset' => 'setOffset', + 'hasMore' => 'setHasMore', + 'nextOffset' => 'setNextOffset', + 'includeInactive' => 'setIncludeInactive' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal', + 'limit' => 'getLimit', + 'offset' => 'getOffset', + 'hasMore' => 'getHasMore', + 'nextOffset' => 'getNextOffset', + 'includeInactive' => 'getIncludeInactive' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('total', $data ?? [], null); + $this->setIfExists('limit', $data ?? [], null); + $this->setIfExists('offset', $data ?? [], null); + $this->setIfExists('hasMore', $data ?? [], null); + $this->setIfExists('nextOffset', $data ?? [], null); + $this->setIfExists('includeInactive', $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 = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + if ($this->container['limit'] === null) { + $invalidProperties[] = "'limit' can't be null"; + } + if ($this->container['offset'] === null) { + $invalidProperties[] = "'offset' can't be null"; + } + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; + } + if ($this->container['nextOffset'] === null) { + $invalidProperties[] = "'nextOffset' can't be null"; + } + if ($this->container['includeInactive'] === null) { + $invalidProperties[] = "'includeInactive' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total + * + * @return int + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param int $total Devices matching the filter. + * + * @return self + */ + public function setTotal($total) + { + if (is_null($total)) { + throw new \InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets limit + * + * @return int + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int $limit limit + * + * @return self + */ + public function setLimit($limit) + { + if (is_null($limit)) { + throw new \InvalidArgumentException('non-nullable limit cannot be null'); + } + $this->container['limit'] = $limit; + + return $this; + } + + /** + * Gets offset + * + * @return int + */ + public function getOffset() + { + return $this->container['offset']; + } + + /** + * Sets offset + * + * @param int $offset offset + * + * @return self + */ + public function setOffset($offset) + { + if (is_null($offset)) { + throw new \InvalidArgumentException('non-nullable offset cannot be null'); + } + $this->container['offset'] = $offset; + + return $this; + } + + /** + * Gets hasMore + * + * @return bool + */ + public function getHasMore() + { + return $this->container['hasMore']; + } + + /** + * Sets hasMore + * + * @param bool $hasMore hasMore + * + * @return self + */ + public function setHasMore($hasMore) + { + if (is_null($hasMore)) { + throw new \InvalidArgumentException('non-nullable hasMore cannot be null'); + } + $this->container['hasMore'] = $hasMore; + + return $this; + } + + /** + * Gets nextOffset + * + * @return int + */ + public function getNextOffset() + { + return $this->container['nextOffset']; + } + + /** + * Sets nextOffset + * + * @param int $nextOffset Offset for the next page, or null on the last page. + * + * @return self + */ + public function setNextOffset($nextOffset) + { + if (is_null($nextOffset)) { + array_push($this->openAPINullablesSetToNull, 'nextOffset'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('nextOffset', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['nextOffset'] = $nextOffset; + + return $this; + } + + /** + * Gets includeInactive + * + * @return bool + */ + public function getIncludeInactive() + { + return $this->container['includeInactive']; + } + + /** + * Sets includeInactive + * + * @param bool $includeInactive includeInactive + * + * @return self + */ + public function setIncludeInactive($includeInactive) + { + if (is_null($includeInactive)) { + throw new \InvalidArgumentException('non-nullable includeInactive cannot be null'); + } + $this->container['includeInactive'] = $includeInactive; + + 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)); + } +} + + diff --git a/generated/openapi-source.json b/generated/openapi-source.json index 498433c..7731deb 100644 --- a/generated/openapi-source.json +++ b/generated/openapi-source.json @@ -1,6 +1,6 @@ { "repository": "ActivitySmithHQ/activitysmith-backend", - "commit": "7bf9c3d88459fe3f122810979a45da0a1e6fd2d6", + "commit": "1f133d70555e39b9fe02e9e38e81c924422f9109", "path": "openapi.json", - "sha256": "6987f90b106e28a0ab8058f43309e7a9f045c7c54d27ce90bbdd5966c3f99f7a" + "sha256": "69315d272f2d20ef648a9cc675bae718b8fcdd9a1223268db41a176e6f89cdf9" }