diff --git a/composer.lock b/composer.lock index 0115e7d5..c7b3af31 100644 --- a/composer.lock +++ b/composer.lock @@ -12,12 +12,12 @@ "source": { "type": "git", "url": "https://github.com/owncloud/libre-graph-api-php.git", - "reference": "cb414b614a1dc9dee1a320ea3862f56b11c3d70c" + "reference": "c728b27030e08689768562ea3b79694f9e5b09aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/owncloud/libre-graph-api-php/zipball/cb414b614a1dc9dee1a320ea3862f56b11c3d70c", - "reference": "cb414b614a1dc9dee1a320ea3862f56b11c3d70c", + "url": "https://api.github.com/repos/owncloud/libre-graph-api-php/zipball/c728b27030e08689768562ea3b79694f9e5b09aa", + "reference": "c728b27030e08689768562ea3b79694f9e5b09aa", "shasum": "" }, "require": { @@ -65,7 +65,7 @@ "issues": "https://github.com/owncloud/libre-graph-api-php/issues", "source": "https://github.com/owncloud/libre-graph-api-php/tree/main" }, - "time": "2024-01-15T11:05:29+00:00" + "time": "2024-01-30T15:23:40+00:00" }, { "name": "owncloud/ocis-php-sdk", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 9bf477a6..3d534a2e 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -158,12 +158,12 @@ "source": { "type": "git", "url": "https://github.com/owncloud/libre-graph-api-php.git", - "reference": "cb414b614a1dc9dee1a320ea3862f56b11c3d70c" + "reference": "c728b27030e08689768562ea3b79694f9e5b09aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/owncloud/libre-graph-api-php/zipball/cb414b614a1dc9dee1a320ea3862f56b11c3d70c", - "reference": "cb414b614a1dc9dee1a320ea3862f56b11c3d70c", + "url": "https://api.github.com/repos/owncloud/libre-graph-api-php/zipball/c728b27030e08689768562ea3b79694f9e5b09aa", + "reference": "c728b27030e08689768562ea3b79694f9e5b09aa", "shasum": "" }, "require": { @@ -179,7 +179,7 @@ "overtrue/phplint": "^9.0", "phpunit/phpunit": "^9.0" }, - "time": "2024-01-15T11:05:29+00:00", + "time": "2024-01-30T15:23:40+00:00", "default-branch": true, "type": "library", "installation-source": "dist", diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index d860a91b..08823310 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'owncloud/moodle-repository_ocis', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '95edd79a85e00800c2e264611064fd6c0b5ab85b', + 'reference' => 'ef73ea4ce9d2227836170a61992f4a7137a11a0c', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -49,7 +49,7 @@ 'owncloud/libre-graph-api-php' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'cb414b614a1dc9dee1a320ea3862f56b11c3d70c', + 'reference' => 'c728b27030e08689768562ea3b79694f9e5b09aa', 'type' => 'library', 'install_path' => __DIR__ . '/../owncloud/libre-graph-api-php', 'aliases' => array( @@ -60,7 +60,7 @@ 'owncloud/moodle-repository_ocis' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '95edd79a85e00800c2e264611064fd6c0b5ab85b', + 'reference' => 'ef73ea4ce9d2227836170a61992f4a7137a11a0c', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/vendor/owncloud/libre-graph-api-php/README.md b/vendor/owncloud/libre-graph-api-php/README.md index d240c548..2f2273a4 100644 --- a/vendor/owncloud/libre-graph-api-php/README.md +++ b/vendor/owncloud/libre-graph-api-php/README.md @@ -210,7 +210,7 @@ Class | Method | HTTP request | Description - [Quota](docs/Model/Quota.md) - [RemoteItem](docs/Model/RemoteItem.md) - [SharePointIdentitySet](docs/Model/SharePointIdentitySet.md) -- [Shared](docs/Model/Shared.md) +- [SharingInvitation](docs/Model/SharingInvitation.md) - [SharingLink](docs/Model/SharingLink.md) - [SharingLinkPassword](docs/Model/SharingLinkPassword.md) - [SharingLinkType](docs/Model/SharingLinkType.md) diff --git a/vendor/owncloud/libre-graph-api-php/src/Model/DriveItem.php b/vendor/owncloud/libre-graph-api-php/src/Model/DriveItem.php index 45f4f495..98c17120 100644 --- a/vendor/owncloud/libre-graph-api-php/src/Model/DriveItem.php +++ b/vendor/owncloud/libre-graph-api-php/src/Model/DriveItem.php @@ -87,7 +87,9 @@ class DriveItem implements ModelInterface, ArrayAccess, JsonSerializable 'children' => '\OpenAPI\Client\Model\DriveItem[]', 'permissions' => '\OpenAPI\Client\Model\Permission[]', 'audio' => '\OpenAPI\Client\Model\Audio', - 'video' => '\OpenAPI\Client\Model\Video' + 'video' => '\OpenAPI\Client\Model\Video', + 'at_client_synchronize' => 'bool', + 'at_ui_hidden' => 'bool' ]; /** @@ -124,7 +126,9 @@ class DriveItem implements ModelInterface, ArrayAccess, JsonSerializable 'children' => null, 'permissions' => null, 'audio' => null, - 'video' => null + 'video' => null, + 'at_client_synchronize' => null, + 'at_ui_hidden' => null ]; /** @@ -161,7 +165,9 @@ class DriveItem implements ModelInterface, ArrayAccess, JsonSerializable 'children' => false, 'permissions' => false, 'audio' => false, - 'video' => false + 'video' => false, + 'at_client_synchronize' => false, + 'at_ui_hidden' => false ]; /** @@ -278,7 +284,9 @@ public function isNullableSetToNull(string $property): bool 'children' => 'children', 'permissions' => 'permissions', 'audio' => 'audio', - 'video' => 'video' + 'video' => 'video', + 'at_client_synchronize' => '@client.synchronize', + 'at_ui_hidden' => '@UI.Hidden' ]; /** @@ -315,7 +323,9 @@ public function isNullableSetToNull(string $property): bool 'children' => 'setChildren', 'permissions' => 'setPermissions', 'audio' => 'setAudio', - 'video' => 'setVideo' + 'video' => 'setVideo', + 'at_client_synchronize' => 'setAtClientSynchronize', + 'at_ui_hidden' => 'setAtUiHidden' ]; /** @@ -352,7 +362,9 @@ public function isNullableSetToNull(string $property): bool 'children' => 'getChildren', 'permissions' => 'getPermissions', 'audio' => 'getAudio', - 'video' => 'getVideo' + 'video' => 'getVideo', + 'at_client_synchronize' => 'getAtClientSynchronize', + 'at_ui_hidden' => 'getAtUiHidden' ]; /** @@ -440,6 +452,8 @@ public function __construct(array $data = null) $this->setIfExists('permissions', $data ?? [], null); $this->setIfExists('audio', $data ?? [], null); $this->setIfExists('video', $data ?? [], null); + $this->setIfExists('at_client_synchronize', $data ?? [], null); + $this->setIfExists('at_ui_hidden', $data ?? [], null); } /** @@ -1284,6 +1298,60 @@ public function setVideo(?\OpenAPI\Client\Model\Video $video): static return $this; } + + /** + * Gets at_client_synchronize + * + * @return bool|null + */ + public function getAtClientSynchronize(): ?bool + { + return $this->container['at_client_synchronize']; + } + + /** + * Sets at_client_synchronize + * + * @param bool|null $at_client_synchronize Indicates if the item is synchronized with the underlying storage provider. Read-only. + * + * @return $this + */ + public function setAtClientSynchronize(?bool $at_client_synchronize): static + { + if (is_null($at_client_synchronize)) { + throw new InvalidArgumentException('non-nullable at_client_synchronize cannot be null'); + } + $this->container['at_client_synchronize'] = $at_client_synchronize; + + return $this; + } + + /** + * Gets at_ui_hidden + * + * @return bool|null + */ + public function getAtUiHidden(): ?bool + { + return $this->container['at_ui_hidden']; + } + + /** + * Sets at_ui_hidden + * + * @param bool|null $at_ui_hidden Properties or facets (see UI.Facet) annotated with this term will not be rendered if the annotation evaluates to true. Users can set this to hide permissons. + * + * @return $this + */ + public function setAtUiHidden(?bool $at_ui_hidden): static + { + if (is_null($at_ui_hidden)) { + throw new InvalidArgumentException('non-nullable at_ui_hidden cannot be null'); + } + $this->container['at_ui_hidden'] = $at_ui_hidden; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/vendor/owncloud/libre-graph-api-php/src/Model/Permission.php b/vendor/owncloud/libre-graph-api-php/src/Model/Permission.php index 73df82da..af871f7a 100644 --- a/vendor/owncloud/libre-graph-api-php/src/Model/Permission.php +++ b/vendor/owncloud/libre-graph-api-php/src/Model/Permission.php @@ -67,8 +67,7 @@ class Permission implements ModelInterface, ArrayAccess, JsonSerializable 'roles' => 'string[]', 'granted_to_identities' => '\OpenAPI\Client\Model\IdentitySet[]', 'at_libre_graph_permissions_actions' => 'string[]', - 'at_client_synchronize' => 'bool', - 'at_ui_hidden' => 'bool' + 'invitation' => '\OpenAPI\Client\Model\SharingInvitation' ]; /** @@ -85,8 +84,7 @@ class Permission implements ModelInterface, ArrayAccess, JsonSerializable 'roles' => null, 'granted_to_identities' => null, 'at_libre_graph_permissions_actions' => null, - 'at_client_synchronize' => null, - 'at_ui_hidden' => null + 'invitation' => null ]; /** @@ -103,8 +101,7 @@ class Permission implements ModelInterface, ArrayAccess, JsonSerializable 'roles' => false, 'granted_to_identities' => false, 'at_libre_graph_permissions_actions' => false, - 'at_client_synchronize' => false, - 'at_ui_hidden' => false + 'invitation' => false ]; /** @@ -201,8 +198,7 @@ public function isNullableSetToNull(string $property): bool 'roles' => 'roles', 'granted_to_identities' => 'grantedToIdentities', 'at_libre_graph_permissions_actions' => '@libre.graph.permissions.actions', - 'at_client_synchronize' => '@client.synchronize', - 'at_ui_hidden' => '@ui.hidden' + 'invitation' => 'invitation' ]; /** @@ -219,8 +215,7 @@ public function isNullableSetToNull(string $property): bool 'roles' => 'setRoles', 'granted_to_identities' => 'setGrantedToIdentities', 'at_libre_graph_permissions_actions' => 'setAtLibreGraphPermissionsActions', - 'at_client_synchronize' => 'setAtClientSynchronize', - 'at_ui_hidden' => 'setAtUiHidden' + 'invitation' => 'setInvitation' ]; /** @@ -237,8 +232,7 @@ public function isNullableSetToNull(string $property): bool 'roles' => 'getRoles', 'granted_to_identities' => 'getGrantedToIdentities', 'at_libre_graph_permissions_actions' => 'getAtLibreGraphPermissionsActions', - 'at_client_synchronize' => 'getAtClientSynchronize', - 'at_ui_hidden' => 'getAtUiHidden' + 'invitation' => 'getInvitation' ]; /** @@ -305,8 +299,7 @@ public function __construct(array $data = null) $this->setIfExists('roles', $data ?? [], null); $this->setIfExists('granted_to_identities', $data ?? [], null); $this->setIfExists('at_libre_graph_permissions_actions', $data ?? [], null); - $this->setIfExists('at_client_synchronize', $data ?? [], null); - $this->setIfExists('at_ui_hidden', $data ?? [], null); + $this->setIfExists('invitation', $data ?? [], null); } /** @@ -577,55 +570,28 @@ public function setAtLibreGraphPermissionsActions(?array $at_libre_graph_permiss } /** - * Gets at_client_synchronize + * Gets invitation * - * @return bool|null - */ - public function getAtClientSynchronize(): ?bool - { - return $this->container['at_client_synchronize']; - } - - /** - * Sets at_client_synchronize - * - * @param bool|null $at_client_synchronize Indicates if the item is synchronized with the underlying storage provider. Read-only. - * - * @return $this - */ - public function setAtClientSynchronize(?bool $at_client_synchronize): static - { - if (is_null($at_client_synchronize)) { - throw new InvalidArgumentException('non-nullable at_client_synchronize cannot be null'); - } - $this->container['at_client_synchronize'] = $at_client_synchronize; - - return $this; - } - - /** - * Gets at_ui_hidden - * - * @return bool|null + * @return \OpenAPI\Client\Model\SharingInvitation|null */ - public function getAtUiHidden(): ?bool + public function getInvitation(): ?\OpenAPI\Client\Model\SharingInvitation { - return $this->container['at_ui_hidden']; + return $this->container['invitation']; } /** - * Sets at_ui_hidden + * Sets invitation * - * @param bool|null $at_ui_hidden Properties or facets (see UI.Facet) annotated with this term will not be rendered if the annotation evaluates to true. Users can set this to hide permissons. + * @param \OpenAPI\Client\Model\SharingInvitation|null $invitation invitation * * @return $this */ - public function setAtUiHidden(?bool $at_ui_hidden): static + public function setInvitation(?\OpenAPI\Client\Model\SharingInvitation $invitation): static { - if (is_null($at_ui_hidden)) { - throw new InvalidArgumentException('non-nullable at_ui_hidden cannot be null'); + if (is_null($invitation)) { + throw new InvalidArgumentException('non-nullable invitation cannot be null'); } - $this->container['at_ui_hidden'] = $at_ui_hidden; + $this->container['invitation'] = $invitation; return $this; } diff --git a/vendor/owncloud/libre-graph-api-php/src/Model/RemoteItem.php b/vendor/owncloud/libre-graph-api-php/src/Model/RemoteItem.php index fba27c53..0ecf3e07 100644 --- a/vendor/owncloud/libre-graph-api-php/src/Model/RemoteItem.php +++ b/vendor/owncloud/libre-graph-api-php/src/Model/RemoteItem.php @@ -75,7 +75,6 @@ class RemoteItem implements ModelInterface, ArrayAccess, JsonSerializable 'e_tag' => 'string', 'c_tag' => 'string', 'parent_reference' => '\OpenAPI\Client\Model\ItemReference', - 'shared' => '\OpenAPI\Client\Model\Shared', 'permissions' => '\OpenAPI\Client\Model\Permission[]', 'size' => 'int', 'special_folder' => '\OpenAPI\Client\Model\SpecialFolder', @@ -105,7 +104,6 @@ class RemoteItem implements ModelInterface, ArrayAccess, JsonSerializable 'e_tag' => null, 'c_tag' => null, 'parent_reference' => null, - 'shared' => null, 'permissions' => null, 'size' => 'int64', 'special_folder' => null, @@ -135,7 +133,6 @@ class RemoteItem implements ModelInterface, ArrayAccess, JsonSerializable 'e_tag' => false, 'c_tag' => false, 'parent_reference' => false, - 'shared' => false, 'permissions' => false, 'size' => false, 'special_folder' => false, @@ -245,7 +242,6 @@ public function isNullableSetToNull(string $property): bool 'e_tag' => 'eTag', 'c_tag' => 'cTag', 'parent_reference' => 'parentReference', - 'shared' => 'shared', 'permissions' => 'permissions', 'size' => 'size', 'special_folder' => 'specialFolder', @@ -275,7 +271,6 @@ public function isNullableSetToNull(string $property): bool 'e_tag' => 'setETag', 'c_tag' => 'setCTag', 'parent_reference' => 'setParentReference', - 'shared' => 'setShared', 'permissions' => 'setPermissions', 'size' => 'setSize', 'special_folder' => 'setSpecialFolder', @@ -305,7 +300,6 @@ public function isNullableSetToNull(string $property): bool 'e_tag' => 'getETag', 'c_tag' => 'getCTag', 'parent_reference' => 'getParentReference', - 'shared' => 'getShared', 'permissions' => 'getPermissions', 'size' => 'getSize', 'special_folder' => 'getSpecialFolder', @@ -385,7 +379,6 @@ public function __construct(array $data = null) $this->setIfExists('e_tag', $data ?? [], null); $this->setIfExists('c_tag', $data ?? [], null); $this->setIfExists('parent_reference', $data ?? [], null); - $this->setIfExists('shared', $data ?? [], null); $this->setIfExists('permissions', $data ?? [], null); $this->setIfExists('size', $data ?? [], null); $this->setIfExists('special_folder', $data ?? [], null); @@ -885,33 +878,6 @@ public function setParentReference(?\OpenAPI\Client\Model\ItemReference $parent_ return $this; } - /** - * Gets shared - * - * @return \OpenAPI\Client\Model\Shared|null - */ - public function getShared(): ?\OpenAPI\Client\Model\Shared - { - return $this->container['shared']; - } - - /** - * Sets shared - * - * @param \OpenAPI\Client\Model\Shared|null $shared shared - * - * @return $this - */ - public function setShared(?\OpenAPI\Client\Model\Shared $shared): static - { - if (is_null($shared)) { - throw new InvalidArgumentException('non-nullable shared cannot be null'); - } - $this->container['shared'] = $shared; - - return $this; - } - /** * Gets permissions * diff --git a/vendor/owncloud/libre-graph-api-php/src/Model/Shared.php b/vendor/owncloud/libre-graph-api-php/src/Model/Shared.php deleted file mode 100644 index 6eb9063e..00000000 --- a/vendor/owncloud/libre-graph-api-php/src/Model/Shared.php +++ /dev/null @@ -1,518 +0,0 @@ - - */ -class Shared implements ModelInterface, ArrayAccess, JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static string $openAPIModelName = 'shared'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPITypes = [ - 'owner' => '\OpenAPI\Client\Model\IdentitySet', - 'scope' => 'string', - 'shared_by' => '\OpenAPI\Client\Model\IdentitySet', - 'shared_date_time' => '\DateTime' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPIFormats = [ - 'owner' => null, - 'scope' => null, - 'shared_by' => null, - 'shared_date_time' => 'date-time' - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ - protected static array $openAPINullables = [ - 'owner' => false, - 'scope' => false, - 'shared_by' => false, - 'shared_date_time' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes(): array - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats(): array - { - 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 array - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param array $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 array - */ - protected static array $attributeMap = [ - 'owner' => 'owner', - 'scope' => 'scope', - 'shared_by' => 'sharedBy', - 'shared_date_time' => 'sharedDateTime' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var array - */ - protected static array $setters = [ - 'owner' => 'setOwner', - 'scope' => 'setScope', - 'shared_by' => 'setSharedBy', - 'shared_date_time' => 'setSharedDateTime' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var array - */ - protected static array $getters = [ - 'owner' => 'getOwner', - 'scope' => 'getScope', - 'shared_by' => 'getSharedBy', - 'shared_date_time' => 'getSharedDateTime' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap(): array - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters(): array - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters(): array - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName(): string - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var array - */ - protected array $container = []; - - /** - * Constructor - * - * @param array $data Associated array of property values initializing the model - */ - public function __construct(array $data = null) - { - $this->setIfExists('owner', $data ?? [], null); - $this->setIfExists('scope', $data ?? [], null); - $this->setIfExists('shared_by', $data ?? [], null); - $this->setIfExists('shared_date_time', $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, mixed $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 string[] invalid properties with reasons - */ - public function listInvalidProperties(): array - { - $invalidProperties = []; - - if (!is_null($this->container['shared_date_time']) && !preg_match("/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/", $this->container['shared_date_time'])) { - $invalidProperties[] = "invalid value for 'shared_date_time', must be conform to the pattern /^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/."; - } - - 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(): bool - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets owner - * - * @return \OpenAPI\Client\Model\IdentitySet|null - */ - public function getOwner(): ?\OpenAPI\Client\Model\IdentitySet - { - return $this->container['owner']; - } - - /** - * Sets owner - * - * @param \OpenAPI\Client\Model\IdentitySet|null $owner owner - * - * @return $this - */ - public function setOwner(?\OpenAPI\Client\Model\IdentitySet $owner): static - { - if (is_null($owner)) { - throw new InvalidArgumentException('non-nullable owner cannot be null'); - } - $this->container['owner'] = $owner; - - return $this; - } - - /** - * Gets scope - * - * @return string|null - */ - public function getScope(): ?string - { - return $this->container['scope']; - } - - /** - * Sets scope - * - * @param string|null $scope Indicates the scope of how the item is shared: anonymous, organization, or users. Read-only. - * - * @return $this - */ - public function setScope(?string $scope): static - { - if (is_null($scope)) { - throw new InvalidArgumentException('non-nullable scope cannot be null'); - } - $this->container['scope'] = $scope; - - return $this; - } - - /** - * Gets shared_by - * - * @return \OpenAPI\Client\Model\IdentitySet|null - */ - public function getSharedBy(): ?\OpenAPI\Client\Model\IdentitySet - { - return $this->container['shared_by']; - } - - /** - * Sets shared_by - * - * @param \OpenAPI\Client\Model\IdentitySet|null $shared_by shared_by - * - * @return $this - */ - public function setSharedBy(?\OpenAPI\Client\Model\IdentitySet $shared_by): static - { - if (is_null($shared_by)) { - throw new InvalidArgumentException('non-nullable shared_by cannot be null'); - } - $this->container['shared_by'] = $shared_by; - - return $this; - } - - /** - * Gets shared_date_time - * - * @return \DateTime|null - */ - public function getSharedDateTime(): ?\DateTime - { - return $this->container['shared_date_time']; - } - - /** - * Sets shared_date_time - * - * @param \DateTime|null $shared_date_time The UTC date and time when the item was shared. Read-only. - * - * @return $this - */ - public function setSharedDateTime(?\DateTime $shared_date_time): static - { - if (is_null($shared_date_time)) { - throw new InvalidArgumentException('non-nullable shared_date_time cannot be null'); - } - - if ((!preg_match("/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/", ObjectSerializer::toString($shared_date_time)))) { - throw new InvalidArgumentException("invalid value for \$shared_date_time when calling Shared., must conform to the pattern /^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/."); - } - - $this->container['shared_date_time'] = $shared_date_time; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists(mixed $offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[ReturnTypeWillChange] - public function offsetGet(mixed $offset): mixed - { - 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(mixed $offset, mixed $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(mixed $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(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue(): string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - -