From 347caa6286532bdca39e9cad45d0bd586ff5ca4f Mon Sep 17 00:00:00 2001 From: "josh.white" Date: Fri, 20 Sep 2019 13:21:14 -0500 Subject: [PATCH] Bring lib out of beta --- README.md | 4 +- autoload.php | 2 +- composer.json | 2 +- src/Api/AboutApi.php | 168 + src/Api/AdminApi.php | 500 +++ src/Api/ApplicationManagementApi.php | 107 +- src/Api/AuthenticationApi.php | 2 +- src/Api/CourseApi.php | 192 +- src/Api/DispatchApi.php | 3769 +++++++++++++++++ src/Api/InvitationsApi.php | 1843 ++++++++ src/Api/LearnerApi.php | 517 +++ src/Api/PingApi.php | 2 +- src/Api/RegistrationApi.php | 564 +-- src/Api/ReportingApi.php | 374 ++ src/Api/WebsiteApi.php | 1326 ++++++ src/Api/XapiApi.php | 1043 +++++ src/ApiClient.php | 2 +- src/ApiException.php | 2 +- src/Configuration.php | 8 +- src/Model/AboutSchema.php | 255 ++ src/Model/ActivityResultSchema.php | 2 +- src/Model/ApplicationListSchema.php | 2 +- src/Model/ApplicationSchema.php | 2 +- src/Model/ApplicationToken.php | 2 +- src/Model/BatchTagsSchema.php | 2 +- src/Model/CommentSchema.php | 2 +- src/Model/CompletionAmountSchema.php | 2 +- src/Model/CourseActivitySchema.php | 2 +- src/Model/CourseListNonPagedSchema.php | 2 +- src/Model/CourseListSchema.php | 2 +- src/Model/CourseReferenceSchema.php | 2 +- src/Model/CourseSchema.php | 2 +- src/Model/CreateDispatchIdSchema.php | 279 ++ src/Model/CreateDispatchListSchema.php | 229 + src/Model/CreateDispatchSchema.php | 501 +++ src/Model/CreatePrivateInvitationSchema.php | 377 ++ src/Model/CreatePublicInvitationSchema.php | 371 ++ src/Model/CreateRegistrationSchema.php | 2 +- src/Model/CredentialCreatedSchema.php | 2 +- src/Model/CredentialListSchema.php | 2 +- src/Model/CredentialRequestSchema.php | 2 +- src/Model/CredentialSchema.php | 2 +- src/Model/DestinationIdSchema.php | 255 ++ src/Model/DestinationListSchema.php | 255 ++ src/Model/DestinationSchema.php | 307 ++ src/Model/DispatchIdSchema.php | 255 ++ src/Model/DispatchListSchema.php | 255 ++ src/Model/DispatchRegistrationCountSchema.php | 255 ++ src/Model/DispatchSchema.php | 489 +++ src/Model/EnabledSchema.php | 229 + src/Model/ImportFetchRequestSchema.php | 2 +- src/Model/ImportJobResultSchema.php | 2 +- src/Model/ImportResultSchema.php | 2 +- src/Model/IntegerResultSchema.php | 2 +- src/Model/InvitationEmailSchema.php | 288 ++ src/Model/InvitationJobStatusSchema.php | 338 ++ src/Model/InvitationSummaryList.php | 255 ++ src/Model/InvitationSummarySchema.php | 333 ++ src/Model/ItemValuePairSchema.php | 2 +- src/Model/LaunchHistoryListSchema.php | 2 +- src/Model/LaunchHistorySchema.php | 2 +- src/Model/LaunchLinkRequestSchema.php | 2 +- src/Model/LaunchLinkSchema.php | 2 +- src/Model/LearnerPreferenceSchema.php | 2 +- src/Model/LearnerSchema.php | 2 +- src/Model/MessageSchema.php | 2 +- src/Model/MetadataSchema.php | 2 +- src/Model/ObjectiveSchema.php | 2 +- src/Model/PermissionsSchema.php | 2 +- src/Model/PingSchema.php | 2 +- src/Model/PostBackSchema.php | 50 +- src/Model/PrivateInvitationList.php | 255 ++ src/Model/PrivateInvitationSchema.php | 437 ++ src/Model/PublicInvitationList.php | 255 ++ src/Model/PublicInvitationSchema.php | 489 +++ src/Model/RegistrationCompletion.php | 2 +- src/Model/RegistrationListSchema.php | 2 +- src/Model/RegistrationSchema.php | 2 +- src/Model/RegistrationSuccess.php | 2 +- src/Model/ReportageAccountInfoSchema.php | 437 ++ src/Model/ReportageAccountInfoUsageSchema.php | 307 ++ src/Model/ReportageAuthTokenSchema.php | 255 ++ src/Model/ReportageLinkSchema.php | 229 + src/Model/ResponseError.php | 2 +- src/Model/RuntimeInteractionSchema.php | 2 +- src/Model/RuntimeObjectiveSchema.php | 2 +- src/Model/RuntimeSchema.php | 2 +- src/Model/ScoreSchema.php | 2 +- src/Model/SettingItem.php | 24 +- src/Model/SettingListSchema.php | 2 +- src/Model/SettingMetadata.php | 2 +- src/Model/SettingValidValue.php | 2 +- src/Model/SettingsIndividualSchema.php | 2 +- src/Model/SettingsPostSchema.php | 2 +- src/Model/SharedDataEntrySchema.php | 2 +- src/Model/StaticPropertiesSchema.php | 2 +- src/Model/StringResultSchema.php | 2 +- src/Model/TagListSchema.php | 2 +- src/Model/TitleSchema.php | 2 +- src/Model/TokenRequestSchema.php | 2 +- src/Model/UpdateDispatchSchema.php | 411 ++ src/Model/UserInvitationList.php | 255 ++ src/Model/UserInvitationSchema.php | 359 ++ ...UserInvitationSchemaRegistrationReport.php | 308 ++ src/Model/XapiAccount.php | 2 +- src/Model/XapiActivity.php | 2 +- src/Model/XapiActivityDefinition.php | 2 +- src/Model/XapiAgentGroup.php | 2 +- src/Model/XapiAttachment.php | 2 +- src/Model/XapiContext.php | 2 +- src/Model/XapiContextActivity.php | 2 +- src/Model/XapiCredentialAuthTypeSchema.php | 256 ++ .../XapiCredentialPermissionsLevelSchema.php | 262 ++ src/Model/XapiCredentialPostSchema.php | 383 ++ src/Model/XapiCredentialSchema.php | 415 ++ src/Model/XapiCredentialsListSchema.php | 261 ++ src/Model/XapiEndpointSchema.php | 281 ++ src/Model/XapiInteractionComponent.php | 2 +- src/Model/XapiResult.php | 2 +- src/Model/XapiScore.php | 2 +- src/Model/XapiStatement.php | 2 +- src/Model/XapiStatementPipeListSchema.php | 235 + src/Model/XapiStatementPipePostSchema.php | 255 ++ src/Model/XapiStatementPipeSchema.php | 385 ++ src/Model/XapiStatementReference.php | 2 +- src/Model/XapiStatementResult.php | 2 +- src/Model/XapiVerb.php | 2 +- src/Model/ZoomiCompanyId.php | 229 + src/Model/ZoomiCourseOptionsSchema.php | 255 ++ src/ObjectSerializer.php | 2 +- 130 files changed, 22983 insertions(+), 394 deletions(-) create mode 100644 src/Api/AboutApi.php create mode 100644 src/Api/AdminApi.php create mode 100644 src/Api/DispatchApi.php create mode 100644 src/Api/InvitationsApi.php create mode 100644 src/Api/LearnerApi.php create mode 100644 src/Api/ReportingApi.php create mode 100644 src/Api/WebsiteApi.php create mode 100644 src/Api/XapiApi.php create mode 100644 src/Model/AboutSchema.php create mode 100644 src/Model/CreateDispatchIdSchema.php create mode 100644 src/Model/CreateDispatchListSchema.php create mode 100644 src/Model/CreateDispatchSchema.php create mode 100644 src/Model/CreatePrivateInvitationSchema.php create mode 100644 src/Model/CreatePublicInvitationSchema.php create mode 100644 src/Model/DestinationIdSchema.php create mode 100644 src/Model/DestinationListSchema.php create mode 100644 src/Model/DestinationSchema.php create mode 100644 src/Model/DispatchIdSchema.php create mode 100644 src/Model/DispatchListSchema.php create mode 100644 src/Model/DispatchRegistrationCountSchema.php create mode 100644 src/Model/DispatchSchema.php create mode 100644 src/Model/EnabledSchema.php create mode 100644 src/Model/InvitationEmailSchema.php create mode 100644 src/Model/InvitationJobStatusSchema.php create mode 100644 src/Model/InvitationSummaryList.php create mode 100644 src/Model/InvitationSummarySchema.php create mode 100644 src/Model/PrivateInvitationList.php create mode 100644 src/Model/PrivateInvitationSchema.php create mode 100644 src/Model/PublicInvitationList.php create mode 100644 src/Model/PublicInvitationSchema.php create mode 100644 src/Model/ReportageAccountInfoSchema.php create mode 100644 src/Model/ReportageAccountInfoUsageSchema.php create mode 100644 src/Model/ReportageAuthTokenSchema.php create mode 100644 src/Model/ReportageLinkSchema.php create mode 100644 src/Model/UpdateDispatchSchema.php create mode 100644 src/Model/UserInvitationList.php create mode 100644 src/Model/UserInvitationSchema.php create mode 100644 src/Model/UserInvitationSchemaRegistrationReport.php create mode 100644 src/Model/XapiCredentialAuthTypeSchema.php create mode 100644 src/Model/XapiCredentialPermissionsLevelSchema.php create mode 100644 src/Model/XapiCredentialPostSchema.php create mode 100644 src/Model/XapiCredentialSchema.php create mode 100644 src/Model/XapiCredentialsListSchema.php create mode 100644 src/Model/XapiEndpointSchema.php create mode 100644 src/Model/XapiStatementPipeListSchema.php create mode 100644 src/Model/XapiStatementPipePostSchema.php create mode 100644 src/Model/XapiStatementPipeSchema.php create mode 100644 src/Model/ZoomiCompanyId.php create mode 100644 src/Model/ZoomiCourseOptionsSchema.php diff --git a/README.md b/README.md index 3fe1ae5..72122ad 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ REST API used for SCORM Cloud integrations. This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: -- API version: 2.0 beta -- Package version: 1.0.0-beta +- API version: 2.0 +- Package version: 1.0.0 - Build package: io.swagger.codegen.languages.PhpClientCodegen ## Requirements diff --git a/autoload.php b/autoload.php index 837785c..d1bed99 100644 --- a/autoload.php +++ b/autoload.php @@ -5,7 +5,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/composer.json b/composer.json index 9bb3f72..d595e50 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "rustici-software/scormcloud-api-v2-client-php", - "version": "1.0.0-beta", + "version": "1.0.0", "description": "", "keywords": [ "scorm", diff --git a/src/Api/AboutApi.php b/src/Api/AboutApi.php new file mode 100644 index 0000000..d064a2f --- /dev/null +++ b/src/Api/AboutApi.php @@ -0,0 +1,168 @@ +apiClient = $apiClient; + } + + /** + * Get API client + * + * @return \RusticiSoftware\Cloud\V2\ApiClient get the API client + */ + public function getApiClient() + { + return $this->apiClient; + } + + /** + * Set the API client + * + * @param \RusticiSoftware\Cloud\V2\ApiClient $apiClient set the API client + * + * @return AboutApi + */ + public function setApiClient(\RusticiSoftware\Cloud\V2\ApiClient $apiClient) + { + $this->apiClient = $apiClient; + return $this; + } + + /** + * Operation getAbout + * + * Get back the version and platform of the running instance of Engine + * + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\AboutSchema + */ + public function getAbout() + { + list($response) = $this->getAboutWithHttpInfo(); + return $response; + } + + /** + * Operation getAboutWithHttpInfo + * + * Get back the version and platform of the running instance of Engine + * + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\AboutSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getAboutWithHttpInfo() + { + // parse inputs + $resourcePath = "/about"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\AboutSchema', + '/about' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\AboutSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\AboutSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } +} diff --git a/src/Api/AdminApi.php b/src/Api/AdminApi.php new file mode 100644 index 0000000..1bc3dc2 --- /dev/null +++ b/src/Api/AdminApi.php @@ -0,0 +1,500 @@ +apiClient = $apiClient; + } + + /** + * Get API client + * + * @return \RusticiSoftware\Cloud\V2\ApiClient get the API client + */ + public function getApiClient() + { + return $this->apiClient; + } + + /** + * Set the API client + * + * @param \RusticiSoftware\Cloud\V2\ApiClient $apiClient set the API client + * + * @return AdminApi + */ + public function setApiClient(\RusticiSoftware\Cloud\V2\ApiClient $apiClient) + { + $this->apiClient = $apiClient; + return $this; + } + + /** + * Operation deleteInvitationTags + * + * Delete tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function deleteInvitationTags($invitation_id, $tags) + { + list($response) = $this->deleteInvitationTagsWithHttpInfo($invitation_id, $tags); + return $response; + } + + /** + * Operation deleteInvitationTagsWithHttpInfo + * + * Delete tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteInvitationTagsWithHttpInfo($invitation_id, $tags) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling deleteInvitationTags'); + } + // verify the required parameter 'tags' is set + if ($tags === null) { + throw new \InvalidArgumentException('Missing the required parameter $tags when calling deleteInvitationTags'); + } + // parse inputs + $resourcePath = "/invitations/{invitationId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($tags)) { + $_tempBody = $tags; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/invitations/{invitationId}/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getInvitationTags + * + * Get the tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\TagListSchema + */ + public function getInvitationTags($invitation_id) + { + list($response) = $this->getInvitationTagsWithHttpInfo($invitation_id); + return $response; + } + + /** + * Operation getInvitationTagsWithHttpInfo + * + * Get the tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\TagListSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getInvitationTagsWithHttpInfo($invitation_id) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling getInvitationTags'); + } + // parse inputs + $resourcePath = "/invitations/{invitationId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\TagListSchema', + '/invitations/{invitationId}/tags' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\TagListSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\TagListSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation putInvitationTags + * + * Set the tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function putInvitationTags($invitation_id, $tags) + { + list($response) = $this->putInvitationTagsWithHttpInfo($invitation_id, $tags); + return $response; + } + + /** + * Operation putInvitationTagsWithHttpInfo + * + * Set the tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function putInvitationTagsWithHttpInfo($invitation_id, $tags) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling putInvitationTags'); + } + // verify the required parameter 'tags' is set + if ($tags === null) { + throw new \InvalidArgumentException('Missing the required parameter $tags when calling putInvitationTags'); + } + // parse inputs + $resourcePath = "/invitations/{invitationId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($tags)) { + $_tempBody = $tags; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/invitations/{invitationId}/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation putInvitationTagsBatch + * + * Sets all of the provided tags on all of the provided invitations + * + * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function putInvitationTagsBatch($batch) + { + list($response) = $this->putInvitationTagsBatchWithHttpInfo($batch); + return $response; + } + + /** + * Operation putInvitationTagsBatchWithHttpInfo + * + * Sets all of the provided tags on all of the provided invitations + * + * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function putInvitationTagsBatchWithHttpInfo($batch) + { + // verify the required parameter 'batch' is set + if ($batch === null) { + throw new \InvalidArgumentException('Missing the required parameter $batch when calling putInvitationTagsBatch'); + } + // parse inputs + $resourcePath = "/invitations/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($batch)) { + $_tempBody = $batch; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/invitations/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } +} diff --git a/src/Api/ApplicationManagementApi.php b/src/Api/ApplicationManagementApi.php index d1f7043..14b8d8b 100644 --- a/src/Api/ApplicationManagementApi.php +++ b/src/Api/ApplicationManagementApi.php @@ -14,7 +14,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -492,6 +492,111 @@ public function deleteApplicationWithHttpInfo($child_app_id) } } + /** + * Operation deleteApplicationConfigurationSetting + * + * Clears the `settingId` value for this level + * + * @param string $setting_id (required) + * @param string $learning_standard If specified, the request will be scoped to the provided learning standard. (optional) + * @param bool $single_sco Required if learningStandard is specified. Scopes settings to whether a package has only one SCO or assignable unit within it or not. To apply a configuration setting to a learning standard for single and multi-SCO content, it must be set for both scopes. (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function deleteApplicationConfigurationSetting($setting_id, $learning_standard = null, $single_sco = null) + { + list($response) = $this->deleteApplicationConfigurationSettingWithHttpInfo($setting_id, $learning_standard, $single_sco); + return $response; + } + + /** + * Operation deleteApplicationConfigurationSettingWithHttpInfo + * + * Clears the `settingId` value for this level + * + * @param string $setting_id (required) + * @param string $learning_standard If specified, the request will be scoped to the provided learning standard. (optional) + * @param bool $single_sco Required if learningStandard is specified. Scopes settings to whether a package has only one SCO or assignable unit within it or not. To apply a configuration setting to a learning standard for single and multi-SCO content, it must be set for both scopes. (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteApplicationConfigurationSettingWithHttpInfo($setting_id, $learning_standard = null, $single_sco = null) + { + // verify the required parameter 'setting_id' is set + if ($setting_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $setting_id when calling deleteApplicationConfigurationSetting'); + } + // parse inputs + $resourcePath = "/appManagement/configuration/{settingId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($learning_standard !== null) { + $queryParams['learningStandard'] = $this->apiClient->getSerializer()->toQueryValue($learning_standard); + } + // query params + if ($single_sco !== null) { + $queryParams['singleSco'] = $this->apiClient->getSerializer()->toQueryValue($single_sco); + } + // path params + if ($setting_id !== null) { + $resourcePath = str_replace( + "{" . "settingId" . "}", + $this->apiClient->getSerializer()->toPathValue($setting_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/appManagement/configuration/{settingId}' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + /** * Operation deleteCredential * diff --git a/src/Api/AuthenticationApi.php b/src/Api/AuthenticationApi.php index 5f20577..d5915df 100644 --- a/src/Api/AuthenticationApi.php +++ b/src/Api/AuthenticationApi.php @@ -14,7 +14,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Api/CourseApi.php b/src/Api/CourseApi.php index 38559c5..63795ce 100644 --- a/src/Api/CourseApi.php +++ b/src/Api/CourseApi.php @@ -14,7 +14,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -90,7 +90,7 @@ public function setApiClient(\RusticiSoftware\Cloud\V2\ApiClient $apiClient) /** * Operation buildCoursePreviewLaunchLink * - * + * Get a link to preview a course. * * @param string $course_id (required) * @param \RusticiSoftware\Cloud\V2\Model\LaunchLinkRequestSchema $launch_link_request (required) @@ -107,7 +107,7 @@ public function buildCoursePreviewLaunchLink($course_id, $launch_link_request, $ /** * Operation buildCoursePreviewLaunchLinkWithHttpInfo * - * + * Get a link to preview a course. * * @param string $course_id (required) * @param \RusticiSoftware\Cloud\V2\Model\LaunchLinkRequestSchema $launch_link_request (required) @@ -208,7 +208,7 @@ public function buildCoursePreviewLaunchLinkWithHttpInfo($course_id, $launch_lin /** * Operation buildCoursePreviewLaunchLinkWithVersion * - * + * Get a link to preview a particular course version. * * @param string $course_id (required) * @param int $version_id The course version (required) @@ -225,7 +225,7 @@ public function buildCoursePreviewLaunchLinkWithVersion($course_id, $version_id, /** * Operation buildCoursePreviewLaunchLinkWithVersionWithHttpInfo * - * + * Get a link to preview a particular course version. * * @param string $course_id (required) * @param int $version_id The course version (required) @@ -334,7 +334,7 @@ public function buildCoursePreviewLaunchLinkWithVersionWithHttpInfo($course_id, /** * Operation createFetchAndImportCourseJob * - * + * Fetch and import a course. * * @param string $course_id A unique identifier your application will use to identify the course after import. Your application is responsible both for generating this unique ID and for keeping track of the ID for later use. (required) * @param \RusticiSoftware\Cloud\V2\Model\ImportFetchRequestSchema $import_request (required) @@ -352,7 +352,7 @@ public function createFetchAndImportCourseJob($course_id, $import_request, $may_ /** * Operation createFetchAndImportCourseJobWithHttpInfo * - * + * Fetch and import a course. * * @param string $course_id A unique identifier your application will use to identify the course after import. Your application is responsible both for generating this unique ID and for keeping track of the ID for later use. (required) * @param \RusticiSoftware\Cloud\V2\Model\ImportFetchRequestSchema $import_request (required) @@ -454,7 +454,7 @@ public function createFetchAndImportCourseJobWithHttpInfo($course_id, $import_re /** * Operation createUploadAndImportCourseJob * - * + * Upload and import a course. * * @param string $course_id A unique identifier your application will use to identify the course after import. Your application is responsible both for generating this unique ID and for keeping track of the ID for later use. (required) * @param bool $may_create_new_version Is it OK to create a new version of this course? If this is set to false and the course already exists, the upload will fail. If true and the course already exists then a new version will be created. No effect if the course doesn't already exist. (optional, default to false) @@ -472,7 +472,7 @@ public function createUploadAndImportCourseJob($course_id, $may_create_new_versi /** * Operation createUploadAndImportCourseJobWithHttpInfo * - * + * Upload and import a course. * * @param string $course_id A unique identifier your application will use to identify the course after import. Your application is responsible both for generating this unique ID and for keeping track of the ID for later use. (required) * @param bool $may_create_new_version Is it OK to create a new version of this course? If this is set to false and the course already exists, the upload will fail. If true and the course already exists then a new version will be created. No effect if the course doesn't already exist. (optional, default to false) @@ -575,7 +575,7 @@ public function createUploadAndImportCourseJobWithHttpInfo($course_id, $may_crea /** * Operation deleteCourse * - * + * Delete a course. * * @param string $course_id (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -590,7 +590,7 @@ public function deleteCourse($course_id) /** * Operation deleteCourseWithHttpInfo * - * + * Delete a course. * * @param string $course_id (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -672,7 +672,7 @@ public function deleteCourseWithHttpInfo($course_id) /** * Operation deleteCourseConfigurationSetting * - * + * Clear a course configuration. * * @param string $course_id (required) * @param string $setting_id (required) @@ -688,7 +688,7 @@ public function deleteCourseConfigurationSetting($course_id, $setting_id) /** * Operation deleteCourseConfigurationSettingWithHttpInfo * - * + * Clear a course configuration. * * @param string $course_id (required) * @param string $setting_id (required) @@ -783,7 +783,7 @@ public function deleteCourseConfigurationSettingWithHttpInfo($course_id, $settin /** * Operation deleteCourseTags * - * + * Delete course tags. * * @param string $course_id (required) * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) @@ -799,7 +799,7 @@ public function deleteCourseTags($course_id, $tags) /** * Operation deleteCourseTagsWithHttpInfo * - * + * Delete course tags. * * @param string $course_id (required) * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) @@ -891,7 +891,7 @@ public function deleteCourseTagsWithHttpInfo($course_id, $tags) /** * Operation deleteCourseVersion * - * + * Delete a course version. * * @param string $course_id (required) * @param int $version_id The course version (required) @@ -907,7 +907,7 @@ public function deleteCourseVersion($course_id, $version_id) /** * Operation deleteCourseVersionWithHttpInfo * - * + * Delete a course version. * * @param string $course_id (required) * @param int $version_id The course version (required) @@ -1002,7 +1002,7 @@ public function deleteCourseVersionWithHttpInfo($course_id, $version_id) /** * Operation deleteCourseVersionConfigurationSetting * - * + * Clear a configuration setting for a version of a course. * * @param string $course_id (required) * @param int $version_id The course version (required) @@ -1019,7 +1019,7 @@ public function deleteCourseVersionConfigurationSetting($course_id, $version_id, /** * Operation deleteCourseVersionConfigurationSettingWithHttpInfo * - * + * Clear a configuration setting for a version of a course. * * @param string $course_id (required) * @param int $version_id The course version (required) @@ -1127,7 +1127,7 @@ public function deleteCourseVersionConfigurationSettingWithHttpInfo($course_id, /** * Operation getCourse * - * + * Get course details. * * @param string $course_id (required) * @param bool $include_registration_count Include the registration count in the results (optional, default to false) @@ -1144,7 +1144,7 @@ public function getCourse($course_id, $include_registration_count = null, $inclu /** * Operation getCourseWithHttpInfo * - * + * Get course details. * * @param string $course_id (required) * @param bool $include_registration_count Include the registration count in the results (optional, default to false) @@ -1240,7 +1240,7 @@ public function getCourseWithHttpInfo($course_id, $include_registration_count = /** * Operation getCourseConfiguration * - * + * Get course configuration. * * @param string $course_id (required) * @param bool $include_metadata (optional, default to false) @@ -1256,7 +1256,7 @@ public function getCourseConfiguration($course_id, $include_metadata = null) /** * Operation getCourseConfigurationWithHttpInfo * - * + * Get course configuration. * * @param string $course_id (required) * @param bool $include_metadata (optional, default to false) @@ -1347,7 +1347,7 @@ public function getCourseConfigurationWithHttpInfo($course_id, $include_metadata /** * Operation getCourseStatements * - * + * Get course xAPI statements. * * @param string $course_id (required) * @param string $learner_id Only entries for the specified learner id will be included. (optional) @@ -1366,7 +1366,7 @@ public function getCourseStatements($course_id, $learner_id = null, $since = nul /** * Operation getCourseStatementsWithHttpInfo * - * + * Get course xAPI statements. * * @param string $course_id (required) * @param string $learner_id Only entries for the specified learner id will be included. (optional) @@ -1472,7 +1472,7 @@ public function getCourseStatementsWithHttpInfo($course_id, $learner_id = null, /** * Operation getCourseTags * - * + * Get course tags. * * @param string $course_id (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -1487,7 +1487,7 @@ public function getCourseTags($course_id) /** * Operation getCourseTagsWithHttpInfo * - * + * Get course tags. * * @param string $course_id (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -1573,7 +1573,7 @@ public function getCourseTagsWithHttpInfo($course_id) /** * Operation getCourseVersionConfiguration * - * + * Get configuration for a version of a course. * * @param string $course_id (required) * @param int $version_id The course version (required) @@ -1590,7 +1590,7 @@ public function getCourseVersionConfiguration($course_id, $version_id, $include_ /** * Operation getCourseVersionConfigurationWithHttpInfo * - * + * Get configuration for a version of a course. * * @param string $course_id (required) * @param int $version_id The course version (required) @@ -1694,7 +1694,7 @@ public function getCourseVersionConfigurationWithHttpInfo($course_id, $version_i /** * Operation getCourseVersionInfo * - * + * Get details on a course version. * * @param string $course_id (required) * @param int $version_id The course version (required) @@ -1712,7 +1712,7 @@ public function getCourseVersionInfo($course_id, $version_id, $include_registrat /** * Operation getCourseVersionInfoWithHttpInfo * - * + * Get details on a course version. * * @param string $course_id (required) * @param int $version_id The course version (required) @@ -1821,7 +1821,7 @@ public function getCourseVersionInfoWithHttpInfo($course_id, $version_id, $inclu /** * Operation getCourseVersionStatements * - * + * Get xAPI statements for a course version. * * @param string $course_id (required) * @param int $version_id The course version (required) @@ -1841,7 +1841,7 @@ public function getCourseVersionStatements($course_id, $version_id, $learner_id /** * Operation getCourseVersionStatementsWithHttpInfo * - * + * Get xAPI statements for a course version. * * @param string $course_id (required) * @param int $version_id The course version (required) @@ -1960,7 +1960,7 @@ public function getCourseVersionStatementsWithHttpInfo($course_id, $version_id, /** * Operation getCourseVersions * - * + * Get details on a course's versions. * * @param string $course_id (required) * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) @@ -1979,7 +1979,7 @@ public function getCourseVersions($course_id, $since = null, $until = null, $inc /** * Operation getCourseVersionsWithHttpInfo * - * + * Get details on a course's versions. * * @param string $course_id (required) * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) @@ -2085,7 +2085,7 @@ public function getCourseVersionsWithHttpInfo($course_id, $since = null, $until /** * Operation getCourses * - * + * Get all courses. * * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) @@ -2108,7 +2108,7 @@ public function getCourses($more = null, $since = null, $until = null, $filter = /** * Operation getCoursesWithHttpInfo * - * + * Get all courses. * * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) @@ -2225,7 +2225,7 @@ public function getCoursesWithHttpInfo($more = null, $since = null, $until = nul /** * Operation getImportJobStatus * - * + * Get course import job status. * * @param string $import_job_id Id received when the import job was submitted to the importJobs resource. (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -2240,7 +2240,7 @@ public function getImportJobStatus($import_job_id) /** * Operation getImportJobStatusWithHttpInfo * - * + * Get course import job status. * * @param string $import_job_id Id received when the import job was submitted to the importJobs resource. (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -2326,7 +2326,7 @@ public function getImportJobStatusWithHttpInfo($import_job_id) /** * Operation putCourseTags * - * + * Set course tags. * * @param string $course_id (required) * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) @@ -2342,7 +2342,7 @@ public function putCourseTags($course_id, $tags) /** * Operation putCourseTagsWithHttpInfo * - * + * Set course tags. * * @param string $course_id (required) * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) @@ -2434,7 +2434,7 @@ public function putCourseTagsWithHttpInfo($course_id, $tags) /** * Operation putCourseTagsBatch * - * + * Set tags on courses. * * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -2449,7 +2449,7 @@ public function putCourseTagsBatch($batch) /** * Operation putCourseTagsBatchWithHttpInfo * - * + * Set tags on courses. * * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -2525,10 +2525,104 @@ public function putCourseTagsBatchWithHttpInfo($batch) } } + /** + * Operation putLearnerTagsBatch + * + * Sets all of the provided tags on all of the provided learners + * + * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function putLearnerTagsBatch($batch) + { + list($response) = $this->putLearnerTagsBatchWithHttpInfo($batch); + return $response; + } + + /** + * Operation putLearnerTagsBatchWithHttpInfo + * + * Sets all of the provided tags on all of the provided learners + * + * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function putLearnerTagsBatchWithHttpInfo($batch) + { + // verify the required parameter 'batch' is set + if ($batch === null) { + throw new \InvalidArgumentException('Missing the required parameter $batch when calling putLearnerTagsBatch'); + } + // parse inputs + $resourcePath = "/learner/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($batch)) { + $_tempBody = $batch; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/learner/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + /** * Operation setCourseConfiguration * - * + * Set course configuration. * * @param string $course_id (required) * @param \RusticiSoftware\Cloud\V2\Model\SettingsPostSchema $configuration_settings (required) @@ -2544,7 +2638,7 @@ public function setCourseConfiguration($course_id, $configuration_settings) /** * Operation setCourseConfigurationWithHttpInfo * - * + * Set course configuration. * * @param string $course_id (required) * @param \RusticiSoftware\Cloud\V2\Model\SettingsPostSchema $configuration_settings (required) @@ -2636,7 +2730,7 @@ public function setCourseConfigurationWithHttpInfo($course_id, $configuration_se /** * Operation setCourseTitle * - * + * Set the title of a course. * * @param string $course_id (required) * @param \RusticiSoftware\Cloud\V2\Model\TitleSchema $title (required) @@ -2652,7 +2746,7 @@ public function setCourseTitle($course_id, $title) /** * Operation setCourseTitleWithHttpInfo * - * + * Set the title of a course. * * @param string $course_id (required) * @param \RusticiSoftware\Cloud\V2\Model\TitleSchema $title (required) @@ -2744,7 +2838,7 @@ public function setCourseTitleWithHttpInfo($course_id, $title) /** * Operation setCourseVersionConfiguration * - * + * Set configuration for a version of a course. * * @param string $course_id (required) * @param int $version_id The course version (required) @@ -2761,7 +2855,7 @@ public function setCourseVersionConfiguration($course_id, $version_id, $configur /** * Operation setCourseVersionConfigurationWithHttpInfo * - * + * Set configuration for a version of a course. * * @param string $course_id (required) * @param int $version_id The course version (required) diff --git a/src/Api/DispatchApi.php b/src/Api/DispatchApi.php new file mode 100644 index 0000000..520ebfa --- /dev/null +++ b/src/Api/DispatchApi.php @@ -0,0 +1,3769 @@ +apiClient = $apiClient; + } + + /** + * Get API client + * + * @return \RusticiSoftware\Cloud\V2\ApiClient get the API client + */ + public function getApiClient() + { + return $this->apiClient; + } + + /** + * Set the API client + * + * @param \RusticiSoftware\Cloud\V2\ApiClient $apiClient set the API client + * + * @return DispatchApi + */ + public function setApiClient(\RusticiSoftware\Cloud\V2\ApiClient $apiClient) + { + $this->apiClient = $apiClient; + return $this; + } + + /** + * Operation createDestinations + * + * DestinationsByTenant + * + * @param \RusticiSoftware\Cloud\V2\Model\DestinationListSchema $destinations_list (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function createDestinations($destinations_list) + { + list($response) = $this->createDestinationsWithHttpInfo($destinations_list); + return $response; + } + + /** + * Operation createDestinationsWithHttpInfo + * + * DestinationsByTenant + * + * @param \RusticiSoftware\Cloud\V2\Model\DestinationListSchema $destinations_list (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function createDestinationsWithHttpInfo($destinations_list) + { + // verify the required parameter 'destinations_list' is set + if ($destinations_list === null) { + throw new \InvalidArgumentException('Missing the required parameter $destinations_list when calling createDestinations'); + } + // parse inputs + $resourcePath = "/dispatch/destinations"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($destinations_list)) { + $_tempBody = $destinations_list; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/destinations' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation createDispatches + * + * Create dispatches. + * + * @param \RusticiSoftware\Cloud\V2\Model\CreateDispatchListSchema $dispatch_list (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function createDispatches($dispatch_list) + { + list($response) = $this->createDispatchesWithHttpInfo($dispatch_list); + return $response; + } + + /** + * Operation createDispatchesWithHttpInfo + * + * Create dispatches. + * + * @param \RusticiSoftware\Cloud\V2\Model\CreateDispatchListSchema $dispatch_list (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function createDispatchesWithHttpInfo($dispatch_list) + { + // verify the required parameter 'dispatch_list' is set + if ($dispatch_list === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_list when calling createDispatches'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($dispatch_list)) { + $_tempBody = $dispatch_list; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/dispatches' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation deleteDestination + * + * DestinationsByTenantAndDestinationId + * + * @param string $destination_id Identifier for the destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function deleteDestination($destination_id) + { + list($response) = $this->deleteDestinationWithHttpInfo($destination_id); + return $response; + } + + /** + * Operation deleteDestinationWithHttpInfo + * + * DestinationsByTenantAndDestinationId + * + * @param string $destination_id Identifier for the destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteDestinationWithHttpInfo($destination_id) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling deleteDestination'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/destinations/{destinationId}' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation deleteDestinationDispatches + * + * DestinationsDispatchesByTenant + * + * @param string $destination_id Identifier for the destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function deleteDestinationDispatches($destination_id) + { + list($response) = $this->deleteDestinationDispatchesWithHttpInfo($destination_id); + return $response; + } + + /** + * Operation deleteDestinationDispatchesWithHttpInfo + * + * DestinationsDispatchesByTenant + * + * @param string $destination_id Identifier for the destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteDestinationDispatchesWithHttpInfo($destination_id) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling deleteDestinationDispatches'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}/dispatches"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/destinations/{destinationId}/dispatches' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation deleteDestinationTags + * + * Delete tags for this destination + * + * @param string $destination_id Identifier for the destination (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function deleteDestinationTags($destination_id, $tags) + { + list($response) = $this->deleteDestinationTagsWithHttpInfo($destination_id, $tags); + return $response; + } + + /** + * Operation deleteDestinationTagsWithHttpInfo + * + * Delete tags for this destination + * + * @param string $destination_id Identifier for the destination (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteDestinationTagsWithHttpInfo($destination_id, $tags) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling deleteDestinationTags'); + } + // verify the required parameter 'tags' is set + if ($tags === null) { + throw new \InvalidArgumentException('Missing the required parameter $tags when calling deleteDestinationTags'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($tags)) { + $_tempBody = $tags; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/destinations/{destinationId}/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation deleteDispatch + * + * DispatchesByTenantAndDispatchId + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function deleteDispatch($dispatch_id) + { + list($response) = $this->deleteDispatchWithHttpInfo($dispatch_id); + return $response; + } + + /** + * Operation deleteDispatchWithHttpInfo + * + * DispatchesByTenantAndDispatchId + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteDispatchWithHttpInfo($dispatch_id) + { + // verify the required parameter 'dispatch_id' is set + if ($dispatch_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_id when calling deleteDispatch'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/{dispatchId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($dispatch_id !== null) { + $resourcePath = str_replace( + "{" . "dispatchId" . "}", + $this->apiClient->getSerializer()->toPathValue($dispatch_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/dispatches/{dispatchId}' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation deleteDispatchPostbackInfo + * + * DispatchesByTenantAndDispatchId + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function deleteDispatchPostbackInfo($dispatch_id) + { + list($response) = $this->deleteDispatchPostbackInfoWithHttpInfo($dispatch_id); + return $response; + } + + /** + * Operation deleteDispatchPostbackInfoWithHttpInfo + * + * DispatchesByTenantAndDispatchId + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteDispatchPostbackInfoWithHttpInfo($dispatch_id) + { + // verify the required parameter 'dispatch_id' is set + if ($dispatch_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_id when calling deleteDispatchPostbackInfo'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/{dispatchId}/postback"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($dispatch_id !== null) { + $resourcePath = str_replace( + "{" . "dispatchId" . "}", + $this->apiClient->getSerializer()->toPathValue($dispatch_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/dispatches/{dispatchId}/postback' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation deleteDispatchTags + * + * Delete tags for this dispatch + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function deleteDispatchTags($dispatch_id, $tags) + { + list($response) = $this->deleteDispatchTagsWithHttpInfo($dispatch_id, $tags); + return $response; + } + + /** + * Operation deleteDispatchTagsWithHttpInfo + * + * Delete tags for this dispatch + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteDispatchTagsWithHttpInfo($dispatch_id, $tags) + { + // verify the required parameter 'dispatch_id' is set + if ($dispatch_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_id when calling deleteDispatchTags'); + } + // verify the required parameter 'tags' is set + if ($tags === null) { + throw new \InvalidArgumentException('Missing the required parameter $tags when calling deleteDispatchTags'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/{dispatchId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($dispatch_id !== null) { + $resourcePath = str_replace( + "{" . "dispatchId" . "}", + $this->apiClient->getSerializer()->toPathValue($dispatch_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($tags)) { + $_tempBody = $tags; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/dispatches/{dispatchId}/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation enableRegistrationInstancing + * + * DestinationsDispatchesRegistrationInstancing + * + * @param string $destination_id Identifier for the destination (required) + * @param \RusticiSoftware\Cloud\V2\Model\EnabledSchema $enabled (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function enableRegistrationInstancing($destination_id, $enabled) + { + list($response) = $this->enableRegistrationInstancingWithHttpInfo($destination_id, $enabled); + return $response; + } + + /** + * Operation enableRegistrationInstancingWithHttpInfo + * + * DestinationsDispatchesRegistrationInstancing + * + * @param string $destination_id Identifier for the destination (required) + * @param \RusticiSoftware\Cloud\V2\Model\EnabledSchema $enabled (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function enableRegistrationInstancingWithHttpInfo($destination_id, $enabled) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling enableRegistrationInstancing'); + } + // verify the required parameter 'enabled' is set + if ($enabled === null) { + throw new \InvalidArgumentException('Missing the required parameter $enabled when calling enableRegistrationInstancing'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}/dispatches/registrationInstancing"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($enabled)) { + $_tempBody = $enabled; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/destinations/{destinationId}/dispatches/registrationInstancing' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getDestination + * + * Get destination information by destinationId. + * + * @param string $destination_id Identifier for the destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\DestinationSchema + */ + public function getDestination($destination_id) + { + list($response) = $this->getDestinationWithHttpInfo($destination_id); + return $response; + } + + /** + * Operation getDestinationWithHttpInfo + * + * Get destination information by destinationId. + * + * @param string $destination_id Identifier for the destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\DestinationSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getDestinationWithHttpInfo($destination_id) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling getDestination'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\DestinationSchema', + '/dispatch/destinations/{destinationId}' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\DestinationSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\DestinationSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getDestinationDispatchRegistrationCount + * + * DestinationsDispatchesRegistrationCount + * + * @param string $destination_id Identifier for the destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\IntegerResultSchema + */ + public function getDestinationDispatchRegistrationCount($destination_id) + { + list($response) = $this->getDestinationDispatchRegistrationCountWithHttpInfo($destination_id); + return $response; + } + + /** + * Operation getDestinationDispatchRegistrationCountWithHttpInfo + * + * DestinationsDispatchesRegistrationCount + * + * @param string $destination_id Identifier for the destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\IntegerResultSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getDestinationDispatchRegistrationCountWithHttpInfo($destination_id) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling getDestinationDispatchRegistrationCount'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}/dispatches/registrationCount"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\IntegerResultSchema', + '/dispatch/destinations/{destinationId}/dispatches/registrationCount' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\IntegerResultSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\IntegerResultSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getDestinationDispatchZip + * + * Get a ZIP of related dispatches. + * + * @param string $destination_id Identifier for the destination (required) + * @param string $type The type of dispatch package to export (SCORM12 only supported in cloud today) (optional, default to SCORM12) + * @param string $css_url (optional) + * @param string[] $tags (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \SplFileObject + */ + public function getDestinationDispatchZip($destination_id, $type = null, $css_url = null, $tags = null) + { + list($response) = $this->getDestinationDispatchZipWithHttpInfo($destination_id, $type, $css_url, $tags); + return $response; + } + + /** + * Operation getDestinationDispatchZipWithHttpInfo + * + * Get a ZIP of related dispatches. + * + * @param string $destination_id Identifier for the destination (required) + * @param string $type The type of dispatch package to export (SCORM12 only supported in cloud today) (optional, default to SCORM12) + * @param string $css_url (optional) + * @param string[] $tags (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \SplFileObject, HTTP status code, HTTP response headers (array of strings) + */ + public function getDestinationDispatchZipWithHttpInfo($destination_id, $type = null, $css_url = null, $tags = null) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling getDestinationDispatchZip'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}/dispatches/zip"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/zip']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($type !== null) { + $queryParams['type'] = $this->apiClient->getSerializer()->toQueryValue($type); + } + // query params + if ($css_url !== null) { + $queryParams['cssUrl'] = $this->apiClient->getSerializer()->toQueryValue($css_url); + } + // query params + if (is_array($tags)) { + $tags = $this->apiClient->getSerializer()->serializeCollection($tags, 'csv', true); + } + if ($tags !== null) { + $queryParams['tags'] = $this->apiClient->getSerializer()->toQueryValue($tags); + } + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\SplFileObject', + '/dispatch/destinations/{destinationId}/dispatches/zip' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\SplFileObject', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\SplFileObject', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getDestinationDispatches + * + * Get a list of dispatches in this destination + * + * @param string $destination_id Identifier for the destination (required) + * @param string $course_id Only retreive resources having `courseId` (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param string[] $tags (optional) + * @param string $datetime_filter A string describing what the since/until parameters will be applied to. Options are: 'created' or 'updated'. If not provided, it will default to `updated`. (optional, default to updated) + * @param string $order_by (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\DispatchListSchema + */ + public function getDestinationDispatches($destination_id, $course_id = null, $more = null, $since = null, $until = null, $tags = null, $datetime_filter = null, $order_by = null) + { + list($response) = $this->getDestinationDispatchesWithHttpInfo($destination_id, $course_id, $more, $since, $until, $tags, $datetime_filter, $order_by); + return $response; + } + + /** + * Operation getDestinationDispatchesWithHttpInfo + * + * Get a list of dispatches in this destination + * + * @param string $destination_id Identifier for the destination (required) + * @param string $course_id Only retreive resources having `courseId` (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param string[] $tags (optional) + * @param string $datetime_filter A string describing what the since/until parameters will be applied to. Options are: 'created' or 'updated'. If not provided, it will default to `updated`. (optional, default to updated) + * @param string $order_by (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\DispatchListSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getDestinationDispatchesWithHttpInfo($destination_id, $course_id = null, $more = null, $since = null, $until = null, $tags = null, $datetime_filter = null, $order_by = null) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling getDestinationDispatches'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}/dispatches"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($course_id !== null) { + $queryParams['courseId'] = $this->apiClient->getSerializer()->toQueryValue($course_id); + } + // query params + if ($more !== null) { + $queryParams['more'] = $this->apiClient->getSerializer()->toQueryValue($more); + } + // query params + if ($since !== null) { + $queryParams['since'] = $this->apiClient->getSerializer()->toQueryValue($since); + } + // query params + if ($until !== null) { + $queryParams['until'] = $this->apiClient->getSerializer()->toQueryValue($until); + } + // query params + if (is_array($tags)) { + $tags = $this->apiClient->getSerializer()->serializeCollection($tags, 'csv', true); + } + if ($tags !== null) { + $queryParams['tags'] = $this->apiClient->getSerializer()->toQueryValue($tags); + } + // query params + if ($datetime_filter !== null) { + $queryParams['datetimeFilter'] = $this->apiClient->getSerializer()->toQueryValue($datetime_filter); + } + // query params + if ($order_by !== null) { + $queryParams['orderBy'] = $this->apiClient->getSerializer()->toQueryValue($order_by); + } + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\DispatchListSchema', + '/dispatch/destinations/{destinationId}/dispatches' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\DispatchListSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\DispatchListSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getDestinationHashUserInfo + * + * True if the destination is set to hash user info, or false if it is disabled. + * + * @param string $destination_id Identifier for the destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\EnabledSchema + */ + public function getDestinationHashUserInfo($destination_id) + { + list($response) = $this->getDestinationHashUserInfoWithHttpInfo($destination_id); + return $response; + } + + /** + * Operation getDestinationHashUserInfoWithHttpInfo + * + * True if the destination is set to hash user info, or false if it is disabled. + * + * @param string $destination_id Identifier for the destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\EnabledSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getDestinationHashUserInfoWithHttpInfo($destination_id) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling getDestinationHashUserInfo'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}/dispatches/hashUserInfo"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\EnabledSchema', + '/dispatch/destinations/{destinationId}/dispatches/hashUserInfo' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\EnabledSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\EnabledSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getDestinationTags + * + * Get the tags for this destination + * + * @param string $destination_id Identifier for the destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\TagListSchema + */ + public function getDestinationTags($destination_id) + { + list($response) = $this->getDestinationTagsWithHttpInfo($destination_id); + return $response; + } + + /** + * Operation getDestinationTagsWithHttpInfo + * + * Get the tags for this destination + * + * @param string $destination_id Identifier for the destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\TagListSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getDestinationTagsWithHttpInfo($destination_id) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling getDestinationTags'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\TagListSchema', + '/dispatch/destinations/{destinationId}/tags' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\TagListSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\TagListSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getDestinations + * + * getAllDestinations + * + * @param string $course_id Only retreive resources having `courseId` (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param string[] $tags (optional) + * @param string $datetime_filter A string describing what the since/until parameters will be applied to. Options are: 'created' or 'updated'. If not provided, it will default to `updated`. (optional, default to updated) + * @param string $order_by Optional enum parameter for specifying the field and order by which to sort the results. Defaults to updated_asc (optional, default to updated_asc) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\DestinationListSchema + */ + public function getDestinations($course_id = null, $more = null, $since = null, $until = null, $tags = null, $datetime_filter = null, $order_by = null) + { + list($response) = $this->getDestinationsWithHttpInfo($course_id, $more, $since, $until, $tags, $datetime_filter, $order_by); + return $response; + } + + /** + * Operation getDestinationsWithHttpInfo + * + * getAllDestinations + * + * @param string $course_id Only retreive resources having `courseId` (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param string[] $tags (optional) + * @param string $datetime_filter A string describing what the since/until parameters will be applied to. Options are: 'created' or 'updated'. If not provided, it will default to `updated`. (optional, default to updated) + * @param string $order_by Optional enum parameter for specifying the field and order by which to sort the results. Defaults to updated_asc (optional, default to updated_asc) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\DestinationListSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getDestinationsWithHttpInfo($course_id = null, $more = null, $since = null, $until = null, $tags = null, $datetime_filter = null, $order_by = null) + { + // parse inputs + $resourcePath = "/dispatch/destinations"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($course_id !== null) { + $queryParams['courseId'] = $this->apiClient->getSerializer()->toQueryValue($course_id); + } + // query params + if ($more !== null) { + $queryParams['more'] = $this->apiClient->getSerializer()->toQueryValue($more); + } + // query params + if ($since !== null) { + $queryParams['since'] = $this->apiClient->getSerializer()->toQueryValue($since); + } + // query params + if ($until !== null) { + $queryParams['until'] = $this->apiClient->getSerializer()->toQueryValue($until); + } + // query params + if (is_array($tags)) { + $tags = $this->apiClient->getSerializer()->serializeCollection($tags, 'csv', true); + } + if ($tags !== null) { + $queryParams['tags'] = $this->apiClient->getSerializer()->toQueryValue($tags); + } + // query params + if ($datetime_filter !== null) { + $queryParams['datetimeFilter'] = $this->apiClient->getSerializer()->toQueryValue($datetime_filter); + } + // query params + if ($order_by !== null) { + $queryParams['orderBy'] = $this->apiClient->getSerializer()->toQueryValue($order_by); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\DestinationListSchema', + '/dispatch/destinations' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\DestinationListSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\DestinationListSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getDispatch + * + * Get dispatch by id. + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\DispatchSchema + */ + public function getDispatch($dispatch_id) + { + list($response) = $this->getDispatchWithHttpInfo($dispatch_id); + return $response; + } + + /** + * Operation getDispatchWithHttpInfo + * + * Get dispatch by id. + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\DispatchSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getDispatchWithHttpInfo($dispatch_id) + { + // verify the required parameter 'dispatch_id' is set + if ($dispatch_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_id when calling getDispatch'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/{dispatchId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($dispatch_id !== null) { + $resourcePath = str_replace( + "{" . "dispatchId" . "}", + $this->apiClient->getSerializer()->toPathValue($dispatch_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\DispatchSchema', + '/dispatch/dispatches/{dispatchId}' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\DispatchSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\DispatchSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getDispatchEnabled + * + * DispatchesEnabledByTenantAndDispatchId + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\EnabledSchema + */ + public function getDispatchEnabled($dispatch_id) + { + list($response) = $this->getDispatchEnabledWithHttpInfo($dispatch_id); + return $response; + } + + /** + * Operation getDispatchEnabledWithHttpInfo + * + * DispatchesEnabledByTenantAndDispatchId + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\EnabledSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getDispatchEnabledWithHttpInfo($dispatch_id) + { + // verify the required parameter 'dispatch_id' is set + if ($dispatch_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_id when calling getDispatchEnabled'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/{dispatchId}/enabled"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($dispatch_id !== null) { + $resourcePath = str_replace( + "{" . "dispatchId" . "}", + $this->apiClient->getSerializer()->toPathValue($dispatch_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\EnabledSchema', + '/dispatch/dispatches/{dispatchId}/enabled' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\EnabledSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\EnabledSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getDispatchHashUserInfo + * + * Get if this dispatch has PII hashing enabled. + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\EnabledSchema + */ + public function getDispatchHashUserInfo($dispatch_id) + { + list($response) = $this->getDispatchHashUserInfoWithHttpInfo($dispatch_id); + return $response; + } + + /** + * Operation getDispatchHashUserInfoWithHttpInfo + * + * Get if this dispatch has PII hashing enabled. + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\EnabledSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getDispatchHashUserInfoWithHttpInfo($dispatch_id) + { + // verify the required parameter 'dispatch_id' is set + if ($dispatch_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_id when calling getDispatchHashUserInfo'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/{dispatchId}/hashUserInfo"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($dispatch_id !== null) { + $resourcePath = str_replace( + "{" . "dispatchId" . "}", + $this->apiClient->getSerializer()->toPathValue($dispatch_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\EnabledSchema', + '/dispatch/dispatches/{dispatchId}/hashUserInfo' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\EnabledSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\EnabledSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getDispatchRegistrationCount + * + * DispatchesRegistrationCountByTenant + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\DispatchRegistrationCountSchema + */ + public function getDispatchRegistrationCount($dispatch_id) + { + list($response) = $this->getDispatchRegistrationCountWithHttpInfo($dispatch_id); + return $response; + } + + /** + * Operation getDispatchRegistrationCountWithHttpInfo + * + * DispatchesRegistrationCountByTenant + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\DispatchRegistrationCountSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getDispatchRegistrationCountWithHttpInfo($dispatch_id) + { + // verify the required parameter 'dispatch_id' is set + if ($dispatch_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_id when calling getDispatchRegistrationCount'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/{dispatchId}/registrationCount"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($dispatch_id !== null) { + $resourcePath = str_replace( + "{" . "dispatchId" . "}", + $this->apiClient->getSerializer()->toPathValue($dispatch_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\DispatchRegistrationCountSchema', + '/dispatch/dispatches/{dispatchId}/registrationCount' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\DispatchRegistrationCountSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\DispatchRegistrationCountSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getDispatchTags + * + * Get the tags for this dispatch + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\TagListSchema + */ + public function getDispatchTags($dispatch_id) + { + list($response) = $this->getDispatchTagsWithHttpInfo($dispatch_id); + return $response; + } + + /** + * Operation getDispatchTagsWithHttpInfo + * + * Get the tags for this dispatch + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\TagListSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getDispatchTagsWithHttpInfo($dispatch_id) + { + // verify the required parameter 'dispatch_id' is set + if ($dispatch_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_id when calling getDispatchTags'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/{dispatchId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($dispatch_id !== null) { + $resourcePath = str_replace( + "{" . "dispatchId" . "}", + $this->apiClient->getSerializer()->toPathValue($dispatch_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\TagListSchema', + '/dispatch/dispatches/{dispatchId}/tags' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\TagListSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\TagListSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getDispatchZip + * + * Get the ZIP for the dispatchId. + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @param string $type The type of dispatch package to export (SCORM12 only supported in cloud today) (optional, default to SCORM12) + * @param string $css_url (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \SplFileObject + */ + public function getDispatchZip($dispatch_id, $type = null, $css_url = null) + { + list($response) = $this->getDispatchZipWithHttpInfo($dispatch_id, $type, $css_url); + return $response; + } + + /** + * Operation getDispatchZipWithHttpInfo + * + * Get the ZIP for the dispatchId. + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @param string $type The type of dispatch package to export (SCORM12 only supported in cloud today) (optional, default to SCORM12) + * @param string $css_url (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \SplFileObject, HTTP status code, HTTP response headers (array of strings) + */ + public function getDispatchZipWithHttpInfo($dispatch_id, $type = null, $css_url = null) + { + // verify the required parameter 'dispatch_id' is set + if ($dispatch_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_id when calling getDispatchZip'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/{dispatchId}/zip"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/zip']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($type !== null) { + $queryParams['type'] = $this->apiClient->getSerializer()->toQueryValue($type); + } + // query params + if ($css_url !== null) { + $queryParams['cssUrl'] = $this->apiClient->getSerializer()->toQueryValue($css_url); + } + // path params + if ($dispatch_id !== null) { + $resourcePath = str_replace( + "{" . "dispatchId" . "}", + $this->apiClient->getSerializer()->toPathValue($dispatch_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\SplFileObject', + '/dispatch/dispatches/{dispatchId}/zip' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\SplFileObject', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\SplFileObject', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getDispatches + * + * All Dispatches in the system for an AppId + * + * @param string $course_id Only retreive resources having `courseId` (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param string[] $tags (optional) + * @param string $datetime_filter A string describing what the since/until parameters will be applied to. Options are: 'created' or 'updated'. If not provided, it will default to `updated`. (optional, default to updated) + * @param string $order_by Optional enum parameter for specifying the field and order by which to sort the results. Defaults to updated_asc (optional, default to updated_asc) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\DispatchListSchema + */ + public function getDispatches($course_id = null, $more = null, $since = null, $until = null, $tags = null, $datetime_filter = null, $order_by = null) + { + list($response) = $this->getDispatchesWithHttpInfo($course_id, $more, $since, $until, $tags, $datetime_filter, $order_by); + return $response; + } + + /** + * Operation getDispatchesWithHttpInfo + * + * All Dispatches in the system for an AppId + * + * @param string $course_id Only retreive resources having `courseId` (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param string[] $tags (optional) + * @param string $datetime_filter A string describing what the since/until parameters will be applied to. Options are: 'created' or 'updated'. If not provided, it will default to `updated`. (optional, default to updated) + * @param string $order_by Optional enum parameter for specifying the field and order by which to sort the results. Defaults to updated_asc (optional, default to updated_asc) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\DispatchListSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getDispatchesWithHttpInfo($course_id = null, $more = null, $since = null, $until = null, $tags = null, $datetime_filter = null, $order_by = null) + { + // parse inputs + $resourcePath = "/dispatch/dispatches"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($course_id !== null) { + $queryParams['courseId'] = $this->apiClient->getSerializer()->toQueryValue($course_id); + } + // query params + if ($more !== null) { + $queryParams['more'] = $this->apiClient->getSerializer()->toQueryValue($more); + } + // query params + if ($since !== null) { + $queryParams['since'] = $this->apiClient->getSerializer()->toQueryValue($since); + } + // query params + if ($until !== null) { + $queryParams['until'] = $this->apiClient->getSerializer()->toQueryValue($until); + } + // query params + if (is_array($tags)) { + $tags = $this->apiClient->getSerializer()->serializeCollection($tags, 'csv', true); + } + if ($tags !== null) { + $queryParams['tags'] = $this->apiClient->getSerializer()->toQueryValue($tags); + } + // query params + if ($datetime_filter !== null) { + $queryParams['datetimeFilter'] = $this->apiClient->getSerializer()->toQueryValue($datetime_filter); + } + // query params + if ($order_by !== null) { + $queryParams['orderBy'] = $this->apiClient->getSerializer()->toQueryValue($order_by); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\DispatchListSchema', + '/dispatch/dispatches' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\DispatchListSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\DispatchListSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation putDestinationTags + * + * Set the tags for this destination + * + * @param string $destination_id Identifier for the destination (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function putDestinationTags($destination_id, $tags) + { + list($response) = $this->putDestinationTagsWithHttpInfo($destination_id, $tags); + return $response; + } + + /** + * Operation putDestinationTagsWithHttpInfo + * + * Set the tags for this destination + * + * @param string $destination_id Identifier for the destination (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function putDestinationTagsWithHttpInfo($destination_id, $tags) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling putDestinationTags'); + } + // verify the required parameter 'tags' is set + if ($tags === null) { + throw new \InvalidArgumentException('Missing the required parameter $tags when calling putDestinationTags'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($tags)) { + $_tempBody = $tags; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/destinations/{destinationId}/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation putDestinationTagsBatch + * + * Sets all of the provided tags on all of the provided destinations + * + * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function putDestinationTagsBatch($batch) + { + list($response) = $this->putDestinationTagsBatchWithHttpInfo($batch); + return $response; + } + + /** + * Operation putDestinationTagsBatchWithHttpInfo + * + * Sets all of the provided tags on all of the provided destinations + * + * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function putDestinationTagsBatchWithHttpInfo($batch) + { + // verify the required parameter 'batch' is set + if ($batch === null) { + throw new \InvalidArgumentException('Missing the required parameter $batch when calling putDestinationTagsBatch'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($batch)) { + $_tempBody = $batch; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/destinations/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation putDispatchTags + * + * Set the tags for this dispatch + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function putDispatchTags($dispatch_id, $tags) + { + list($response) = $this->putDispatchTagsWithHttpInfo($dispatch_id, $tags); + return $response; + } + + /** + * Operation putDispatchTagsWithHttpInfo + * + * Set the tags for this dispatch + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function putDispatchTagsWithHttpInfo($dispatch_id, $tags) + { + // verify the required parameter 'dispatch_id' is set + if ($dispatch_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_id when calling putDispatchTags'); + } + // verify the required parameter 'tags' is set + if ($tags === null) { + throw new \InvalidArgumentException('Missing the required parameter $tags when calling putDispatchTags'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/{dispatchId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($dispatch_id !== null) { + $resourcePath = str_replace( + "{" . "dispatchId" . "}", + $this->apiClient->getSerializer()->toPathValue($dispatch_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($tags)) { + $_tempBody = $tags; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/dispatches/{dispatchId}/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation putDispatchTagsBatch + * + * Sets all of the provided tags on all of the provided dispatches + * + * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function putDispatchTagsBatch($batch) + { + list($response) = $this->putDispatchTagsBatchWithHttpInfo($batch); + return $response; + } + + /** + * Operation putDispatchTagsBatchWithHttpInfo + * + * Sets all of the provided tags on all of the provided dispatches + * + * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function putDispatchTagsBatchWithHttpInfo($batch) + { + // verify the required parameter 'batch' is set + if ($batch === null) { + throw new \InvalidArgumentException('Missing the required parameter $batch when calling putDispatchTagsBatch'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($batch)) { + $_tempBody = $batch; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/dispatches/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation resetDestinationDispatchRegistrationCount + * + * DestinationsDispatchesRegistrationCount + * + * @param string $destination_id Identifier for the destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function resetDestinationDispatchRegistrationCount($destination_id) + { + list($response) = $this->resetDestinationDispatchRegistrationCountWithHttpInfo($destination_id); + return $response; + } + + /** + * Operation resetDestinationDispatchRegistrationCountWithHttpInfo + * + * DestinationsDispatchesRegistrationCount + * + * @param string $destination_id Identifier for the destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function resetDestinationDispatchRegistrationCountWithHttpInfo($destination_id) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling resetDestinationDispatchRegistrationCount'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}/dispatches/registrationCount"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/destinations/{destinationId}/dispatches/registrationCount' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation resetDispatchRegistrationCount + * + * DispatchesRegistrationCountByTenant + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function resetDispatchRegistrationCount($dispatch_id) + { + list($response) = $this->resetDispatchRegistrationCountWithHttpInfo($dispatch_id); + return $response; + } + + /** + * Operation resetDispatchRegistrationCountWithHttpInfo + * + * DispatchesRegistrationCountByTenant + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function resetDispatchRegistrationCountWithHttpInfo($dispatch_id) + { + // verify the required parameter 'dispatch_id' is set + if ($dispatch_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_id when calling resetDispatchRegistrationCount'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/{dispatchId}/registrationCount"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($dispatch_id !== null) { + $resourcePath = str_replace( + "{" . "dispatchId" . "}", + $this->apiClient->getSerializer()->toPathValue($dispatch_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/dispatches/{dispatchId}/registrationCount' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation setDestination + * + * Creates or updates the destination identified by the `destinationId` provided in the path. If the destination is being created, a name should be provided in the DestinationSchema, else an error will be thrown. You may also optionally supply the e-mail address of the user to be associated with this destination. This e-mail address should correspond to a SCORM Cloud user account. If you do not supply an e-mail address upon the creation of a destination, the owner of the Realm will be used. This can, of course, also be changed via calling this method to update an existing destination. + * + * @param string $destination_id Identifier for the destination (required) + * @param \RusticiSoftware\Cloud\V2\Model\DestinationSchema $destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function setDestination($destination_id, $destination) + { + list($response) = $this->setDestinationWithHttpInfo($destination_id, $destination); + return $response; + } + + /** + * Operation setDestinationWithHttpInfo + * + * Creates or updates the destination identified by the `destinationId` provided in the path. If the destination is being created, a name should be provided in the DestinationSchema, else an error will be thrown. You may also optionally supply the e-mail address of the user to be associated with this destination. This e-mail address should correspond to a SCORM Cloud user account. If you do not supply an e-mail address upon the creation of a destination, the owner of the Realm will be used. This can, of course, also be changed via calling this method to update an existing destination. + * + * @param string $destination_id Identifier for the destination (required) + * @param \RusticiSoftware\Cloud\V2\Model\DestinationSchema $destination (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function setDestinationWithHttpInfo($destination_id, $destination) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling setDestination'); + } + // verify the required parameter 'destination' is set + if ($destination === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination when calling setDestination'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($destination)) { + $_tempBody = $destination; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/destinations/{destinationId}' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation setDestinationDispatchEnabled + * + * DestinationsDispatchesEnabledByTenant + * + * @param string $destination_id Identifier for the destination (required) + * @param \RusticiSoftware\Cloud\V2\Model\EnabledSchema $enabled (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function setDestinationDispatchEnabled($destination_id, $enabled) + { + list($response) = $this->setDestinationDispatchEnabledWithHttpInfo($destination_id, $enabled); + return $response; + } + + /** + * Operation setDestinationDispatchEnabledWithHttpInfo + * + * DestinationsDispatchesEnabledByTenant + * + * @param string $destination_id Identifier for the destination (required) + * @param \RusticiSoftware\Cloud\V2\Model\EnabledSchema $enabled (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function setDestinationDispatchEnabledWithHttpInfo($destination_id, $enabled) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling setDestinationDispatchEnabled'); + } + // verify the required parameter 'enabled' is set + if ($enabled === null) { + throw new \InvalidArgumentException('Missing the required parameter $enabled when calling setDestinationDispatchEnabled'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}/dispatches/enabled"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($enabled)) { + $_tempBody = $enabled; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/destinations/{destinationId}/dispatches/enabled' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation setDispatchEnabled + * + * DispatchesEnabledByTenantAndDispatchId + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @param \RusticiSoftware\Cloud\V2\Model\EnabledSchema $enabled (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function setDispatchEnabled($dispatch_id, $enabled) + { + list($response) = $this->setDispatchEnabledWithHttpInfo($dispatch_id, $enabled); + return $response; + } + + /** + * Operation setDispatchEnabledWithHttpInfo + * + * DispatchesEnabledByTenantAndDispatchId + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @param \RusticiSoftware\Cloud\V2\Model\EnabledSchema $enabled (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function setDispatchEnabledWithHttpInfo($dispatch_id, $enabled) + { + // verify the required parameter 'dispatch_id' is set + if ($dispatch_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_id when calling setDispatchEnabled'); + } + // verify the required parameter 'enabled' is set + if ($enabled === null) { + throw new \InvalidArgumentException('Missing the required parameter $enabled when calling setDispatchEnabled'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/{dispatchId}/enabled"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($dispatch_id !== null) { + $resourcePath = str_replace( + "{" . "dispatchId" . "}", + $this->apiClient->getSerializer()->toPathValue($dispatch_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($enabled)) { + $_tempBody = $enabled; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/dispatches/{dispatchId}/enabled' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation updateDestinationHashUserInfo + * + * Enable or disable hashing of the user info for the destination. + * + * @param string $destination_id Identifier for the destination (required) + * @param \RusticiSoftware\Cloud\V2\Model\EnabledSchema $enabled (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function updateDestinationHashUserInfo($destination_id, $enabled) + { + list($response) = $this->updateDestinationHashUserInfoWithHttpInfo($destination_id, $enabled); + return $response; + } + + /** + * Operation updateDestinationHashUserInfoWithHttpInfo + * + * Enable or disable hashing of the user info for the destination. + * + * @param string $destination_id Identifier for the destination (required) + * @param \RusticiSoftware\Cloud\V2\Model\EnabledSchema $enabled (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateDestinationHashUserInfoWithHttpInfo($destination_id, $enabled) + { + // verify the required parameter 'destination_id' is set + if ($destination_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $destination_id when calling updateDestinationHashUserInfo'); + } + // verify the required parameter 'enabled' is set + if ($enabled === null) { + throw new \InvalidArgumentException('Missing the required parameter $enabled when calling updateDestinationHashUserInfo'); + } + // parse inputs + $resourcePath = "/dispatch/destinations/{destinationId}/dispatches/hashUserInfo"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($destination_id !== null) { + $resourcePath = str_replace( + "{" . "destinationId" . "}", + $this->apiClient->getSerializer()->toPathValue($destination_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($enabled)) { + $_tempBody = $enabled; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/destinations/{destinationId}/dispatches/hashUserInfo' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation updateDispatch + * + * Update the dispatch with `dispatchId`. + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @param \RusticiSoftware\Cloud\V2\Model\UpdateDispatchSchema $dispatch_properties (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function updateDispatch($dispatch_id, $dispatch_properties) + { + list($response) = $this->updateDispatchWithHttpInfo($dispatch_id, $dispatch_properties); + return $response; + } + + /** + * Operation updateDispatchWithHttpInfo + * + * Update the dispatch with `dispatchId`. + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @param \RusticiSoftware\Cloud\V2\Model\UpdateDispatchSchema $dispatch_properties (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateDispatchWithHttpInfo($dispatch_id, $dispatch_properties) + { + // verify the required parameter 'dispatch_id' is set + if ($dispatch_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_id when calling updateDispatch'); + } + // verify the required parameter 'dispatch_properties' is set + if ($dispatch_properties === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_properties when calling updateDispatch'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/{dispatchId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($dispatch_id !== null) { + $resourcePath = str_replace( + "{" . "dispatchId" . "}", + $this->apiClient->getSerializer()->toPathValue($dispatch_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($dispatch_properties)) { + $_tempBody = $dispatch_properties; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/dispatches/{dispatchId}' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation updateDispatchHashUserInfo + * + * Enable or disable hashing of the user info for the dispatch. + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @param \RusticiSoftware\Cloud\V2\Model\EnabledSchema $enabled (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function updateDispatchHashUserInfo($dispatch_id, $enabled) + { + list($response) = $this->updateDispatchHashUserInfoWithHttpInfo($dispatch_id, $enabled); + return $response; + } + + /** + * Operation updateDispatchHashUserInfoWithHttpInfo + * + * Enable or disable hashing of the user info for the dispatch. + * + * @param string $dispatch_id Identifier for the dispatch (required) + * @param \RusticiSoftware\Cloud\V2\Model\EnabledSchema $enabled (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateDispatchHashUserInfoWithHttpInfo($dispatch_id, $enabled) + { + // verify the required parameter 'dispatch_id' is set + if ($dispatch_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $dispatch_id when calling updateDispatchHashUserInfo'); + } + // verify the required parameter 'enabled' is set + if ($enabled === null) { + throw new \InvalidArgumentException('Missing the required parameter $enabled when calling updateDispatchHashUserInfo'); + } + // parse inputs + $resourcePath = "/dispatch/dispatches/{dispatchId}/hashUserInfo"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($dispatch_id !== null) { + $resourcePath = str_replace( + "{" . "dispatchId" . "}", + $this->apiClient->getSerializer()->toPathValue($dispatch_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($enabled)) { + $_tempBody = $enabled; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/dispatch/dispatches/{dispatchId}/hashUserInfo' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } +} diff --git a/src/Api/InvitationsApi.php b/src/Api/InvitationsApi.php new file mode 100644 index 0000000..c380862 --- /dev/null +++ b/src/Api/InvitationsApi.php @@ -0,0 +1,1843 @@ +apiClient = $apiClient; + } + + /** + * Get API client + * + * @return \RusticiSoftware\Cloud\V2\ApiClient get the API client + */ + public function getApiClient() + { + return $this->apiClient; + } + + /** + * Set the API client + * + * @param \RusticiSoftware\Cloud\V2\ApiClient $apiClient set the API client + * + * @return InvitationsApi + */ + public function setApiClient(\RusticiSoftware\Cloud\V2\ApiClient $apiClient) + { + $this->apiClient = $apiClient; + return $this; + } + + /** + * Operation createPrivateInvitation + * + * Create a private invitation to a course. + * + * @param \RusticiSoftware\Cloud\V2\Model\CreatePrivateInvitationSchema $private_invitation_request (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\InvitationSummarySchema + */ + public function createPrivateInvitation($private_invitation_request) + { + list($response) = $this->createPrivateInvitationWithHttpInfo($private_invitation_request); + return $response; + } + + /** + * Operation createPrivateInvitationWithHttpInfo + * + * Create a private invitation to a course. + * + * @param \RusticiSoftware\Cloud\V2\Model\CreatePrivateInvitationSchema $private_invitation_request (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\InvitationSummarySchema, HTTP status code, HTTP response headers (array of strings) + */ + public function createPrivateInvitationWithHttpInfo($private_invitation_request) + { + // verify the required parameter 'private_invitation_request' is set + if ($private_invitation_request === null) { + throw new \InvalidArgumentException('Missing the required parameter $private_invitation_request when calling createPrivateInvitation'); + } + // parse inputs + $resourcePath = "/invitations/private"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($private_invitation_request)) { + $_tempBody = $private_invitation_request; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\InvitationSummarySchema', + '/invitations/private' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\InvitationSummarySchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\InvitationSummarySchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation createPublicInvitation + * + * Create a publicly accessible invitation to a course. + * + * @param \RusticiSoftware\Cloud\V2\Model\CreatePublicInvitationSchema $public_invitation_request A description of the public invitation to be created. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema + */ + public function createPublicInvitation($public_invitation_request) + { + list($response) = $this->createPublicInvitationWithHttpInfo($public_invitation_request); + return $response; + } + + /** + * Operation createPublicInvitationWithHttpInfo + * + * Create a publicly accessible invitation to a course. + * + * @param \RusticiSoftware\Cloud\V2\Model\CreatePublicInvitationSchema $public_invitation_request A description of the public invitation to be created. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function createPublicInvitationWithHttpInfo($public_invitation_request) + { + // verify the required parameter 'public_invitation_request' is set + if ($public_invitation_request === null) { + throw new \InvalidArgumentException('Missing the required parameter $public_invitation_request when calling createPublicInvitation'); + } + // parse inputs + $resourcePath = "/invitations/public"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($public_invitation_request)) { + $_tempBody = $public_invitation_request; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema', + '/invitations/public' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation deleteInvitationTags + * + * Delete tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function deleteInvitationTags($invitation_id, $tags) + { + list($response) = $this->deleteInvitationTagsWithHttpInfo($invitation_id, $tags); + return $response; + } + + /** + * Operation deleteInvitationTagsWithHttpInfo + * + * Delete tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteInvitationTagsWithHttpInfo($invitation_id, $tags) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling deleteInvitationTags'); + } + // verify the required parameter 'tags' is set + if ($tags === null) { + throw new \InvalidArgumentException('Missing the required parameter $tags when calling deleteInvitationTags'); + } + // parse inputs + $resourcePath = "/invitations/{invitationId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($tags)) { + $_tempBody = $tags; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/invitations/{invitationId}/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getAllInvitations + * + * Get a list of invitation summaries. + * + * @param string $course_id Limit the results to invitations with courseIds that match the filter. (optional) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param string $datetime_filter A string describing what the since/until parameters will be applied to. Options are: 'created' or 'updated'. If not provided, it will default to `updated`. (optional, default to updated) + * @param string[] $tags (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\InvitationSummaryList + */ + public function getAllInvitations($course_id = null, $since = null, $until = null, $datetime_filter = null, $tags = null, $more = null) + { + list($response) = $this->getAllInvitationsWithHttpInfo($course_id, $since, $until, $datetime_filter, $tags, $more); + return $response; + } + + /** + * Operation getAllInvitationsWithHttpInfo + * + * Get a list of invitation summaries. + * + * @param string $course_id Limit the results to invitations with courseIds that match the filter. (optional) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param string $datetime_filter A string describing what the since/until parameters will be applied to. Options are: 'created' or 'updated'. If not provided, it will default to `updated`. (optional, default to updated) + * @param string[] $tags (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\InvitationSummaryList, HTTP status code, HTTP response headers (array of strings) + */ + public function getAllInvitationsWithHttpInfo($course_id = null, $since = null, $until = null, $datetime_filter = null, $tags = null, $more = null) + { + // parse inputs + $resourcePath = "/invitations"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($course_id !== null) { + $queryParams['courseId'] = $this->apiClient->getSerializer()->toQueryValue($course_id); + } + // query params + if ($since !== null) { + $queryParams['since'] = $this->apiClient->getSerializer()->toQueryValue($since); + } + // query params + if ($until !== null) { + $queryParams['until'] = $this->apiClient->getSerializer()->toQueryValue($until); + } + // query params + if ($datetime_filter !== null) { + $queryParams['datetimeFilter'] = $this->apiClient->getSerializer()->toQueryValue($datetime_filter); + } + // query params + if (is_array($tags)) { + $tags = $this->apiClient->getSerializer()->serializeCollection($tags, 'csv', true); + } + if ($tags !== null) { + $queryParams['tags'] = $this->apiClient->getSerializer()->toQueryValue($tags); + } + // query params + if ($more !== null) { + $queryParams['more'] = $this->apiClient->getSerializer()->toQueryValue($more); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\InvitationSummaryList', + '/invitations' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\InvitationSummaryList', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\InvitationSummaryList', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getInvitationTags + * + * Get the tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\TagListSchema + */ + public function getInvitationTags($invitation_id) + { + list($response) = $this->getInvitationTagsWithHttpInfo($invitation_id); + return $response; + } + + /** + * Operation getInvitationTagsWithHttpInfo + * + * Get the tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\TagListSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getInvitationTagsWithHttpInfo($invitation_id) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling getInvitationTags'); + } + // parse inputs + $resourcePath = "/invitations/{invitationId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\TagListSchema', + '/invitations/{invitationId}/tags' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\TagListSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\TagListSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getPrivateInvitation + * + * Get a information about a private invitation. + * + * @param string $invitation_id invitation id (required) + * @param bool $include_registration_count Include the registration count in the results (optional, default to false) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema + */ + public function getPrivateInvitation($invitation_id, $include_registration_count = null) + { + list($response) = $this->getPrivateInvitationWithHttpInfo($invitation_id, $include_registration_count); + return $response; + } + + /** + * Operation getPrivateInvitationWithHttpInfo + * + * Get a information about a private invitation. + * + * @param string $invitation_id invitation id (required) + * @param bool $include_registration_count Include the registration count in the results (optional, default to false) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getPrivateInvitationWithHttpInfo($invitation_id, $include_registration_count = null) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling getPrivateInvitation'); + } + // parse inputs + $resourcePath = "/invitations/private/{invitationId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($include_registration_count !== null) { + $queryParams['includeRegistrationCount'] = $this->apiClient->getSerializer()->toQueryValue($include_registration_count); + } + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema', + '/invitations/private/{invitationId}' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getPrivateInvitationJobStatus + * + * Get the status of an invitation job. + * + * @param string $invitation_id invitation id (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\InvitationJobStatusSchema + */ + public function getPrivateInvitationJobStatus($invitation_id) + { + list($response) = $this->getPrivateInvitationJobStatusWithHttpInfo($invitation_id); + return $response; + } + + /** + * Operation getPrivateInvitationJobStatusWithHttpInfo + * + * Get the status of an invitation job. + * + * @param string $invitation_id invitation id (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\InvitationJobStatusSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getPrivateInvitationJobStatusWithHttpInfo($invitation_id) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling getPrivateInvitationJobStatus'); + } + // parse inputs + $resourcePath = "/invitations/private/{invitationId}/jobStatus"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\InvitationJobStatusSchema', + '/invitations/private/{invitationId}/jobStatus' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\InvitationJobStatusSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\InvitationJobStatusSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getPrivateInvitations + * + * Get a list of all private invitations. + * + * @param string $course_id Limit the results to invitations with courseIds that match the filter. (optional) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param string $datetime_filter A string describing what the since/until parameters will be applied to. Options are: 'created' or 'updated'. If not provided, it will default to `updated`. (optional, default to updated) + * @param string[] $tags (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\PrivateInvitationList + */ + public function getPrivateInvitations($course_id = null, $since = null, $until = null, $datetime_filter = null, $tags = null, $more = null) + { + list($response) = $this->getPrivateInvitationsWithHttpInfo($course_id, $since, $until, $datetime_filter, $tags, $more); + return $response; + } + + /** + * Operation getPrivateInvitationsWithHttpInfo + * + * Get a list of all private invitations. + * + * @param string $course_id Limit the results to invitations with courseIds that match the filter. (optional) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param string $datetime_filter A string describing what the since/until parameters will be applied to. Options are: 'created' or 'updated'. If not provided, it will default to `updated`. (optional, default to updated) + * @param string[] $tags (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\PrivateInvitationList, HTTP status code, HTTP response headers (array of strings) + */ + public function getPrivateInvitationsWithHttpInfo($course_id = null, $since = null, $until = null, $datetime_filter = null, $tags = null, $more = null) + { + // parse inputs + $resourcePath = "/invitations/private"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($course_id !== null) { + $queryParams['courseId'] = $this->apiClient->getSerializer()->toQueryValue($course_id); + } + // query params + if ($since !== null) { + $queryParams['since'] = $this->apiClient->getSerializer()->toQueryValue($since); + } + // query params + if ($until !== null) { + $queryParams['until'] = $this->apiClient->getSerializer()->toQueryValue($until); + } + // query params + if ($datetime_filter !== null) { + $queryParams['datetimeFilter'] = $this->apiClient->getSerializer()->toQueryValue($datetime_filter); + } + // query params + if (is_array($tags)) { + $tags = $this->apiClient->getSerializer()->serializeCollection($tags, 'csv', true); + } + if ($tags !== null) { + $queryParams['tags'] = $this->apiClient->getSerializer()->toQueryValue($tags); + } + // query params + if ($more !== null) { + $queryParams['more'] = $this->apiClient->getSerializer()->toQueryValue($more); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\PrivateInvitationList', + '/invitations/private' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\PrivateInvitationList', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\PrivateInvitationList', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getPrivateUserInvitations + * + * Get a list of user invitations. + * + * @param string $invitation_id invitation id (required) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param bool $include_registration_report (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\UserInvitationList + */ + public function getPrivateUserInvitations($invitation_id, $since = null, $until = null, $include_registration_report = null, $more = null) + { + list($response) = $this->getPrivateUserInvitationsWithHttpInfo($invitation_id, $since, $until, $include_registration_report, $more); + return $response; + } + + /** + * Operation getPrivateUserInvitationsWithHttpInfo + * + * Get a list of user invitations. + * + * @param string $invitation_id invitation id (required) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param bool $include_registration_report (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\UserInvitationList, HTTP status code, HTTP response headers (array of strings) + */ + public function getPrivateUserInvitationsWithHttpInfo($invitation_id, $since = null, $until = null, $include_registration_report = null, $more = null) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling getPrivateUserInvitations'); + } + // parse inputs + $resourcePath = "/invitations/private/{invitationId}/userInvitations"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($since !== null) { + $queryParams['since'] = $this->apiClient->getSerializer()->toQueryValue($since); + } + // query params + if ($until !== null) { + $queryParams['until'] = $this->apiClient->getSerializer()->toQueryValue($until); + } + // query params + if ($include_registration_report !== null) { + $queryParams['includeRegistrationReport'] = $this->apiClient->getSerializer()->toQueryValue($include_registration_report); + } + // query params + if ($more !== null) { + $queryParams['more'] = $this->apiClient->getSerializer()->toQueryValue($more); + } + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\UserInvitationList', + '/invitations/private/{invitationId}/userInvitations' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\UserInvitationList', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\UserInvitationList', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getPublicInvitation + * + * Get a information about a public invitation. + * + * @param string $invitation_id invitation id (required) + * @param bool $include_registration_count Include the registration count in the results (optional, default to false) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema + */ + public function getPublicInvitation($invitation_id, $include_registration_count = null) + { + list($response) = $this->getPublicInvitationWithHttpInfo($invitation_id, $include_registration_count); + return $response; + } + + /** + * Operation getPublicInvitationWithHttpInfo + * + * Get a information about a public invitation. + * + * @param string $invitation_id invitation id (required) + * @param bool $include_registration_count Include the registration count in the results (optional, default to false) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getPublicInvitationWithHttpInfo($invitation_id, $include_registration_count = null) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling getPublicInvitation'); + } + // parse inputs + $resourcePath = "/invitations/public/{invitationId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($include_registration_count !== null) { + $queryParams['includeRegistrationCount'] = $this->apiClient->getSerializer()->toQueryValue($include_registration_count); + } + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema', + '/invitations/public/{invitationId}' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getPublicInvitations + * + * Get a list of all public invitations. + * + * @param string $course_id Limit the results to invitations with courseIds that match the filter. (optional) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param string $datetime_filter A string describing what the since/until parameters will be applied to. Options are: 'created' or 'updated'. If not provided, it will default to `updated`. (optional, default to updated) + * @param string[] $tags (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\PublicInvitationList + */ + public function getPublicInvitations($course_id = null, $since = null, $until = null, $datetime_filter = null, $tags = null, $more = null) + { + list($response) = $this->getPublicInvitationsWithHttpInfo($course_id, $since, $until, $datetime_filter, $tags, $more); + return $response; + } + + /** + * Operation getPublicInvitationsWithHttpInfo + * + * Get a list of all public invitations. + * + * @param string $course_id Limit the results to invitations with courseIds that match the filter. (optional) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param string $datetime_filter A string describing what the since/until parameters will be applied to. Options are: 'created' or 'updated'. If not provided, it will default to `updated`. (optional, default to updated) + * @param string[] $tags (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\PublicInvitationList, HTTP status code, HTTP response headers (array of strings) + */ + public function getPublicInvitationsWithHttpInfo($course_id = null, $since = null, $until = null, $datetime_filter = null, $tags = null, $more = null) + { + // parse inputs + $resourcePath = "/invitations/public"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($course_id !== null) { + $queryParams['courseId'] = $this->apiClient->getSerializer()->toQueryValue($course_id); + } + // query params + if ($since !== null) { + $queryParams['since'] = $this->apiClient->getSerializer()->toQueryValue($since); + } + // query params + if ($until !== null) { + $queryParams['until'] = $this->apiClient->getSerializer()->toQueryValue($until); + } + // query params + if ($datetime_filter !== null) { + $queryParams['datetimeFilter'] = $this->apiClient->getSerializer()->toQueryValue($datetime_filter); + } + // query params + if (is_array($tags)) { + $tags = $this->apiClient->getSerializer()->serializeCollection($tags, 'csv', true); + } + if ($tags !== null) { + $queryParams['tags'] = $this->apiClient->getSerializer()->toQueryValue($tags); + } + // query params + if ($more !== null) { + $queryParams['more'] = $this->apiClient->getSerializer()->toQueryValue($more); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\PublicInvitationList', + '/invitations/public' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\PublicInvitationList', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\PublicInvitationList', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getPublicUserInvitations + * + * Get a list of user invitations. + * + * @param string $invitation_id invitation id (required) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param bool $include_registration_report (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\UserInvitationList + */ + public function getPublicUserInvitations($invitation_id, $since = null, $until = null, $include_registration_report = null, $more = null) + { + list($response) = $this->getPublicUserInvitationsWithHttpInfo($invitation_id, $since, $until, $include_registration_report, $more); + return $response; + } + + /** + * Operation getPublicUserInvitationsWithHttpInfo + * + * Get a list of user invitations. + * + * @param string $invitation_id invitation id (required) + * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param bool $include_registration_report (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of registration lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\UserInvitationList, HTTP status code, HTTP response headers (array of strings) + */ + public function getPublicUserInvitationsWithHttpInfo($invitation_id, $since = null, $until = null, $include_registration_report = null, $more = null) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling getPublicUserInvitations'); + } + // parse inputs + $resourcePath = "/invitations/public/{invitationId}/userInvitations"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($since !== null) { + $queryParams['since'] = $this->apiClient->getSerializer()->toQueryValue($since); + } + // query params + if ($until !== null) { + $queryParams['until'] = $this->apiClient->getSerializer()->toQueryValue($until); + } + // query params + if ($include_registration_report !== null) { + $queryParams['includeRegistrationReport'] = $this->apiClient->getSerializer()->toQueryValue($include_registration_report); + } + // query params + if ($more !== null) { + $queryParams['more'] = $this->apiClient->getSerializer()->toQueryValue($more); + } + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\UserInvitationList', + '/invitations/public/{invitationId}/userInvitations' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\UserInvitationList', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\UserInvitationList', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation putInvitationTags + * + * Set the tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function putInvitationTags($invitation_id, $tags) + { + list($response) = $this->putInvitationTagsWithHttpInfo($invitation_id, $tags); + return $response; + } + + /** + * Operation putInvitationTagsWithHttpInfo + * + * Set the tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function putInvitationTagsWithHttpInfo($invitation_id, $tags) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling putInvitationTags'); + } + // verify the required parameter 'tags' is set + if ($tags === null) { + throw new \InvalidArgumentException('Missing the required parameter $tags when calling putInvitationTags'); + } + // parse inputs + $resourcePath = "/invitations/{invitationId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($tags)) { + $_tempBody = $tags; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/invitations/{invitationId}/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation putInvitationTagsBatch + * + * Sets all of the provided tags on all of the provided invitations + * + * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function putInvitationTagsBatch($batch) + { + list($response) = $this->putInvitationTagsBatchWithHttpInfo($batch); + return $response; + } + + /** + * Operation putInvitationTagsBatchWithHttpInfo + * + * Sets all of the provided tags on all of the provided invitations + * + * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function putInvitationTagsBatchWithHttpInfo($batch) + { + // verify the required parameter 'batch' is set + if ($batch === null) { + throw new \InvalidArgumentException('Missing the required parameter $batch when calling putInvitationTagsBatch'); + } + // parse inputs + $resourcePath = "/invitations/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($batch)) { + $_tempBody = $batch; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/invitations/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation updatePrivateInvitation + * + * Update attributes of this invitation. + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema $invitation_update_schema A PrivateInvitationSchema with values to update. This can be a sparse schema only containing the values to be updated. Any value not allowed for update will be ignored. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema + */ + public function updatePrivateInvitation($invitation_id, $invitation_update_schema) + { + list($response) = $this->updatePrivateInvitationWithHttpInfo($invitation_id, $invitation_update_schema); + return $response; + } + + /** + * Operation updatePrivateInvitationWithHttpInfo + * + * Update attributes of this invitation. + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema $invitation_update_schema A PrivateInvitationSchema with values to update. This can be a sparse schema only containing the values to be updated. Any value not allowed for update will be ignored. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function updatePrivateInvitationWithHttpInfo($invitation_id, $invitation_update_schema) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling updatePrivateInvitation'); + } + // verify the required parameter 'invitation_update_schema' is set + if ($invitation_update_schema === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_update_schema when calling updatePrivateInvitation'); + } + // parse inputs + $resourcePath = "/invitations/private/{invitationId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($invitation_update_schema)) { + $_tempBody = $invitation_update_schema; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema', + '/invitations/private/{invitationId}' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation updatePublicInvitation + * + * Update attributes of this invitation. + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema $invitation_update_schema A PublicInvitationSchema with values to update. This can be a sparse schema only containing the values to be updated. Any value not allowed for update will be ignored. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema + */ + public function updatePublicInvitation($invitation_id, $invitation_update_schema) + { + list($response) = $this->updatePublicInvitationWithHttpInfo($invitation_id, $invitation_update_schema); + return $response; + } + + /** + * Operation updatePublicInvitationWithHttpInfo + * + * Update attributes of this invitation. + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema $invitation_update_schema A PublicInvitationSchema with values to update. This can be a sparse schema only containing the values to be updated. Any value not allowed for update will be ignored. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function updatePublicInvitationWithHttpInfo($invitation_id, $invitation_update_schema) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling updatePublicInvitation'); + } + // verify the required parameter 'invitation_update_schema' is set + if ($invitation_update_schema === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_update_schema when calling updatePublicInvitation'); + } + // parse inputs + $resourcePath = "/invitations/public/{invitationId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($invitation_update_schema)) { + $_tempBody = $invitation_update_schema; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema', + '/invitations/public/{invitationId}' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } +} diff --git a/src/Api/LearnerApi.php b/src/Api/LearnerApi.php new file mode 100644 index 0000000..8f79be1 --- /dev/null +++ b/src/Api/LearnerApi.php @@ -0,0 +1,517 @@ +apiClient = $apiClient; + } + + /** + * Get API client + * + * @return \RusticiSoftware\Cloud\V2\ApiClient get the API client + */ + public function getApiClient() + { + return $this->apiClient; + } + + /** + * Set the API client + * + * @param \RusticiSoftware\Cloud\V2\ApiClient $apiClient set the API client + * + * @return LearnerApi + */ + public function setApiClient(\RusticiSoftware\Cloud\V2\ApiClient $apiClient) + { + $this->apiClient = $apiClient; + return $this; + } + + /** + * Operation deleteAllLearnerData + * + * Deletes all of the information associated with a learner in an application, by learner id. This is meant for use with complying with GDPR requests from learners. + * + * @param string $learner_id The id of the learner for which to remove all data from an application (required) + * @param string $user_email The email of the user initiating this request on behalf of the learner being deleted. This must be a valid primary email address for a SCORM Cloud realm which this application is in. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return string + */ + public function deleteAllLearnerData($learner_id, $user_email) + { + list($response) = $this->deleteAllLearnerDataWithHttpInfo($learner_id, $user_email); + return $response; + } + + /** + * Operation deleteAllLearnerDataWithHttpInfo + * + * Deletes all of the information associated with a learner in an application, by learner id. This is meant for use with complying with GDPR requests from learners. + * + * @param string $learner_id The id of the learner for which to remove all data from an application (required) + * @param string $user_email The email of the user initiating this request on behalf of the learner being deleted. This must be a valid primary email address for a SCORM Cloud realm which this application is in. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteAllLearnerDataWithHttpInfo($learner_id, $user_email) + { + // verify the required parameter 'learner_id' is set + if ($learner_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $learner_id when calling deleteAllLearnerData'); + } + // verify the required parameter 'user_email' is set + if ($user_email === null) { + throw new \InvalidArgumentException('Missing the required parameter $user_email when calling deleteAllLearnerData'); + } + // parse inputs + $resourcePath = "/learner/{learnerId}/delete-information"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($user_email !== null) { + $queryParams['userEmail'] = $this->apiClient->getSerializer()->toQueryValue($user_email); + } + // path params + if ($learner_id !== null) { + $resourcePath = str_replace( + "{" . "learnerId" . "}", + $this->apiClient->getSerializer()->toPathValue($learner_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/learner/{learnerId}/delete-information' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, 'string', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 204: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 403: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation deleteLearnerTags + * + * Delete tags for this learner + * + * @param string $learner_id The id of the learner for which to remove all data from an application (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function deleteLearnerTags($learner_id, $tags) + { + list($response) = $this->deleteLearnerTagsWithHttpInfo($learner_id, $tags); + return $response; + } + + /** + * Operation deleteLearnerTagsWithHttpInfo + * + * Delete tags for this learner + * + * @param string $learner_id The id of the learner for which to remove all data from an application (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteLearnerTagsWithHttpInfo($learner_id, $tags) + { + // verify the required parameter 'learner_id' is set + if ($learner_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $learner_id when calling deleteLearnerTags'); + } + // verify the required parameter 'tags' is set + if ($tags === null) { + throw new \InvalidArgumentException('Missing the required parameter $tags when calling deleteLearnerTags'); + } + // parse inputs + $resourcePath = "/learner/{learnerId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($learner_id !== null) { + $resourcePath = str_replace( + "{" . "learnerId" . "}", + $this->apiClient->getSerializer()->toPathValue($learner_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($tags)) { + $_tempBody = $tags; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/learner/{learnerId}/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getLearnerTags + * + * Get the tags for this learner + * + * @param string $learner_id The id of the learner for which to remove all data from an application (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\TagListSchema + */ + public function getLearnerTags($learner_id) + { + list($response) = $this->getLearnerTagsWithHttpInfo($learner_id); + return $response; + } + + /** + * Operation getLearnerTagsWithHttpInfo + * + * Get the tags for this learner + * + * @param string $learner_id The id of the learner for which to remove all data from an application (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\TagListSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getLearnerTagsWithHttpInfo($learner_id) + { + // verify the required parameter 'learner_id' is set + if ($learner_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $learner_id when calling getLearnerTags'); + } + // parse inputs + $resourcePath = "/learner/{learnerId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($learner_id !== null) { + $resourcePath = str_replace( + "{" . "learnerId" . "}", + $this->apiClient->getSerializer()->toPathValue($learner_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\TagListSchema', + '/learner/{learnerId}/tags' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\TagListSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\TagListSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation putLearnerTags + * + * Set the tags for this learner + * + * @param string $learner_id The id of the learner for which to remove all data from an application (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function putLearnerTags($learner_id, $tags) + { + list($response) = $this->putLearnerTagsWithHttpInfo($learner_id, $tags); + return $response; + } + + /** + * Operation putLearnerTagsWithHttpInfo + * + * Set the tags for this learner + * + * @param string $learner_id The id of the learner for which to remove all data from an application (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function putLearnerTagsWithHttpInfo($learner_id, $tags) + { + // verify the required parameter 'learner_id' is set + if ($learner_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $learner_id when calling putLearnerTags'); + } + // verify the required parameter 'tags' is set + if ($tags === null) { + throw new \InvalidArgumentException('Missing the required parameter $tags when calling putLearnerTags'); + } + // parse inputs + $resourcePath = "/learner/{learnerId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($learner_id !== null) { + $resourcePath = str_replace( + "{" . "learnerId" . "}", + $this->apiClient->getSerializer()->toPathValue($learner_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($tags)) { + $_tempBody = $tags; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/learner/{learnerId}/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } +} diff --git a/src/Api/PingApi.php b/src/Api/PingApi.php index 262b105..fc56955 100644 --- a/src/Api/PingApi.php +++ b/src/Api/PingApi.php @@ -14,7 +14,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Api/RegistrationApi.php b/src/Api/RegistrationApi.php index 1d8ba44..6f59360 100644 --- a/src/Api/RegistrationApi.php +++ b/src/Api/RegistrationApi.php @@ -14,7 +14,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -87,6 +87,118 @@ public function setApiClient(\RusticiSoftware\Cloud\V2\ApiClient $apiClient) return $this; } + /** + * Operation buildRegistrationLaunchLink + * + * Get registration launch link. + * + * @param string $registration_id id for this registration (required) + * @param \RusticiSoftware\Cloud\V2\Model\LaunchLinkRequestSchema $launch_link_request (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\LaunchLinkSchema + */ + public function buildRegistrationLaunchLink($registration_id, $launch_link_request) + { + list($response) = $this->buildRegistrationLaunchLinkWithHttpInfo($registration_id, $launch_link_request); + return $response; + } + + /** + * Operation buildRegistrationLaunchLinkWithHttpInfo + * + * Get registration launch link. + * + * @param string $registration_id id for this registration (required) + * @param \RusticiSoftware\Cloud\V2\Model\LaunchLinkRequestSchema $launch_link_request (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\LaunchLinkSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function buildRegistrationLaunchLinkWithHttpInfo($registration_id, $launch_link_request) + { + // verify the required parameter 'registration_id' is set + if ($registration_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $registration_id when calling buildRegistrationLaunchLink'); + } + // verify the required parameter 'launch_link_request' is set + if ($launch_link_request === null) { + throw new \InvalidArgumentException('Missing the required parameter $launch_link_request when calling buildRegistrationLaunchLink'); + } + // parse inputs + $resourcePath = "/registrations/{registrationId}/launchLink"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($registration_id !== null) { + $resourcePath = str_replace( + "{" . "registrationId" . "}", + $this->apiClient->getSerializer()->toPathValue($registration_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($launch_link_request)) { + $_tempBody = $launch_link_request; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\LaunchLinkSchema', + '/registrations/{registrationId}/launchLink' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\LaunchLinkSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\LaunchLinkSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + /** * Operation createNewRegistrationInstance * @@ -187,7 +299,7 @@ public function createNewRegistrationInstanceWithHttpInfo($registration_id) /** * Operation createRegistration * - * + * Create a registration. * * @param \RusticiSoftware\Cloud\V2\Model\CreateRegistrationSchema $registration (required) * @param int $course_version The version of the course you want to create the registration for. Unless you have a reason for using this you probably do not need to. (optional) @@ -203,7 +315,7 @@ public function createRegistration($registration, $course_version = null) /** * Operation createRegistrationWithHttpInfo * - * + * Create a registration. * * @param \RusticiSoftware\Cloud\V2\Model\CreateRegistrationSchema $registration (required) * @param int $course_version The version of the course you want to create the registration for. Unless you have a reason for using this you probably do not need to. (optional) @@ -283,7 +395,7 @@ public function createRegistrationWithHttpInfo($registration, $course_version = /** * Operation deleteRegistration * - * + * Delete a registration. * * @param string $registration_id id for this registration (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -298,7 +410,7 @@ public function deleteRegistration($registration_id) /** * Operation deleteRegistrationWithHttpInfo * - * + * Delete a registration. * * @param string $registration_id id for this registration (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -380,7 +492,7 @@ public function deleteRegistrationWithHttpInfo($registration_id) /** * Operation deleteRegistrationConfigurationSetting * - * + * Clear a registration configuration. * * @param string $registration_id id for this registration (required) * @param string $setting_id (required) @@ -396,7 +508,7 @@ public function deleteRegistrationConfigurationSetting($registration_id, $settin /** * Operation deleteRegistrationConfigurationSettingWithHttpInfo * - * + * Clear a registration configuration. * * @param string $registration_id id for this registration (required) * @param string $setting_id (required) @@ -488,10 +600,107 @@ public function deleteRegistrationConfigurationSettingWithHttpInfo($registration } } + /** + * Operation deleteRegistrationGlobalData + * + * Delete the global data of a registration. + * + * @param string $registration_id id for this registration (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function deleteRegistrationGlobalData($registration_id) + { + list($response) = $this->deleteRegistrationGlobalDataWithHttpInfo($registration_id); + return $response; + } + + /** + * Operation deleteRegistrationGlobalDataWithHttpInfo + * + * Delete the global data of a registration. + * + * @param string $registration_id id for this registration (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteRegistrationGlobalDataWithHttpInfo($registration_id) + { + // verify the required parameter 'registration_id' is set + if ($registration_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $registration_id when calling deleteRegistrationGlobalData'); + } + // parse inputs + $resourcePath = "/registrations/{registrationId}/globalData"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($registration_id !== null) { + $resourcePath = str_replace( + "{" . "registrationId" . "}", + $this->apiClient->getSerializer()->toPathValue($registration_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/registrations/{registrationId}/globalData' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + /** * Operation deleteRegistrationInstanceConfigurationSetting * - * + * Clear a configuration for an instance of a registration. * * @param string $registration_id id for this registration (required) * @param int $instance_id The instance of this registration (required) @@ -508,7 +717,7 @@ public function deleteRegistrationInstanceConfigurationSetting($registration_id, /** * Operation deleteRegistrationInstanceConfigurationSettingWithHttpInfo * - * + * Clear a configuration for an instance of a registration. * * @param string $registration_id id for this registration (required) * @param int $instance_id The instance of this registration (required) @@ -620,7 +829,7 @@ public function deleteRegistrationInstanceConfigurationSettingWithHttpInfo($regi /** * Operation deleteRegistrationProgress * - * + * Reset a registration. * * @param string $registration_id id for this registration (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -635,7 +844,7 @@ public function deleteRegistrationProgress($registration_id) /** * Operation deleteRegistrationProgressWithHttpInfo * - * + * Reset a registration. * * @param string $registration_id id for this registration (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -717,7 +926,7 @@ public function deleteRegistrationProgressWithHttpInfo($registration_id) /** * Operation deleteRegistrationTags * - * + * Delete tags from a registration. * * @param string $registration_id id for this registration (required) * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) @@ -733,7 +942,7 @@ public function deleteRegistrationTags($registration_id, $tags) /** * Operation deleteRegistrationTagsWithHttpInfo * - * + * Delete tags from a registration. * * @param string $registration_id id for this registration (required) * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) @@ -823,37 +1032,37 @@ public function deleteRegistrationTagsWithHttpInfo($registration_id, $tags) } /** - * Operation deleteRegistrationsGlobalData + * Operation getRegistration * - * + * See if a registration exists. * * @param string $registration_id id for this registration (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response * @return void */ - public function deleteRegistrationsGlobalData($registration_id) + public function getRegistration($registration_id) { - list($response) = $this->deleteRegistrationsGlobalDataWithHttpInfo($registration_id); + list($response) = $this->getRegistrationWithHttpInfo($registration_id); return $response; } /** - * Operation deleteRegistrationsGlobalDataWithHttpInfo + * Operation getRegistrationWithHttpInfo * - * + * See if a registration exists. * * @param string $registration_id id for this registration (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteRegistrationsGlobalDataWithHttpInfo($registration_id) + public function getRegistrationWithHttpInfo($registration_id) { // verify the required parameter 'registration_id' is set if ($registration_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $registration_id when calling deleteRegistrationsGlobalData'); + throw new \InvalidArgumentException('Missing the required parameter $registration_id when calling getRegistration'); } // parse inputs - $resourcePath = "/registrations/{registrationId}/globalData"; + $resourcePath = "/registrations/{registrationId}"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -894,12 +1103,12 @@ public function deleteRegistrationsGlobalDataWithHttpInfo($registration_id) try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'DELETE', + 'HEAD', $queryParams, $httpBody, $headerParams, null, - '/registrations/{registrationId}/globalData' + '/registrations/{registrationId}' ); return [null, $statusCode, $httpHeader]; @@ -922,7 +1131,7 @@ public function deleteRegistrationsGlobalDataWithHttpInfo($registration_id) /** * Operation getRegistrationConfiguration * - * + * Get registration configuration. * * @param string $registration_id id for this registration (required) * @param bool $include_metadata (optional, default to false) @@ -938,7 +1147,7 @@ public function getRegistrationConfiguration($registration_id, $include_metadata /** * Operation getRegistrationConfigurationWithHttpInfo * - * + * Get registration configuration. * * @param string $registration_id id for this registration (required) * @param bool $include_metadata (optional, default to false) @@ -1029,7 +1238,7 @@ public function getRegistrationConfigurationWithHttpInfo($registration_id, $incl /** * Operation getRegistrationInstanceConfiguration * - * + * Get configuration for instance of registration. * * @param string $registration_id id for this registration (required) * @param int $instance_id The instance of this registration (required) @@ -1046,7 +1255,7 @@ public function getRegistrationInstanceConfiguration($registration_id, $instance /** * Operation getRegistrationInstanceConfigurationWithHttpInfo * - * + * Get configuration for instance of registration. * * @param string $registration_id id for this registration (required) * @param int $instance_id The instance of this registration (required) @@ -1154,7 +1363,7 @@ public function getRegistrationInstanceConfigurationWithHttpInfo($registration_i /** * Operation getRegistrationInstanceLaunchHistory * - * + * Get launch history for an instance of a registration. * * @param string $registration_id id for this registration (required) * @param int $instance_id The instance of this registration (required) @@ -1171,7 +1380,7 @@ public function getRegistrationInstanceLaunchHistory($registration_id, $instance /** * Operation getRegistrationInstanceLaunchHistoryWithHttpInfo * - * + * Get launch history for an instance of a registration. * * @param string $registration_id id for this registration (required) * @param int $instance_id The instance of this registration (required) @@ -1279,7 +1488,7 @@ public function getRegistrationInstanceLaunchHistoryWithHttpInfo($registration_i /** * Operation getRegistrationInstanceProgress * - * + * Get details of an instance of a registration. * * @param string $registration_id id for this registration (required) * @param int $instance_id The instance of this registration (required) @@ -1298,7 +1507,7 @@ public function getRegistrationInstanceProgress($registration_id, $instance_id, /** * Operation getRegistrationInstanceProgressWithHttpInfo * - * + * Get details of an instance of a registration. * * @param string $registration_id id for this registration (required) * @param int $instance_id The instance of this registration (required) @@ -1416,7 +1625,7 @@ public function getRegistrationInstanceProgressWithHttpInfo($registration_id, $i /** * Operation getRegistrationInstanceStatements * - * + * Get xAPI statements for an instance of a registration. * * @param string $registration_id id for this registration (required) * @param int $instance_id The instance of this registration (required) @@ -1435,7 +1644,7 @@ public function getRegistrationInstanceStatements($registration_id, $instance_id /** * Operation getRegistrationInstanceStatementsWithHttpInfo * - * + * Get xAPI statements for an instance of a registration. * * @param string $registration_id id for this registration (required) * @param int $instance_id The instance of this registration (required) @@ -1553,7 +1762,7 @@ public function getRegistrationInstanceStatementsWithHttpInfo($registration_id, /** * Operation getRegistrationInstances * - * + * Get all instances of a registration. * * @param string $registration_id id for this registration (required) * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) @@ -1574,7 +1783,7 @@ public function getRegistrationInstances($registration_id, $until = null, $since /** * Operation getRegistrationInstancesWithHttpInfo * - * + * Get all instances of a registration. * * @param string $registration_id id for this registration (required) * @param \DateTime $until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) @@ -1690,7 +1899,7 @@ public function getRegistrationInstancesWithHttpInfo($registration_id, $until = /** * Operation getRegistrationLaunchHistory * - * + * Get launch history for a registration. * * @param string $registration_id id for this registration (required) * @param bool $include_history_log Whether to include the history log in the launch history (optional, default to false) @@ -1706,7 +1915,7 @@ public function getRegistrationLaunchHistory($registration_id, $include_history_ /** * Operation getRegistrationLaunchHistoryWithHttpInfo * - * + * Get launch history for a registration. * * @param string $registration_id id for this registration (required) * @param bool $include_history_log Whether to include the history log in the launch history (optional, default to false) @@ -1794,122 +2003,10 @@ public function getRegistrationLaunchHistoryWithHttpInfo($registration_id, $incl } } - /** - * Operation getRegistrationLaunchLink - * - * - * - * @param string $registration_id id for this registration (required) - * @param \RusticiSoftware\Cloud\V2\Model\LaunchLinkRequestSchema $launch_link_request (required) - * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response - * @return \RusticiSoftware\Cloud\V2\Model\LaunchLinkSchema - */ - public function getRegistrationLaunchLink($registration_id, $launch_link_request) - { - list($response) = $this->getRegistrationLaunchLinkWithHttpInfo($registration_id, $launch_link_request); - return $response; - } - - /** - * Operation getRegistrationLaunchLinkWithHttpInfo - * - * - * - * @param string $registration_id id for this registration (required) - * @param \RusticiSoftware\Cloud\V2\Model\LaunchLinkRequestSchema $launch_link_request (required) - * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response - * @return array of \RusticiSoftware\Cloud\V2\Model\LaunchLinkSchema, HTTP status code, HTTP response headers (array of strings) - */ - public function getRegistrationLaunchLinkWithHttpInfo($registration_id, $launch_link_request) - { - // verify the required parameter 'registration_id' is set - if ($registration_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $registration_id when calling getRegistrationLaunchLink'); - } - // verify the required parameter 'launch_link_request' is set - if ($launch_link_request === null) { - throw new \InvalidArgumentException('Missing the required parameter $launch_link_request when calling getRegistrationLaunchLink'); - } - // parse inputs - $resourcePath = "/registrations/{registrationId}/launchLink"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // path params - if ($registration_id !== null) { - $resourcePath = str_replace( - "{" . "registrationId" . "}", - $this->apiClient->getSerializer()->toPathValue($registration_id), - $resourcePath - ); - } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - - // body params - $_tempBody = null; - if (isset($launch_link_request)) { - $_tempBody = $launch_link_request; - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // this endpoint requires HTTP basic authentication - if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { - $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); - } - // this endpoint requires OAuth (access token) - if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { - $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - '\RusticiSoftware\Cloud\V2\Model\LaunchLinkSchema', - '/registrations/{registrationId}/launchLink' - ); - - return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\LaunchLinkSchema', $httpHeader), $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\LaunchLinkSchema', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - case 400: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - case 404: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - /** * Operation getRegistrationProgress * - * + * Get details of a registration. * * @param string $registration_id id for this registration (required) * @param bool $include_child_results Include information about each learning object, not just the top level in the results (optional, default to false) @@ -1927,7 +2024,7 @@ public function getRegistrationProgress($registration_id, $include_child_results /** * Operation getRegistrationProgressWithHttpInfo * - * + * Get details of a registration. * * @param string $registration_id id for this registration (required) * @param bool $include_child_results Include information about each learning object, not just the top level in the results (optional, default to false) @@ -2028,7 +2125,7 @@ public function getRegistrationProgressWithHttpInfo($registration_id, $include_c /** * Operation getRegistrationStatements * - * + * Get xAPI statements for a registration. * * @param string $registration_id id for this registration (required) * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) @@ -2046,7 +2143,7 @@ public function getRegistrationStatements($registration_id, $since = null, $unti /** * Operation getRegistrationStatementsWithHttpInfo * - * + * Get xAPI statements for a registration. * * @param string $registration_id id for this registration (required) * @param \DateTime $since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) @@ -2147,7 +2244,7 @@ public function getRegistrationStatementsWithHttpInfo($registration_id, $since = /** * Operation getRegistrationTags * - * + * Get tags for a registration. * * @param string $registration_id id for this registration (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -2162,7 +2259,7 @@ public function getRegistrationTags($registration_id) /** * Operation getRegistrationTagsWithHttpInfo * - * + * Get tags for a registration. * * @param string $registration_id id for this registration (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -2248,7 +2345,7 @@ public function getRegistrationTagsWithHttpInfo($registration_id) /** * Operation getRegistrations * - * + * Get a list of all registrations. * * @param string $course_id Only registrations for the specified course id will be included. (optional) * @param string $learner_id Only registrations for the specified learner id will be included. (optional) @@ -2271,7 +2368,7 @@ public function getRegistrations($course_id = null, $learner_id = null, $since = /** * Operation getRegistrationsWithHttpInfo * - * + * Get a list of all registrations. * * @param string $course_id Only registrations for the specified course id will be included. (optional) * @param string $learner_id Only registrations for the specified learner id will be included. (optional) @@ -2388,7 +2485,7 @@ public function getRegistrationsWithHttpInfo($course_id = null, $learner_id = nu /** * Operation putRegistrationTags * - * + * Set tags on a registration. * * @param string $registration_id id for this registration (required) * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) @@ -2404,7 +2501,7 @@ public function putRegistrationTags($registration_id, $tags) /** * Operation putRegistrationTagsWithHttpInfo * - * + * Set tags on a registration. * * @param string $registration_id id for this registration (required) * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) @@ -2496,7 +2593,7 @@ public function putRegistrationTagsWithHttpInfo($registration_id, $tags) /** * Operation putRegistrationTagsBatch * - * + * Set tags on registrations. * * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -2511,7 +2608,7 @@ public function putRegistrationTagsBatch($batch) /** * Operation putRegistrationTagsBatchWithHttpInfo * - * + * Set tags on registrations. * * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response @@ -2588,37 +2685,43 @@ public function putRegistrationTagsBatchWithHttpInfo($batch) } /** - * Operation registrationExists + * Operation setRegistrationConfiguration * - * + * Set registration configuration. * * @param string $registration_id id for this registration (required) + * @param \RusticiSoftware\Cloud\V2\Model\SettingsPostSchema $configuration_settings (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response * @return void */ - public function registrationExists($registration_id) + public function setRegistrationConfiguration($registration_id, $configuration_settings) { - list($response) = $this->registrationExistsWithHttpInfo($registration_id); + list($response) = $this->setRegistrationConfigurationWithHttpInfo($registration_id, $configuration_settings); return $response; } /** - * Operation registrationExistsWithHttpInfo + * Operation setRegistrationConfigurationWithHttpInfo * - * + * Set registration configuration. * * @param string $registration_id id for this registration (required) + * @param \RusticiSoftware\Cloud\V2\Model\SettingsPostSchema $configuration_settings (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function registrationExistsWithHttpInfo($registration_id) + public function setRegistrationConfigurationWithHttpInfo($registration_id, $configuration_settings) { // verify the required parameter 'registration_id' is set if ($registration_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $registration_id when calling registrationExists'); + throw new \InvalidArgumentException('Missing the required parameter $registration_id when calling setRegistrationConfiguration'); + } + // verify the required parameter 'configuration_settings' is set + if ($configuration_settings === null) { + throw new \InvalidArgumentException('Missing the required parameter $configuration_settings when calling setRegistrationConfiguration'); } // parse inputs - $resourcePath = "/registrations/{registrationId}"; + $resourcePath = "/registrations/{registrationId}/configuration"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -2640,7 +2743,12 @@ public function registrationExistsWithHttpInfo($registration_id) // default format to json $resourcePath = str_replace("{format}", "json", $resourcePath); - + // body params + $_tempBody = null; + if (isset($configuration_settings)) { + $_tempBody = $configuration_settings; + } + // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present @@ -2659,12 +2767,12 @@ public function registrationExistsWithHttpInfo($registration_id) try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, - 'HEAD', + 'POST', $queryParams, $httpBody, $headerParams, null, - '/registrations/{registrationId}' + '/registrations/{registrationId}/configuration' ); return [null, $statusCode, $httpHeader]; @@ -2685,43 +2793,53 @@ public function registrationExistsWithHttpInfo($registration_id) } /** - * Operation setRegistrationConfiguration + * Operation setRegistrationInstanceConfiguration * - * + * Set configuration for instance of registration. * * @param string $registration_id id for this registration (required) + * @param int $instance_id The instance of this registration (required) * @param \RusticiSoftware\Cloud\V2\Model\SettingsPostSchema $configuration_settings (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response * @return void */ - public function setRegistrationConfiguration($registration_id, $configuration_settings) + public function setRegistrationInstanceConfiguration($registration_id, $instance_id, $configuration_settings) { - list($response) = $this->setRegistrationConfigurationWithHttpInfo($registration_id, $configuration_settings); + list($response) = $this->setRegistrationInstanceConfigurationWithHttpInfo($registration_id, $instance_id, $configuration_settings); return $response; } /** - * Operation setRegistrationConfigurationWithHttpInfo + * Operation setRegistrationInstanceConfigurationWithHttpInfo * - * + * Set configuration for instance of registration. * * @param string $registration_id id for this registration (required) + * @param int $instance_id The instance of this registration (required) * @param \RusticiSoftware\Cloud\V2\Model\SettingsPostSchema $configuration_settings (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setRegistrationConfigurationWithHttpInfo($registration_id, $configuration_settings) + public function setRegistrationInstanceConfigurationWithHttpInfo($registration_id, $instance_id, $configuration_settings) { // verify the required parameter 'registration_id' is set if ($registration_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $registration_id when calling setRegistrationConfiguration'); + throw new \InvalidArgumentException('Missing the required parameter $registration_id when calling setRegistrationInstanceConfiguration'); } + // verify the required parameter 'instance_id' is set + if ($instance_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $instance_id when calling setRegistrationInstanceConfiguration'); + } + if (($instance_id < 0)) { + throw new \InvalidArgumentException('invalid value for "$instance_id" when calling RegistrationApi.setRegistrationInstanceConfiguration, must be bigger than or equal to 0.'); + } + // verify the required parameter 'configuration_settings' is set if ($configuration_settings === null) { - throw new \InvalidArgumentException('Missing the required parameter $configuration_settings when calling setRegistrationConfiguration'); + throw new \InvalidArgumentException('Missing the required parameter $configuration_settings when calling setRegistrationInstanceConfiguration'); } // parse inputs - $resourcePath = "/registrations/{registrationId}/configuration"; + $resourcePath = "/registrations/{registrationId}/instances/{instanceId}/configuration"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -2740,6 +2858,14 @@ public function setRegistrationConfigurationWithHttpInfo($registration_id, $conf $resourcePath ); } + // path params + if ($instance_id !== null) { + $resourcePath = str_replace( + "{" . "instanceId" . "}", + $this->apiClient->getSerializer()->toPathValue($instance_id), + $resourcePath + ); + } // default format to json $resourcePath = str_replace("{format}", "json", $resourcePath); @@ -2772,7 +2898,7 @@ public function setRegistrationConfigurationWithHttpInfo($registration_id, $conf $httpBody, $headerParams, null, - '/registrations/{registrationId}/configuration' + '/registrations/{registrationId}/instances/{instanceId}/configuration' ); return [null, $statusCode, $httpHeader]; @@ -2793,53 +2919,37 @@ public function setRegistrationConfigurationWithHttpInfo($registration_id, $conf } /** - * Operation setRegistrationInstanceConfiguration + * Operation testRegistrationPostback * - * + * Send a test postback with a provided configuration. * - * @param string $registration_id id for this registration (required) - * @param int $instance_id The instance of this registration (required) - * @param \RusticiSoftware\Cloud\V2\Model\SettingsPostSchema $configuration_settings (required) + * @param \RusticiSoftware\Cloud\V2\Model\PostBackSchema $post_back (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response * @return void */ - public function setRegistrationInstanceConfiguration($registration_id, $instance_id, $configuration_settings) + public function testRegistrationPostback($post_back) { - list($response) = $this->setRegistrationInstanceConfigurationWithHttpInfo($registration_id, $instance_id, $configuration_settings); + list($response) = $this->testRegistrationPostbackWithHttpInfo($post_back); return $response; } /** - * Operation setRegistrationInstanceConfigurationWithHttpInfo + * Operation testRegistrationPostbackWithHttpInfo * - * + * Send a test postback with a provided configuration. * - * @param string $registration_id id for this registration (required) - * @param int $instance_id The instance of this registration (required) - * @param \RusticiSoftware\Cloud\V2\Model\SettingsPostSchema $configuration_settings (required) + * @param \RusticiSoftware\Cloud\V2\Model\PostBackSchema $post_back (required) * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setRegistrationInstanceConfigurationWithHttpInfo($registration_id, $instance_id, $configuration_settings) + public function testRegistrationPostbackWithHttpInfo($post_back) { - // verify the required parameter 'registration_id' is set - if ($registration_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $registration_id when calling setRegistrationInstanceConfiguration'); - } - // verify the required parameter 'instance_id' is set - if ($instance_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $instance_id when calling setRegistrationInstanceConfiguration'); - } - if (($instance_id < 0)) { - throw new \InvalidArgumentException('invalid value for "$instance_id" when calling RegistrationApi.setRegistrationInstanceConfiguration, must be bigger than or equal to 0.'); - } - - // verify the required parameter 'configuration_settings' is set - if ($configuration_settings === null) { - throw new \InvalidArgumentException('Missing the required parameter $configuration_settings when calling setRegistrationInstanceConfiguration'); + // verify the required parameter 'post_back' is set + if ($post_back === null) { + throw new \InvalidArgumentException('Missing the required parameter $post_back when calling testRegistrationPostback'); } // parse inputs - $resourcePath = "/registrations/{registrationId}/instances/{instanceId}/configuration"; + $resourcePath = "/registrations/postBackTest"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -2850,29 +2960,13 @@ public function setRegistrationInstanceConfigurationWithHttpInfo($registration_i } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // path params - if ($registration_id !== null) { - $resourcePath = str_replace( - "{" . "registrationId" . "}", - $this->apiClient->getSerializer()->toPathValue($registration_id), - $resourcePath - ); - } - // path params - if ($instance_id !== null) { - $resourcePath = str_replace( - "{" . "instanceId" . "}", - $this->apiClient->getSerializer()->toPathValue($instance_id), - $resourcePath - ); - } // default format to json $resourcePath = str_replace("{format}", "json", $resourcePath); // body params $_tempBody = null; - if (isset($configuration_settings)) { - $_tempBody = $configuration_settings; + if (isset($post_back)) { + $_tempBody = $post_back; } // for model (json/xml) @@ -2898,7 +2992,7 @@ public function setRegistrationInstanceConfigurationWithHttpInfo($registration_i $httpBody, $headerParams, null, - '/registrations/{registrationId}/instances/{instanceId}/configuration' + '/registrations/postBackTest' ); return [null, $statusCode, $httpHeader]; @@ -2908,10 +3002,6 @@ public function setRegistrationInstanceConfigurationWithHttpInfo($registration_i $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); $e->setResponseObject($data); break; - case 404: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; } throw $e; diff --git a/src/Api/ReportingApi.php b/src/Api/ReportingApi.php new file mode 100644 index 0000000..fed7513 --- /dev/null +++ b/src/Api/ReportingApi.php @@ -0,0 +1,374 @@ +apiClient = $apiClient; + } + + /** + * Get API client + * + * @return \RusticiSoftware\Cloud\V2\ApiClient get the API client + */ + public function getApiClient() + { + return $this->apiClient; + } + + /** + * Set the API client + * + * @param \RusticiSoftware\Cloud\V2\ApiClient $apiClient set the API client + * + * @return ReportingApi + */ + public function setApiClient(\RusticiSoftware\Cloud\V2\ApiClient $apiClient) + { + $this->apiClient = $apiClient; + return $this; + } + + /** + * Operation getAccountInfo + * + * Get all of the account information specified by the given app ID + * + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\ReportageAccountInfoSchema + */ + public function getAccountInfo() + { + list($response) = $this->getAccountInfoWithHttpInfo(); + return $response; + } + + /** + * Operation getAccountInfoWithHttpInfo + * + * Get all of the account information specified by the given app ID + * + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\ReportageAccountInfoSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getAccountInfoWithHttpInfo() + { + // parse inputs + $resourcePath = "/reporting/accountInfo"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\ReportageAccountInfoSchema', + '/reporting/accountInfo' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\ReportageAccountInfoSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\ReportageAccountInfoSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getReportageAuthToken + * + * Get a session authentication token to use when launching Reportage + * + * @param string $nav_permission The navigation permissions for this Reportage session (required) + * @param bool $admin Grant admin privileges to this Reportage session (optional, default to false) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\ReportageAuthTokenSchema + */ + public function getReportageAuthToken($nav_permission, $admin = null) + { + list($response) = $this->getReportageAuthTokenWithHttpInfo($nav_permission, $admin); + return $response; + } + + /** + * Operation getReportageAuthTokenWithHttpInfo + * + * Get a session authentication token to use when launching Reportage + * + * @param string $nav_permission The navigation permissions for this Reportage session (required) + * @param bool $admin Grant admin privileges to this Reportage session (optional, default to false) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\ReportageAuthTokenSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getReportageAuthTokenWithHttpInfo($nav_permission, $admin = null) + { + // verify the required parameter 'nav_permission' is set + if ($nav_permission === null) { + throw new \InvalidArgumentException('Missing the required parameter $nav_permission when calling getReportageAuthToken'); + } + // parse inputs + $resourcePath = "/reporting/reportageAuth"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($nav_permission !== null) { + $queryParams['navPermission'] = $this->apiClient->getSerializer()->toQueryValue($nav_permission); + } + // query params + if ($admin !== null) { + $queryParams['admin'] = $this->apiClient->getSerializer()->toQueryValue($admin); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\ReportageAuthTokenSchema', + '/reporting/reportageAuth' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\ReportageAuthTokenSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\ReportageAuthTokenSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getReportageLink + * + * Get the link to a page in Reportage with the given authentication and permissions + * + * @param string $auth The reportage authentication token retrieved from a previous call to `GET reportageAuth` (required) + * @param string $report_url The Reportage URL to try and access (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\ReportageLinkSchema + */ + public function getReportageLink($auth, $report_url) + { + list($response) = $this->getReportageLinkWithHttpInfo($auth, $report_url); + return $response; + } + + /** + * Operation getReportageLinkWithHttpInfo + * + * Get the link to a page in Reportage with the given authentication and permissions + * + * @param string $auth The reportage authentication token retrieved from a previous call to `GET reportageAuth` (required) + * @param string $report_url The Reportage URL to try and access (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\ReportageLinkSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getReportageLinkWithHttpInfo($auth, $report_url) + { + // verify the required parameter 'auth' is set + if ($auth === null) { + throw new \InvalidArgumentException('Missing the required parameter $auth when calling getReportageLink'); + } + // verify the required parameter 'report_url' is set + if ($report_url === null) { + throw new \InvalidArgumentException('Missing the required parameter $report_url when calling getReportageLink'); + } + // parse inputs + $resourcePath = "/reporting/reportageLink"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($auth !== null) { + $queryParams['auth'] = $this->apiClient->getSerializer()->toQueryValue($auth); + } + // query params + if ($report_url !== null) { + $queryParams['reportUrl'] = $this->apiClient->getSerializer()->toQueryValue($report_url); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\ReportageLinkSchema', + '/reporting/reportageLink' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\ReportageLinkSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\ReportageLinkSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } +} diff --git a/src/Api/WebsiteApi.php b/src/Api/WebsiteApi.php new file mode 100644 index 0000000..9cca07d --- /dev/null +++ b/src/Api/WebsiteApi.php @@ -0,0 +1,1326 @@ +apiClient = $apiClient; + } + + /** + * Get API client + * + * @return \RusticiSoftware\Cloud\V2\ApiClient get the API client + */ + public function getApiClient() + { + return $this->apiClient; + } + + /** + * Set the API client + * + * @param \RusticiSoftware\Cloud\V2\ApiClient $apiClient set the API client + * + * @return WebsiteApi + */ + public function setApiClient(\RusticiSoftware\Cloud\V2\ApiClient $apiClient) + { + $this->apiClient = $apiClient; + return $this; + } + + /** + * Operation deleteApplicationZoomiKeys + * + * Delete the keys for an application. + * + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return string + */ + public function deleteApplicationZoomiKeys() + { + list($response) = $this->deleteApplicationZoomiKeysWithHttpInfo(); + return $response; + } + + /** + * Operation deleteApplicationZoomiKeysWithHttpInfo + * + * Delete the keys for an application. + * + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteApplicationZoomiKeysWithHttpInfo() + { + // parse inputs + $resourcePath = "/zoomi/key"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/zoomi/key' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, 'string', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 204: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation deleteInvitationTags + * + * Delete tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function deleteInvitationTags($invitation_id, $tags) + { + list($response) = $this->deleteInvitationTagsWithHttpInfo($invitation_id, $tags); + return $response; + } + + /** + * Operation deleteInvitationTagsWithHttpInfo + * + * Delete tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteInvitationTagsWithHttpInfo($invitation_id, $tags) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling deleteInvitationTags'); + } + // verify the required parameter 'tags' is set + if ($tags === null) { + throw new \InvalidArgumentException('Missing the required parameter $tags when calling deleteInvitationTags'); + } + // parse inputs + $resourcePath = "/invitations/{invitationId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($tags)) { + $_tempBody = $tags; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/invitations/{invitationId}/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation deleteZoomiCourse + * + * Deletes the course in zoomi + * + * @param string $course_id (required) + * @param int $version_id The course version (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return string + */ + public function deleteZoomiCourse($course_id, $version_id) + { + list($response) = $this->deleteZoomiCourseWithHttpInfo($course_id, $version_id); + return $response; + } + + /** + * Operation deleteZoomiCourseWithHttpInfo + * + * Deletes the course in zoomi + * + * @param string $course_id (required) + * @param int $version_id The course version (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteZoomiCourseWithHttpInfo($course_id, $version_id) + { + // verify the required parameter 'course_id' is set + if ($course_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $course_id when calling deleteZoomiCourse'); + } + // verify the required parameter 'version_id' is set + if ($version_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $version_id when calling deleteZoomiCourse'); + } + // parse inputs + $resourcePath = "/zoomi/course/{courseId}/version/{versionId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($course_id !== null) { + $resourcePath = str_replace( + "{" . "courseId" . "}", + $this->apiClient->getSerializer()->toPathValue($course_id), + $resourcePath + ); + } + // path params + if ($version_id !== null) { + $resourcePath = str_replace( + "{" . "versionId" . "}", + $this->apiClient->getSerializer()->toPathValue($version_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/zoomi/course/{courseId}/version/{versionId}' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, 'string', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 204: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getApplicationZoomiCompanyId + * + * Gets the zoomi company id of an application. + * + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return string + */ + public function getApplicationZoomiCompanyId() + { + list($response) = $this->getApplicationZoomiCompanyIdWithHttpInfo(); + return $response; + } + + /** + * Operation getApplicationZoomiCompanyIdWithHttpInfo + * + * Gets the zoomi company id of an application. + * + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function getApplicationZoomiCompanyIdWithHttpInfo() + { + // parse inputs + $resourcePath = "/zoomi"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/zoomi' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, 'string', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getApplicationZoomiPublicKey + * + * Gets the public key for an application. + * + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return string + */ + public function getApplicationZoomiPublicKey() + { + list($response) = $this->getApplicationZoomiPublicKeyWithHttpInfo(); + return $response; + } + + /** + * Operation getApplicationZoomiPublicKeyWithHttpInfo + * + * Gets the public key for an application. + * + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function getApplicationZoomiPublicKeyWithHttpInfo() + { + // parse inputs + $resourcePath = "/zoomi/key"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/zoomi/key' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, 'string', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getCourseZoomiEnabled + * + * Gets the zoomi enabled value of a course + * + * @param string $course_id (required) + * @param int $version_id The course version (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return string + */ + public function getCourseZoomiEnabled($course_id, $version_id) + { + list($response) = $this->getCourseZoomiEnabledWithHttpInfo($course_id, $version_id); + return $response; + } + + /** + * Operation getCourseZoomiEnabledWithHttpInfo + * + * Gets the zoomi enabled value of a course + * + * @param string $course_id (required) + * @param int $version_id The course version (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function getCourseZoomiEnabledWithHttpInfo($course_id, $version_id) + { + // verify the required parameter 'course_id' is set + if ($course_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $course_id when calling getCourseZoomiEnabled'); + } + // verify the required parameter 'version_id' is set + if ($version_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $version_id when calling getCourseZoomiEnabled'); + } + // parse inputs + $resourcePath = "/zoomi/course/{courseId}/version/{versionId}/enabled"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($course_id !== null) { + $resourcePath = str_replace( + "{" . "courseId" . "}", + $this->apiClient->getSerializer()->toPathValue($course_id), + $resourcePath + ); + } + // path params + if ($version_id !== null) { + $resourcePath = str_replace( + "{" . "versionId" . "}", + $this->apiClient->getSerializer()->toPathValue($version_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/zoomi/course/{courseId}/version/{versionId}/enabled' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, 'string', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getInvitationTags + * + * Get the tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\TagListSchema + */ + public function getInvitationTags($invitation_id) + { + list($response) = $this->getInvitationTagsWithHttpInfo($invitation_id); + return $response; + } + + /** + * Operation getInvitationTagsWithHttpInfo + * + * Get the tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\TagListSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getInvitationTagsWithHttpInfo($invitation_id) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling getInvitationTags'); + } + // parse inputs + $resourcePath = "/invitations/{invitationId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\TagListSchema', + '/invitations/{invitationId}/tags' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\TagListSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\TagListSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getZoomiCourseStatus + * + * Gets the status for a course and imports to Zoomi + * + * @param string $course_id (required) + * @param int $version_id The course version (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return string + */ + public function getZoomiCourseStatus($course_id, $version_id) + { + list($response) = $this->getZoomiCourseStatusWithHttpInfo($course_id, $version_id); + return $response; + } + + /** + * Operation getZoomiCourseStatusWithHttpInfo + * + * Gets the status for a course and imports to Zoomi + * + * @param string $course_id (required) + * @param int $version_id The course version (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function getZoomiCourseStatusWithHttpInfo($course_id, $version_id) + { + // verify the required parameter 'course_id' is set + if ($course_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $course_id when calling getZoomiCourseStatus'); + } + // verify the required parameter 'version_id' is set + if ($version_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $version_id when calling getZoomiCourseStatus'); + } + // parse inputs + $resourcePath = "/zoomi/course/{courseId}/version/{versionId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($course_id !== null) { + $resourcePath = str_replace( + "{" . "courseId" . "}", + $this->apiClient->getSerializer()->toPathValue($course_id), + $resourcePath + ); + } + // path params + if ($version_id !== null) { + $resourcePath = str_replace( + "{" . "versionId" . "}", + $this->apiClient->getSerializer()->toPathValue($version_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/zoomi/course/{courseId}/version/{versionId}' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, 'string', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation putInvitationTags + * + * Set the tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function putInvitationTags($invitation_id, $tags) + { + list($response) = $this->putInvitationTagsWithHttpInfo($invitation_id, $tags); + return $response; + } + + /** + * Operation putInvitationTagsWithHttpInfo + * + * Set the tags for this invitation + * + * @param string $invitation_id invitation id (required) + * @param \RusticiSoftware\Cloud\V2\Model\TagListSchema $tags (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function putInvitationTagsWithHttpInfo($invitation_id, $tags) + { + // verify the required parameter 'invitation_id' is set + if ($invitation_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $invitation_id when calling putInvitationTags'); + } + // verify the required parameter 'tags' is set + if ($tags === null) { + throw new \InvalidArgumentException('Missing the required parameter $tags when calling putInvitationTags'); + } + // parse inputs + $resourcePath = "/invitations/{invitationId}/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($invitation_id !== null) { + $resourcePath = str_replace( + "{" . "invitationId" . "}", + $this->apiClient->getSerializer()->toPathValue($invitation_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($tags)) { + $_tempBody = $tags; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/invitations/{invitationId}/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation putInvitationTagsBatch + * + * Sets all of the provided tags on all of the provided invitations + * + * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function putInvitationTagsBatch($batch) + { + list($response) = $this->putInvitationTagsBatchWithHttpInfo($batch); + return $response; + } + + /** + * Operation putInvitationTagsBatchWithHttpInfo + * + * Sets all of the provided tags on all of the provided invitations + * + * @param \RusticiSoftware\Cloud\V2\Model\BatchTagsSchema $batch Object representing an array of ids to apply an array of tags to. (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function putInvitationTagsBatchWithHttpInfo($batch) + { + // verify the required parameter 'batch' is set + if ($batch === null) { + throw new \InvalidArgumentException('Missing the required parameter $batch when calling putInvitationTagsBatch'); + } + // parse inputs + $resourcePath = "/invitations/tags"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($batch)) { + $_tempBody = $batch; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/invitations/tags' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation setApplicationZoomiCompanyId + * + * Set the zoomi company id value of an application. + * + * @param \RusticiSoftware\Cloud\V2\Model\ZoomiCompanyId $zoomi_company_id (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return string + */ + public function setApplicationZoomiCompanyId($zoomi_company_id) + { + list($response) = $this->setApplicationZoomiCompanyIdWithHttpInfo($zoomi_company_id); + return $response; + } + + /** + * Operation setApplicationZoomiCompanyIdWithHttpInfo + * + * Set the zoomi company id value of an application. + * + * @param \RusticiSoftware\Cloud\V2\Model\ZoomiCompanyId $zoomi_company_id (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function setApplicationZoomiCompanyIdWithHttpInfo($zoomi_company_id) + { + // verify the required parameter 'zoomi_company_id' is set + if ($zoomi_company_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $zoomi_company_id when calling setApplicationZoomiCompanyId'); + } + // parse inputs + $resourcePath = "/zoomi"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($zoomi_company_id)) { + $_tempBody = $zoomi_company_id; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/zoomi' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, 'string', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 204: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation setCourseZoomiEnabled + * + * Set the zoomi enabled value of a course. + * + * @param string $course_id (required) + * @param int $version_id The course version (required) + * @param \RusticiSoftware\Cloud\V2\Model\ZoomiCourseOptionsSchema $zoomi_course_options (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return string + */ + public function setCourseZoomiEnabled($course_id, $version_id, $zoomi_course_options = null) + { + list($response) = $this->setCourseZoomiEnabledWithHttpInfo($course_id, $version_id, $zoomi_course_options); + return $response; + } + + /** + * Operation setCourseZoomiEnabledWithHttpInfo + * + * Set the zoomi enabled value of a course. + * + * @param string $course_id (required) + * @param int $version_id The course version (required) + * @param \RusticiSoftware\Cloud\V2\Model\ZoomiCourseOptionsSchema $zoomi_course_options (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function setCourseZoomiEnabledWithHttpInfo($course_id, $version_id, $zoomi_course_options = null) + { + // verify the required parameter 'course_id' is set + if ($course_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $course_id when calling setCourseZoomiEnabled'); + } + // verify the required parameter 'version_id' is set + if ($version_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $version_id when calling setCourseZoomiEnabled'); + } + // parse inputs + $resourcePath = "/zoomi/course/{courseId}/version/{versionId}/enabled"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($course_id !== null) { + $resourcePath = str_replace( + "{" . "courseId" . "}", + $this->apiClient->getSerializer()->toPathValue($course_id), + $resourcePath + ); + } + // path params + if ($version_id !== null) { + $resourcePath = str_replace( + "{" . "versionId" . "}", + $this->apiClient->getSerializer()->toPathValue($version_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($zoomi_course_options)) { + $_tempBody = $zoomi_course_options; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/zoomi/course/{courseId}/version/{versionId}/enabled' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, 'string', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 204: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } +} diff --git a/src/Api/XapiApi.php b/src/Api/XapiApi.php new file mode 100644 index 0000000..aa167f2 --- /dev/null +++ b/src/Api/XapiApi.php @@ -0,0 +1,1043 @@ +apiClient = $apiClient; + } + + /** + * Get API client + * + * @return \RusticiSoftware\Cloud\V2\ApiClient get the API client + */ + public function getApiClient() + { + return $this->apiClient; + } + + /** + * Set the API client + * + * @param \RusticiSoftware\Cloud\V2\ApiClient $apiClient set the API client + * + * @return XapiApi + */ + public function setApiClient(\RusticiSoftware\Cloud\V2\ApiClient $apiClient) + { + $this->apiClient = $apiClient; + return $this; + } + + /** + * Operation createStatementPipe + * + * Create an xAPI statement pipe. + * + * @param \RusticiSoftware\Cloud\V2\Model\XapiStatementPipePostSchema $xapi_statement_pipe (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\StringResultSchema + */ + public function createStatementPipe($xapi_statement_pipe) + { + list($response) = $this->createStatementPipeWithHttpInfo($xapi_statement_pipe); + return $response; + } + + /** + * Operation createStatementPipeWithHttpInfo + * + * Create an xAPI statement pipe. + * + * @param \RusticiSoftware\Cloud\V2\Model\XapiStatementPipePostSchema $xapi_statement_pipe (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\StringResultSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function createStatementPipeWithHttpInfo($xapi_statement_pipe) + { + // verify the required parameter 'xapi_statement_pipe' is set + if ($xapi_statement_pipe === null) { + throw new \InvalidArgumentException('Missing the required parameter $xapi_statement_pipe when calling createStatementPipe'); + } + // parse inputs + $resourcePath = "/xapi/statementPipes"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($xapi_statement_pipe)) { + $_tempBody = $xapi_statement_pipe; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\StringResultSchema', + '/xapi/statementPipes' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\StringResultSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\StringResultSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation createXapiCredential + * + * Create a xAPI credential. + * + * @param \RusticiSoftware\Cloud\V2\Model\XapiCredentialPostSchema $xapi_credential (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\StringResultSchema + */ + public function createXapiCredential($xapi_credential) + { + list($response) = $this->createXapiCredentialWithHttpInfo($xapi_credential); + return $response; + } + + /** + * Operation createXapiCredentialWithHttpInfo + * + * Create a xAPI credential. + * + * @param \RusticiSoftware\Cloud\V2\Model\XapiCredentialPostSchema $xapi_credential (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\StringResultSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function createXapiCredentialWithHttpInfo($xapi_credential) + { + // verify the required parameter 'xapi_credential' is set + if ($xapi_credential === null) { + throw new \InvalidArgumentException('Missing the required parameter $xapi_credential when calling createXapiCredential'); + } + // parse inputs + $resourcePath = "/xapi/credentials"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($xapi_credential)) { + $_tempBody = $xapi_credential; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\StringResultSchema', + '/xapi/credentials' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\StringResultSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\StringResultSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation deleteStatementPipe + * + * Deletes this xAPI pipe. + * + * @param string $statement_pipe_id id for this xAPI statement pipe (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function deleteStatementPipe($statement_pipe_id) + { + list($response) = $this->deleteStatementPipeWithHttpInfo($statement_pipe_id); + return $response; + } + + /** + * Operation deleteStatementPipeWithHttpInfo + * + * Deletes this xAPI pipe. + * + * @param string $statement_pipe_id id for this xAPI statement pipe (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteStatementPipeWithHttpInfo($statement_pipe_id) + { + // verify the required parameter 'statement_pipe_id' is set + if ($statement_pipe_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $statement_pipe_id when calling deleteStatementPipe'); + } + // parse inputs + $resourcePath = "/xapi/statementPipes/{statementPipeId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($statement_pipe_id !== null) { + $resourcePath = str_replace( + "{" . "statementPipeId" . "}", + $this->apiClient->getSerializer()->toPathValue($statement_pipe_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/xapi/statementPipes/{statementPipeId}' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation deleteXapiCredential + * + * Deletes the xAPI credentials specified by the xAPI credentials id + * + * @param string $xapi_credential_id id for this xAPI credential (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function deleteXapiCredential($xapi_credential_id) + { + list($response) = $this->deleteXapiCredentialWithHttpInfo($xapi_credential_id); + return $response; + } + + /** + * Operation deleteXapiCredentialWithHttpInfo + * + * Deletes the xAPI credentials specified by the xAPI credentials id + * + * @param string $xapi_credential_id id for this xAPI credential (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteXapiCredentialWithHttpInfo($xapi_credential_id) + { + // verify the required parameter 'xapi_credential_id' is set + if ($xapi_credential_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $xapi_credential_id when calling deleteXapiCredential'); + } + // parse inputs + $resourcePath = "/xapi/credentials/{xapiCredentialId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($xapi_credential_id !== null) { + $resourcePath = str_replace( + "{" . "xapiCredentialId" . "}", + $this->apiClient->getSerializer()->toPathValue($xapi_credential_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/xapi/credentials/{xapiCredentialId}' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getStatementPipe + * + * Retrieves xAPI pipe for `xapiPipeId` + * + * @param string $statement_pipe_id id for this xAPI statement pipe (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\XapiStatementPipeSchema + */ + public function getStatementPipe($statement_pipe_id) + { + list($response) = $this->getStatementPipeWithHttpInfo($statement_pipe_id); + return $response; + } + + /** + * Operation getStatementPipeWithHttpInfo + * + * Retrieves xAPI pipe for `xapiPipeId` + * + * @param string $statement_pipe_id id for this xAPI statement pipe (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\XapiStatementPipeSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getStatementPipeWithHttpInfo($statement_pipe_id) + { + // verify the required parameter 'statement_pipe_id' is set + if ($statement_pipe_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $statement_pipe_id when calling getStatementPipe'); + } + // parse inputs + $resourcePath = "/xapi/statementPipes/{statementPipeId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($statement_pipe_id !== null) { + $resourcePath = str_replace( + "{" . "statementPipeId" . "}", + $this->apiClient->getSerializer()->toPathValue($statement_pipe_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\XapiStatementPipeSchema', + '/xapi/statementPipes/{statementPipeId}' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\XapiStatementPipeSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\XapiStatementPipeSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getStatementPipes + * + * Get all of the xapiPipes for `appId` + * + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\XapiStatementPipeListSchema + */ + public function getStatementPipes() + { + list($response) = $this->getStatementPipesWithHttpInfo(); + return $response; + } + + /** + * Operation getStatementPipesWithHttpInfo + * + * Get all of the xapiPipes for `appId` + * + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\XapiStatementPipeListSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getStatementPipesWithHttpInfo() + { + // parse inputs + $resourcePath = "/xapi/statementPipes"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\XapiStatementPipeListSchema', + '/xapi/statementPipes' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\XapiStatementPipeListSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\XapiStatementPipeListSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getXapiCredential + * + * Retrieves the xAPI credentials specified by the xAPI credentials id. + * + * @param string $xapi_credential_id id for this xAPI credential (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\XapiCredentialSchema + */ + public function getXapiCredential($xapi_credential_id) + { + list($response) = $this->getXapiCredentialWithHttpInfo($xapi_credential_id); + return $response; + } + + /** + * Operation getXapiCredentialWithHttpInfo + * + * Retrieves the xAPI credentials specified by the xAPI credentials id. + * + * @param string $xapi_credential_id id for this xAPI credential (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\XapiCredentialSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getXapiCredentialWithHttpInfo($xapi_credential_id) + { + // verify the required parameter 'xapi_credential_id' is set + if ($xapi_credential_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $xapi_credential_id when calling getXapiCredential'); + } + // parse inputs + $resourcePath = "/xapi/credentials/{xapiCredentialId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($xapi_credential_id !== null) { + $resourcePath = str_replace( + "{" . "xapiCredentialId" . "}", + $this->apiClient->getSerializer()->toPathValue($xapi_credential_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\XapiCredentialSchema', + '/xapi/credentials/{xapiCredentialId}' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\XapiCredentialSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\XapiCredentialSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation getXapiCredentials + * + * Get the list of xapiCredentials + * + * @param \DateTime $since Only <<resourcePathName>> updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of <<resourcePathName>> lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\XapiCredentialsListSchema + */ + public function getXapiCredentials($since = null, $more = null) + { + list($response) = $this->getXapiCredentialsWithHttpInfo($since, $more); + return $response; + } + + /** + * Operation getXapiCredentialsWithHttpInfo + * + * Get the list of xapiCredentials + * + * @param \DateTime $since Only <<resourcePathName>> updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used. (optional) + * @param string $more Value for this parameter will be provided in the 'more' property of <<resourcePathName>> lists, where needed. An opaque value, construction and parsing may change without notice. (optional) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\XapiCredentialsListSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function getXapiCredentialsWithHttpInfo($since = null, $more = null) + { + // parse inputs + $resourcePath = "/xapi/credentials"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // query params + if ($since !== null) { + $queryParams['since'] = $this->apiClient->getSerializer()->toQueryValue($since); + } + // query params + if ($more !== null) { + $queryParams['more'] = $this->apiClient->getSerializer()->toQueryValue($more); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\XapiCredentialsListSchema', + '/xapi/credentials' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\XapiCredentialsListSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\XapiCredentialsListSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation setStatementPipe + * + * Edit an existing xAPI pipe or create a new one. + * + * @param string $statement_pipe_id id for this xAPI statement pipe (required) + * @param \RusticiSoftware\Cloud\V2\Model\XapiStatementPipeSchema $xapi_statement_pipe (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return \RusticiSoftware\Cloud\V2\Model\StringResultSchema + */ + public function setStatementPipe($statement_pipe_id, $xapi_statement_pipe) + { + list($response) = $this->setStatementPipeWithHttpInfo($statement_pipe_id, $xapi_statement_pipe); + return $response; + } + + /** + * Operation setStatementPipeWithHttpInfo + * + * Edit an existing xAPI pipe or create a new one. + * + * @param string $statement_pipe_id id for this xAPI statement pipe (required) + * @param \RusticiSoftware\Cloud\V2\Model\XapiStatementPipeSchema $xapi_statement_pipe (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of \RusticiSoftware\Cloud\V2\Model\StringResultSchema, HTTP status code, HTTP response headers (array of strings) + */ + public function setStatementPipeWithHttpInfo($statement_pipe_id, $xapi_statement_pipe) + { + // verify the required parameter 'statement_pipe_id' is set + if ($statement_pipe_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $statement_pipe_id when calling setStatementPipe'); + } + // verify the required parameter 'xapi_statement_pipe' is set + if ($xapi_statement_pipe === null) { + throw new \InvalidArgumentException('Missing the required parameter $xapi_statement_pipe when calling setStatementPipe'); + } + // parse inputs + $resourcePath = "/xapi/statementPipes/{statementPipeId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($statement_pipe_id !== null) { + $resourcePath = str_replace( + "{" . "statementPipeId" . "}", + $this->apiClient->getSerializer()->toPathValue($statement_pipe_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($xapi_statement_pipe)) { + $_tempBody = $xapi_statement_pipe; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + '\RusticiSoftware\Cloud\V2\Model\StringResultSchema', + '/xapi/statementPipes/{statementPipeId}' + ); + + return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\StringResultSchema', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\StringResultSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 409: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } + + /** + * Operation setXapiCredential + * + * Edit an existing xAPI credential or create a new one, specified by the xAPI credentials id + * + * @param string $xapi_credential_id id for this xAPI credential (required) + * @param \RusticiSoftware\Cloud\V2\Model\XapiCredentialPostSchema $xapi_credential (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return void + */ + public function setXapiCredential($xapi_credential_id, $xapi_credential) + { + list($response) = $this->setXapiCredentialWithHttpInfo($xapi_credential_id, $xapi_credential); + return $response; + } + + /** + * Operation setXapiCredentialWithHttpInfo + * + * Edit an existing xAPI credential or create a new one, specified by the xAPI credentials id + * + * @param string $xapi_credential_id id for this xAPI credential (required) + * @param \RusticiSoftware\Cloud\V2\Model\XapiCredentialPostSchema $xapi_credential (required) + * @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function setXapiCredentialWithHttpInfo($xapi_credential_id, $xapi_credential) + { + // verify the required parameter 'xapi_credential_id' is set + if ($xapi_credential_id === null) { + throw new \InvalidArgumentException('Missing the required parameter $xapi_credential_id when calling setXapiCredential'); + } + // verify the required parameter 'xapi_credential' is set + if ($xapi_credential === null) { + throw new \InvalidArgumentException('Missing the required parameter $xapi_credential when calling setXapiCredential'); + } + // parse inputs + $resourcePath = "/xapi/credentials/{xapiCredentialId}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); + + // path params + if ($xapi_credential_id !== null) { + $resourcePath = str_replace( + "{" . "xapiCredentialId" . "}", + $this->apiClient->getSerializer()->toPathValue($xapi_credential_id), + $resourcePath + ); + } + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // body params + $_tempBody = null; + if (isset($xapi_credential)) { + $_tempBody = $xapi_credential; + } + + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/xapi/credentials/{xapiCredentialId}' + ); + + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\MessageSchema', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } + + throw $e; + } + } +} diff --git a/src/ApiClient.php b/src/ApiClient.php index 8830fbf..c7151e7 100644 --- a/src/ApiClient.php +++ b/src/ApiClient.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/ApiException.php b/src/ApiException.php index 6d0c510..5e6e742 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -14,7 +14,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Configuration.php b/src/Configuration.php index 249cab3..5ba8d6a 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -14,7 +14,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -109,7 +109,7 @@ class Configuration * * @var string */ - protected $userAgent = "Swagger-Codegen/1.0.0-beta/php"; + protected $userAgent = "Swagger-Codegen/1.0.0/php"; /** * Debug switch (default set to false) @@ -694,8 +694,8 @@ public static function toDebugReport() $report = 'PHP SDK (RusticiSoftware\Cloud\V2) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . phpversion() . PHP_EOL; - $report .= ' OpenAPI Spec Version: 2.0 beta' . PHP_EOL; - $report .= ' SDK Package Version: 1.0.0-beta' . PHP_EOL; + $report .= ' OpenAPI Spec Version: 2.0' . PHP_EOL; + $report .= ' SDK Package Version: 1.0.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/src/Model/AboutSchema.php b/src/Model/AboutSchema.php new file mode 100644 index 0000000..f6c380e --- /dev/null +++ b/src/Model/AboutSchema.php @@ -0,0 +1,255 @@ + 'string', + 'distribution' => 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'version' => 'version', + 'distribution' => 'distribution' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'version' => 'setVersion', + 'distribution' => 'setDistribution' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'version' => 'getVersion', + 'distribution' => 'getDistribution' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['version'] = isset($data['version']) ? $data['version'] : null; + $this->container['distribution'] = isset($data['distribution']) ? $data['distribution'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets version + * @return string + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * @param string $version + * @return $this + */ + public function setVersion($version) + { + $this->container['version'] = $version; + + return $this; + } + + /** + * Gets distribution + * @return string + */ + public function getDistribution() + { + return $this->container['distribution']; + } + + /** + * Sets distribution + * @param string $distribution + * @return $this + */ + public function setDistribution($distribution) + { + $this->container['distribution'] = $distribution; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ActivityResultSchema.php b/src/Model/ActivityResultSchema.php index 9ac8d85..1430eff 100644 --- a/src/Model/ActivityResultSchema.php +++ b/src/Model/ActivityResultSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/ApplicationListSchema.php b/src/Model/ApplicationListSchema.php index 1a14a42..9790bc2 100644 --- a/src/Model/ApplicationListSchema.php +++ b/src/Model/ApplicationListSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/ApplicationSchema.php b/src/Model/ApplicationSchema.php index 5c07f65..08946d9 100644 --- a/src/Model/ApplicationSchema.php +++ b/src/Model/ApplicationSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/ApplicationToken.php b/src/Model/ApplicationToken.php index 2f11819..4c6dce8 100644 --- a/src/Model/ApplicationToken.php +++ b/src/Model/ApplicationToken.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/BatchTagsSchema.php b/src/Model/BatchTagsSchema.php index 4c18920..d15240e 100644 --- a/src/Model/BatchTagsSchema.php +++ b/src/Model/BatchTagsSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/CommentSchema.php b/src/Model/CommentSchema.php index af11565..21a6754 100644 --- a/src/Model/CommentSchema.php +++ b/src/Model/CommentSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/CompletionAmountSchema.php b/src/Model/CompletionAmountSchema.php index 93aee68..913dbdd 100644 --- a/src/Model/CompletionAmountSchema.php +++ b/src/Model/CompletionAmountSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/CourseActivitySchema.php b/src/Model/CourseActivitySchema.php index d30bfaf..fed00d5 100644 --- a/src/Model/CourseActivitySchema.php +++ b/src/Model/CourseActivitySchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/CourseListNonPagedSchema.php b/src/Model/CourseListNonPagedSchema.php index e327fdc..7b42be8 100644 --- a/src/Model/CourseListNonPagedSchema.php +++ b/src/Model/CourseListNonPagedSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/CourseListSchema.php b/src/Model/CourseListSchema.php index 2b9375a..d81caa6 100644 --- a/src/Model/CourseListSchema.php +++ b/src/Model/CourseListSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/CourseReferenceSchema.php b/src/Model/CourseReferenceSchema.php index 09fddd8..f2ab982 100644 --- a/src/Model/CourseReferenceSchema.php +++ b/src/Model/CourseReferenceSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/CourseSchema.php b/src/Model/CourseSchema.php index 53d1ae2..ecb5cea 100644 --- a/src/Model/CourseSchema.php +++ b/src/Model/CourseSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/CreateDispatchIdSchema.php b/src/Model/CreateDispatchIdSchema.php new file mode 100644 index 0000000..735ee03 --- /dev/null +++ b/src/Model/CreateDispatchIdSchema.php @@ -0,0 +1,279 @@ + 'string', + 'data' => '\RusticiSoftware\Cloud\V2\Model\CreateDispatchSchema' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'data' => 'data' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'data' => 'setData' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'data' => 'getData' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['id'] === null) { + $invalid_properties[] = "'id' can't be null"; + } + if ((strlen($this->container['id']) < 9)) { + $invalid_properties[] = "invalid value for 'id', the character length must be bigger than or equal to 9."; + } + + if ($this->container['data'] === null) { + $invalid_properties[] = "'data' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['id'] === null) { + return false; + } + if (strlen($this->container['id']) < 9) { + return false; + } + if ($this->container['data'] === null) { + return false; + } + return true; + } + + + /** + * Gets id + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param string $id + * @return $this + */ + public function setId($id) + { + + if ((strlen($id) < 9)) { + throw new \InvalidArgumentException('invalid length for $id when calling CreateDispatchIdSchema., must be bigger than or equal to 9.'); + } + + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets data + * @return \RusticiSoftware\Cloud\V2\Model\CreateDispatchSchema + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * @param \RusticiSoftware\Cloud\V2\Model\CreateDispatchSchema $data + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateDispatchListSchema.php b/src/Model/CreateDispatchListSchema.php new file mode 100644 index 0000000..d879697 --- /dev/null +++ b/src/Model/CreateDispatchListSchema.php @@ -0,0 +1,229 @@ + '\RusticiSoftware\Cloud\V2\Model\CreateDispatchIdSchema[]' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'dispatches' => 'dispatches' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'dispatches' => 'setDispatches' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'dispatches' => 'getDispatches' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['dispatches'] = isset($data['dispatches']) ? $data['dispatches'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets dispatches + * @return \RusticiSoftware\Cloud\V2\Model\CreateDispatchIdSchema[] + */ + public function getDispatches() + { + return $this->container['dispatches']; + } + + /** + * Sets dispatches + * @param \RusticiSoftware\Cloud\V2\Model\CreateDispatchIdSchema[] $dispatches + * @return $this + */ + public function setDispatches($dispatches) + { + $this->container['dispatches'] = $dispatches; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateDispatchSchema.php b/src/Model/CreateDispatchSchema.php new file mode 100644 index 0000000..f725d31 --- /dev/null +++ b/src/Model/CreateDispatchSchema.php @@ -0,0 +1,501 @@ + 'string', + 'course_id' => 'string', + 'allow_new_registrations' => 'bool', + 'instanced' => 'bool', + 'registration_cap' => 'int', + 'expiration_date' => '\DateTime', + 'enabled' => 'bool', + 'tags' => 'string[]', + 'email' => 'string', + 'notes' => 'string', + 'post_back' => '\RusticiSoftware\Cloud\V2\Model\PostBackSchema' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'destination_id' => 'destinationId', + 'course_id' => 'courseId', + 'allow_new_registrations' => 'allowNewRegistrations', + 'instanced' => 'instanced', + 'registration_cap' => 'registrationCap', + 'expiration_date' => 'expirationDate', + 'enabled' => 'enabled', + 'tags' => 'tags', + 'email' => 'email', + 'notes' => 'notes', + 'post_back' => 'postBack' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'destination_id' => 'setDestinationId', + 'course_id' => 'setCourseId', + 'allow_new_registrations' => 'setAllowNewRegistrations', + 'instanced' => 'setInstanced', + 'registration_cap' => 'setRegistrationCap', + 'expiration_date' => 'setExpirationDate', + 'enabled' => 'setEnabled', + 'tags' => 'setTags', + 'email' => 'setEmail', + 'notes' => 'setNotes', + 'post_back' => 'setPostBack' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'destination_id' => 'getDestinationId', + 'course_id' => 'getCourseId', + 'allow_new_registrations' => 'getAllowNewRegistrations', + 'instanced' => 'getInstanced', + 'registration_cap' => 'getRegistrationCap', + 'expiration_date' => 'getExpirationDate', + 'enabled' => 'getEnabled', + 'tags' => 'getTags', + 'email' => 'getEmail', + 'notes' => 'getNotes', + 'post_back' => 'getPostBack' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['destination_id'] = isset($data['destination_id']) ? $data['destination_id'] : null; + $this->container['course_id'] = isset($data['course_id']) ? $data['course_id'] : null; + $this->container['allow_new_registrations'] = isset($data['allow_new_registrations']) ? $data['allow_new_registrations'] : true; + $this->container['instanced'] = isset($data['instanced']) ? $data['instanced'] : true; + $this->container['registration_cap'] = isset($data['registration_cap']) ? $data['registration_cap'] : 0; + $this->container['expiration_date'] = isset($data['expiration_date']) ? $data['expiration_date'] : null; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : true; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['notes'] = isset($data['notes']) ? $data['notes'] : null; + $this->container['post_back'] = isset($data['post_back']) ? $data['post_back'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['destination_id'] === null) { + $invalid_properties[] = "'destination_id' can't be null"; + } + if ($this->container['course_id'] === null) { + $invalid_properties[] = "'course_id' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['destination_id'] === null) { + return false; + } + if ($this->container['course_id'] === null) { + return false; + } + return true; + } + + + /** + * Gets destination_id + * @return string + */ + public function getDestinationId() + { + return $this->container['destination_id']; + } + + /** + * Sets destination_id + * @param string $destination_id Id of the destination this dispatch will belong to. + * @return $this + */ + public function setDestinationId($destination_id) + { + $this->container['destination_id'] = $destination_id; + + return $this; + } + + /** + * Gets course_id + * @return string + */ + public function getCourseId() + { + return $this->container['course_id']; + } + + /** + * Sets course_id + * @param string $course_id Id of the course to be dispatched. + * @return $this + */ + public function setCourseId($course_id) + { + $this->container['course_id'] = $course_id; + + return $this; + } + + /** + * Gets allow_new_registrations + * @return bool + */ + public function getAllowNewRegistrations() + { + return $this->container['allow_new_registrations']; + } + + /** + * Sets allow_new_registrations + * @param bool $allow_new_registrations If true, then new registrations can be created for this dispatch. + * @return $this + */ + public function setAllowNewRegistrations($allow_new_registrations) + { + $this->container['allow_new_registrations'] = $allow_new_registrations; + + return $this; + } + + /** + * Gets instanced + * @return bool + */ + public function getInstanced() + { + return $this->container['instanced']; + } + + /** + * Sets instanced + * @param bool $instanced If true, then a new registration instance will be created if the client LMS doesn't provide launch data for an existing one. Otherwise, the same instance will always be used for the given cmi.learner_id. + * @return $this + */ + public function setInstanced($instanced) + { + $this->container['instanced'] = $instanced; + + return $this; + } + + /** + * Gets registration_cap + * @return int + */ + public function getRegistrationCap() + { + return $this->container['registration_cap']; + } + + /** + * Sets registration_cap + * @param int $registration_cap The maximum number of registrations that can be created for this dispatch, where '0' means 'unlimited registrations'. + * @return $this + */ + public function setRegistrationCap($registration_cap) + { + $this->container['registration_cap'] = $registration_cap; + + return $this; + } + + /** + * Gets expiration_date + * @return \DateTime + */ + public function getExpirationDate() + { + return $this->container['expiration_date']; + } + + /** + * Sets expiration_date + * @param \DateTime $expiration_date The date after which this dispatch will be disabled as an ISO 8601 string, or not present for no expiration date. + * @return $this + */ + public function setExpirationDate($expiration_date) + { + $this->container['expiration_date'] = $expiration_date; + + return $this; + } + + /** + * Gets enabled + * @return bool + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * @param bool $enabled If true, then this dispatch can be launched. + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets tags + * @return string[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * @param string[] $tags The tags to associate with this Dispatch. + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets email + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * @param string $email SCORM Cloud user e-mail associated with this dispatch. If this is not provided, it will default to the owner of the Realm. + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets notes + * @return string + */ + public function getNotes() + { + return $this->container['notes']; + } + + /** + * Sets notes + * @param string $notes Any provided notes about this dispatch. + * @return $this + */ + public function setNotes($notes) + { + $this->container['notes'] = $notes; + + return $this; + } + + /** + * Gets post_back + * @return \RusticiSoftware\Cloud\V2\Model\PostBackSchema + */ + public function getPostBack() + { + return $this->container['post_back']; + } + + /** + * Sets post_back + * @param \RusticiSoftware\Cloud\V2\Model\PostBackSchema $post_back The postback information for this Dispatch. + * @return $this + */ + public function setPostBack($post_back) + { + $this->container['post_back'] = $post_back; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreatePrivateInvitationSchema.php b/src/Model/CreatePrivateInvitationSchema.php new file mode 100644 index 0000000..6c16d06 --- /dev/null +++ b/src/Model/CreatePrivateInvitationSchema.php @@ -0,0 +1,377 @@ + 'string', + 'creating_user_email' => 'string', + 'invitation_email' => '\RusticiSoftware\Cloud\V2\Model\InvitationEmailSchema', + 'post_back' => '\RusticiSoftware\Cloud\V2\Model\PostBackSchema', + 'expiration_date' => '\DateTime', + 'tags' => 'string[]' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'course_id' => 'courseId', + 'creating_user_email' => 'creatingUserEmail', + 'invitation_email' => 'invitationEmail', + 'post_back' => 'postBack', + 'expiration_date' => 'expirationDate', + 'tags' => 'tags' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'course_id' => 'setCourseId', + 'creating_user_email' => 'setCreatingUserEmail', + 'invitation_email' => 'setInvitationEmail', + 'post_back' => 'setPostBack', + 'expiration_date' => 'setExpirationDate', + 'tags' => 'setTags' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'course_id' => 'getCourseId', + 'creating_user_email' => 'getCreatingUserEmail', + 'invitation_email' => 'getInvitationEmail', + 'post_back' => 'getPostBack', + 'expiration_date' => 'getExpirationDate', + 'tags' => 'getTags' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['course_id'] = isset($data['course_id']) ? $data['course_id'] : null; + $this->container['creating_user_email'] = isset($data['creating_user_email']) ? $data['creating_user_email'] : null; + $this->container['invitation_email'] = isset($data['invitation_email']) ? $data['invitation_email'] : null; + $this->container['post_back'] = isset($data['post_back']) ? $data['post_back'] : null; + $this->container['expiration_date'] = isset($data['expiration_date']) ? $data['expiration_date'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['course_id'] === null) { + $invalid_properties[] = "'course_id' can't be null"; + } + if ($this->container['creating_user_email'] === null) { + $invalid_properties[] = "'creating_user_email' can't be null"; + } + if ($this->container['invitation_email'] === null) { + $invalid_properties[] = "'invitation_email' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['course_id'] === null) { + return false; + } + if ($this->container['creating_user_email'] === null) { + return false; + } + if ($this->container['invitation_email'] === null) { + return false; + } + return true; + } + + + /** + * Gets course_id + * @return string + */ + public function getCourseId() + { + return $this->container['course_id']; + } + + /** + * Sets course_id + * @param string $course_id The id of the course for which to create an invitation. + * @return $this + */ + public function setCourseId($course_id) + { + $this->container['course_id'] = $course_id; + + return $this; + } + + /** + * Gets creating_user_email + * @return string + */ + public function getCreatingUserEmail() + { + return $this->container['creating_user_email']; + } + + /** + * Sets creating_user_email + * @param string $creating_user_email The email of the user who is creating the invitation. + * @return $this + */ + public function setCreatingUserEmail($creating_user_email) + { + $this->container['creating_user_email'] = $creating_user_email; + + return $this; + } + + /** + * Gets invitation_email + * @return \RusticiSoftware\Cloud\V2\Model\InvitationEmailSchema + */ + public function getInvitationEmail() + { + return $this->container['invitation_email']; + } + + /** + * Sets invitation_email + * @param \RusticiSoftware\Cloud\V2\Model\InvitationEmailSchema $invitation_email + * @return $this + */ + public function setInvitationEmail($invitation_email) + { + $this->container['invitation_email'] = $invitation_email; + + return $this; + } + + /** + * Gets post_back + * @return \RusticiSoftware\Cloud\V2\Model\PostBackSchema + */ + public function getPostBack() + { + return $this->container['post_back']; + } + + /** + * Sets post_back + * @param \RusticiSoftware\Cloud\V2\Model\PostBackSchema $post_back Specifies a URL for which to post activity and status data in real time as the course is completed + * @return $this + */ + public function setPostBack($post_back) + { + $this->container['post_back'] = $post_back; + + return $this; + } + + /** + * Gets expiration_date + * @return \DateTime + */ + public function getExpirationDate() + { + return $this->container['expiration_date']; + } + + /** + * Sets expiration_date + * @param \DateTime $expiration_date The date this invitation will expire and can not be launched (formatted yyyyMMddHHmmss in UTC time). + * @return $this + */ + public function setExpirationDate($expiration_date) + { + $this->container['expiration_date'] = $expiration_date; + + return $this; + } + + /** + * Gets tags + * @return string[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * @param string[] $tags Optional tags to be applied to this invitation. + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreatePublicInvitationSchema.php b/src/Model/CreatePublicInvitationSchema.php new file mode 100644 index 0000000..cbffa2a --- /dev/null +++ b/src/Model/CreatePublicInvitationSchema.php @@ -0,0 +1,371 @@ + 'string', + 'creating_user_email' => 'string', + 'registration_cap' => 'int', + 'post_back' => '\RusticiSoftware\Cloud\V2\Model\PostBackSchema', + 'expiration_date' => '\DateTime', + 'tags' => 'string[]' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'course_id' => 'courseId', + 'creating_user_email' => 'creatingUserEmail', + 'registration_cap' => 'registrationCap', + 'post_back' => 'postBack', + 'expiration_date' => 'expirationDate', + 'tags' => 'tags' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'course_id' => 'setCourseId', + 'creating_user_email' => 'setCreatingUserEmail', + 'registration_cap' => 'setRegistrationCap', + 'post_back' => 'setPostBack', + 'expiration_date' => 'setExpirationDate', + 'tags' => 'setTags' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'course_id' => 'getCourseId', + 'creating_user_email' => 'getCreatingUserEmail', + 'registration_cap' => 'getRegistrationCap', + 'post_back' => 'getPostBack', + 'expiration_date' => 'getExpirationDate', + 'tags' => 'getTags' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['course_id'] = isset($data['course_id']) ? $data['course_id'] : null; + $this->container['creating_user_email'] = isset($data['creating_user_email']) ? $data['creating_user_email'] : null; + $this->container['registration_cap'] = isset($data['registration_cap']) ? $data['registration_cap'] : 0; + $this->container['post_back'] = isset($data['post_back']) ? $data['post_back'] : null; + $this->container['expiration_date'] = isset($data['expiration_date']) ? $data['expiration_date'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['course_id'] === null) { + $invalid_properties[] = "'course_id' can't be null"; + } + if ($this->container['creating_user_email'] === null) { + $invalid_properties[] = "'creating_user_email' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['course_id'] === null) { + return false; + } + if ($this->container['creating_user_email'] === null) { + return false; + } + return true; + } + + + /** + * Gets course_id + * @return string + */ + public function getCourseId() + { + return $this->container['course_id']; + } + + /** + * Sets course_id + * @param string $course_id The id of the course for which to create an invitation. + * @return $this + */ + public function setCourseId($course_id) + { + $this->container['course_id'] = $course_id; + + return $this; + } + + /** + * Gets creating_user_email + * @return string + */ + public function getCreatingUserEmail() + { + return $this->container['creating_user_email']; + } + + /** + * Sets creating_user_email + * @param string $creating_user_email The email of the user who is creating the invitation. + * @return $this + */ + public function setCreatingUserEmail($creating_user_email) + { + $this->container['creating_user_email'] = $creating_user_email; + + return $this; + } + + /** + * Gets registration_cap + * @return int + */ + public function getRegistrationCap() + { + return $this->container['registration_cap']; + } + + /** + * Sets registration_cap + * @param int $registration_cap Integer value that limits the amount of registrations a public invitation can generate. + * @return $this + */ + public function setRegistrationCap($registration_cap) + { + $this->container['registration_cap'] = $registration_cap; + + return $this; + } + + /** + * Gets post_back + * @return \RusticiSoftware\Cloud\V2\Model\PostBackSchema + */ + public function getPostBack() + { + return $this->container['post_back']; + } + + /** + * Sets post_back + * @param \RusticiSoftware\Cloud\V2\Model\PostBackSchema $post_back Specifies a URL for which to post activity and status data in real time as the course is completed + * @return $this + */ + public function setPostBack($post_back) + { + $this->container['post_back'] = $post_back; + + return $this; + } + + /** + * Gets expiration_date + * @return \DateTime + */ + public function getExpirationDate() + { + return $this->container['expiration_date']; + } + + /** + * Sets expiration_date + * @param \DateTime $expiration_date The date this invitation will expire and can no longer be launched (formatted yyyyMMddHHmmss in UTC time). + * @return $this + */ + public function setExpirationDate($expiration_date) + { + $this->container['expiration_date'] = $expiration_date; + + return $this; + } + + /** + * Gets tags + * @return string[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * @param string[] $tags Optional tags to be applied to this invitation. + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateRegistrationSchema.php b/src/Model/CreateRegistrationSchema.php index e5fd288..eb397f2 100644 --- a/src/Model/CreateRegistrationSchema.php +++ b/src/Model/CreateRegistrationSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/CredentialCreatedSchema.php b/src/Model/CredentialCreatedSchema.php index 1db3147..2452f3a 100644 --- a/src/Model/CredentialCreatedSchema.php +++ b/src/Model/CredentialCreatedSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/CredentialListSchema.php b/src/Model/CredentialListSchema.php index 2b18d24..08bee03 100644 --- a/src/Model/CredentialListSchema.php +++ b/src/Model/CredentialListSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/CredentialRequestSchema.php b/src/Model/CredentialRequestSchema.php index 8db8ff8..389d47e 100644 --- a/src/Model/CredentialRequestSchema.php +++ b/src/Model/CredentialRequestSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/CredentialSchema.php b/src/Model/CredentialSchema.php index 704b7af..54b0921 100644 --- a/src/Model/CredentialSchema.php +++ b/src/Model/CredentialSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/DestinationIdSchema.php b/src/Model/DestinationIdSchema.php new file mode 100644 index 0000000..8eef3e6 --- /dev/null +++ b/src/Model/DestinationIdSchema.php @@ -0,0 +1,255 @@ + 'string', + 'data' => '\RusticiSoftware\Cloud\V2\Model\DestinationSchema' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'data' => 'data' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'data' => 'setData' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'data' => 'getData' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets id + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param string $id + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets data + * @return \RusticiSoftware\Cloud\V2\Model\DestinationSchema + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * @param \RusticiSoftware\Cloud\V2\Model\DestinationSchema $data + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/DestinationListSchema.php b/src/Model/DestinationListSchema.php new file mode 100644 index 0000000..d6060ab --- /dev/null +++ b/src/Model/DestinationListSchema.php @@ -0,0 +1,255 @@ + '\RusticiSoftware\Cloud\V2\Model\DestinationIdSchema[]', + 'more' => 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'destinations' => 'destinations', + 'more' => 'more' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'destinations' => 'setDestinations', + 'more' => 'setMore' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'destinations' => 'getDestinations', + 'more' => 'getMore' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['destinations'] = isset($data['destinations']) ? $data['destinations'] : null; + $this->container['more'] = isset($data['more']) ? $data['more'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets destinations + * @return \RusticiSoftware\Cloud\V2\Model\DestinationIdSchema[] + */ + public function getDestinations() + { + return $this->container['destinations']; + } + + /** + * Sets destinations + * @param \RusticiSoftware\Cloud\V2\Model\DestinationIdSchema[] $destinations + * @return $this + */ + public function setDestinations($destinations) + { + $this->container['destinations'] = $destinations; + + return $this; + } + + /** + * Gets more + * @return string + */ + public function getMore() + { + return $this->container['more']; + } + + /** + * Sets more + * @param string $more + * @return $this + */ + public function setMore($more) + { + $this->container['more'] = $more; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/DestinationSchema.php b/src/Model/DestinationSchema.php new file mode 100644 index 0000000..27681ad --- /dev/null +++ b/src/Model/DestinationSchema.php @@ -0,0 +1,307 @@ + 'string', + 'tags' => 'string[]', + 'email' => 'string', + 'notes' => 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'tags' => 'tags', + 'email' => 'email', + 'notes' => 'notes' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'tags' => 'setTags', + 'email' => 'setEmail', + 'notes' => 'setNotes' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'tags' => 'getTags', + 'email' => 'getEmail', + 'notes' => 'getNotes' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['notes'] = isset($data['notes']) ? $data['notes'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets name + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * @param string $name The destination's name. + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets tags + * @return string[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * @param string[] $tags Optional array of tags. + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets email + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * @param string $email SCORM Cloud user e-mail associated with this destination. If this is not provided, it will default to the owner of the Realm. + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets notes + * @return string + */ + public function getNotes() + { + return $this->container['notes']; + } + + /** + * Sets notes + * @param string $notes Any provided notes about this Destination + * @return $this + */ + public function setNotes($notes) + { + $this->container['notes'] = $notes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/DispatchIdSchema.php b/src/Model/DispatchIdSchema.php new file mode 100644 index 0000000..f82adba --- /dev/null +++ b/src/Model/DispatchIdSchema.php @@ -0,0 +1,255 @@ + 'string', + 'data' => '\RusticiSoftware\Cloud\V2\Model\DispatchSchema' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'data' => 'data' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'data' => 'setData' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'data' => 'getData' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets id + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param string $id + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets data + * @return \RusticiSoftware\Cloud\V2\Model\DispatchSchema + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * @param \RusticiSoftware\Cloud\V2\Model\DispatchSchema $data + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/DispatchListSchema.php b/src/Model/DispatchListSchema.php new file mode 100644 index 0000000..8892b31 --- /dev/null +++ b/src/Model/DispatchListSchema.php @@ -0,0 +1,255 @@ + '\RusticiSoftware\Cloud\V2\Model\DispatchIdSchema[]', + 'more' => 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'dispatches' => 'dispatches', + 'more' => 'more' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'dispatches' => 'setDispatches', + 'more' => 'setMore' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'dispatches' => 'getDispatches', + 'more' => 'getMore' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['dispatches'] = isset($data['dispatches']) ? $data['dispatches'] : null; + $this->container['more'] = isset($data['more']) ? $data['more'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets dispatches + * @return \RusticiSoftware\Cloud\V2\Model\DispatchIdSchema[] + */ + public function getDispatches() + { + return $this->container['dispatches']; + } + + /** + * Sets dispatches + * @param \RusticiSoftware\Cloud\V2\Model\DispatchIdSchema[] $dispatches + * @return $this + */ + public function setDispatches($dispatches) + { + $this->container['dispatches'] = $dispatches; + + return $this; + } + + /** + * Gets more + * @return string + */ + public function getMore() + { + return $this->container['more']; + } + + /** + * Sets more + * @param string $more + * @return $this + */ + public function setMore($more) + { + $this->container['more'] = $more; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/DispatchRegistrationCountSchema.php b/src/Model/DispatchRegistrationCountSchema.php new file mode 100644 index 0000000..a88cc77 --- /dev/null +++ b/src/Model/DispatchRegistrationCountSchema.php @@ -0,0 +1,255 @@ + 'int', + 'last_reset_date' => '\DateTime' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'registration_count' => 'registrationCount', + 'last_reset_date' => 'lastResetDate' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'registration_count' => 'setRegistrationCount', + 'last_reset_date' => 'setLastResetDate' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'registration_count' => 'getRegistrationCount', + 'last_reset_date' => 'getLastResetDate' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['registration_count'] = isset($data['registration_count']) ? $data['registration_count'] : null; + $this->container['last_reset_date'] = isset($data['last_reset_date']) ? $data['last_reset_date'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets registration_count + * @return int + */ + public function getRegistrationCount() + { + return $this->container['registration_count']; + } + + /** + * Sets registration_count + * @param int $registration_count + * @return $this + */ + public function setRegistrationCount($registration_count) + { + $this->container['registration_count'] = $registration_count; + + return $this; + } + + /** + * Gets last_reset_date + * @return \DateTime + */ + public function getLastResetDate() + { + return $this->container['last_reset_date']; + } + + /** + * Sets last_reset_date + * @param \DateTime $last_reset_date + * @return $this + */ + public function setLastResetDate($last_reset_date) + { + $this->container['last_reset_date'] = $last_reset_date; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/DispatchSchema.php b/src/Model/DispatchSchema.php new file mode 100644 index 0000000..4b51d46 --- /dev/null +++ b/src/Model/DispatchSchema.php @@ -0,0 +1,489 @@ + 'string', + 'course_id' => 'string', + 'allow_new_registrations' => 'bool', + 'enabled' => 'bool', + 'instanced' => 'bool', + 'registration_cap' => 'int', + 'registration_count' => 'int', + 'expiration_date' => '\DateTime', + 'tags' => 'string[]', + 'email' => 'string', + 'notes' => 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'destination_id' => 'destinationId', + 'course_id' => 'courseId', + 'allow_new_registrations' => 'allowNewRegistrations', + 'enabled' => 'enabled', + 'instanced' => 'instanced', + 'registration_cap' => 'registrationCap', + 'registration_count' => 'registrationCount', + 'expiration_date' => 'expirationDate', + 'tags' => 'tags', + 'email' => 'email', + 'notes' => 'notes' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'destination_id' => 'setDestinationId', + 'course_id' => 'setCourseId', + 'allow_new_registrations' => 'setAllowNewRegistrations', + 'enabled' => 'setEnabled', + 'instanced' => 'setInstanced', + 'registration_cap' => 'setRegistrationCap', + 'registration_count' => 'setRegistrationCount', + 'expiration_date' => 'setExpirationDate', + 'tags' => 'setTags', + 'email' => 'setEmail', + 'notes' => 'setNotes' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'destination_id' => 'getDestinationId', + 'course_id' => 'getCourseId', + 'allow_new_registrations' => 'getAllowNewRegistrations', + 'enabled' => 'getEnabled', + 'instanced' => 'getInstanced', + 'registration_cap' => 'getRegistrationCap', + 'registration_count' => 'getRegistrationCount', + 'expiration_date' => 'getExpirationDate', + 'tags' => 'getTags', + 'email' => 'getEmail', + 'notes' => 'getNotes' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['destination_id'] = isset($data['destination_id']) ? $data['destination_id'] : null; + $this->container['course_id'] = isset($data['course_id']) ? $data['course_id'] : null; + $this->container['allow_new_registrations'] = isset($data['allow_new_registrations']) ? $data['allow_new_registrations'] : null; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['instanced'] = isset($data['instanced']) ? $data['instanced'] : null; + $this->container['registration_cap'] = isset($data['registration_cap']) ? $data['registration_cap'] : null; + $this->container['registration_count'] = isset($data['registration_count']) ? $data['registration_count'] : null; + $this->container['expiration_date'] = isset($data['expiration_date']) ? $data['expiration_date'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['notes'] = isset($data['notes']) ? $data['notes'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets destination_id + * @return string + */ + public function getDestinationId() + { + return $this->container['destination_id']; + } + + /** + * Sets destination_id + * @param string $destination_id Destination ID. + * @return $this + */ + public function setDestinationId($destination_id) + { + $this->container['destination_id'] = $destination_id; + + return $this; + } + + /** + * Gets course_id + * @return string + */ + public function getCourseId() + { + return $this->container['course_id']; + } + + /** + * Sets course_id + * @param string $course_id Serialized external package ID. + * @return $this + */ + public function setCourseId($course_id) + { + $this->container['course_id'] = $course_id; + + return $this; + } + + /** + * Gets allow_new_registrations + * @return bool + */ + public function getAllowNewRegistrations() + { + return $this->container['allow_new_registrations']; + } + + /** + * Sets allow_new_registrations + * @param bool $allow_new_registrations If true, then new registrations can be created for this dispatch. + * @return $this + */ + public function setAllowNewRegistrations($allow_new_registrations) + { + $this->container['allow_new_registrations'] = $allow_new_registrations; + + return $this; + } + + /** + * Gets enabled + * @return bool + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * @param bool $enabled If false, the dispatch can not be launched. + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets instanced + * @return bool + */ + public function getInstanced() + { + return $this->container['instanced']; + } + + /** + * Sets instanced + * @param bool $instanced If true, then a new registration instance will be created if the client LMS doesn't provide launch data for an existing one. Otherwise, the same instance will always be used for the given cmi.learner_id. + * @return $this + */ + public function setInstanced($instanced) + { + $this->container['instanced'] = $instanced; + + return $this; + } + + /** + * Gets registration_cap + * @return int + */ + public function getRegistrationCap() + { + return $this->container['registration_cap']; + } + + /** + * Sets registration_cap + * @param int $registration_cap The maximum number of registrations that can be created for this dispatch, where '0' means 'unlimited registrations'. + * @return $this + */ + public function setRegistrationCap($registration_cap) + { + $this->container['registration_cap'] = $registration_cap; + + return $this; + } + + /** + * Gets registration_count + * @return int + */ + public function getRegistrationCount() + { + return $this->container['registration_count']; + } + + /** + * Sets registration_count + * @param int $registration_count The current number of registrations that have been created for this dispatch. + * @return $this + */ + public function setRegistrationCount($registration_count) + { + $this->container['registration_count'] = $registration_count; + + return $this; + } + + /** + * Gets expiration_date + * @return \DateTime + */ + public function getExpirationDate() + { + return $this->container['expiration_date']; + } + + /** + * Sets expiration_date + * @param \DateTime $expiration_date The date after which this dispatch will be disabled as an ISO 8601 string, or 'none' for no expiration date. + * @return $this + */ + public function setExpirationDate($expiration_date) + { + $this->container['expiration_date'] = $expiration_date; + + return $this; + } + + /** + * Gets tags + * @return string[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * @param string[] $tags The tags to associate with this Dispatch. + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets email + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * @param string $email SCORM Cloud user e-mail associated with this dispatch. If this is not provided, it will default to the owner of the Realm. + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets notes + * @return string + */ + public function getNotes() + { + return $this->container['notes']; + } + + /** + * Sets notes + * @param string $notes Any provided notes about this dispatch. + * @return $this + */ + public function setNotes($notes) + { + $this->container['notes'] = $notes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/EnabledSchema.php b/src/Model/EnabledSchema.php new file mode 100644 index 0000000..248df82 --- /dev/null +++ b/src/Model/EnabledSchema.php @@ -0,0 +1,229 @@ + 'bool' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'enabled' => 'enabled' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'enabled' => 'setEnabled' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'enabled' => 'getEnabled' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets enabled + * @return bool + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * @param bool $enabled + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ImportFetchRequestSchema.php b/src/Model/ImportFetchRequestSchema.php index 6ea8e69..a3ba547 100644 --- a/src/Model/ImportFetchRequestSchema.php +++ b/src/Model/ImportFetchRequestSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/ImportJobResultSchema.php b/src/Model/ImportJobResultSchema.php index df6d691..f8c5a13 100644 --- a/src/Model/ImportJobResultSchema.php +++ b/src/Model/ImportJobResultSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/ImportResultSchema.php b/src/Model/ImportResultSchema.php index 37116b6..5be7075 100644 --- a/src/Model/ImportResultSchema.php +++ b/src/Model/ImportResultSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/IntegerResultSchema.php b/src/Model/IntegerResultSchema.php index a55dbac..e09f5c9 100644 --- a/src/Model/IntegerResultSchema.php +++ b/src/Model/IntegerResultSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/InvitationEmailSchema.php b/src/Model/InvitationEmailSchema.php new file mode 100644 index 0000000..20d4b00 --- /dev/null +++ b/src/Model/InvitationEmailSchema.php @@ -0,0 +1,288 @@ + 'string', + 'body' => 'string', + 'addresses' => 'string[]' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'subject' => 'subject', + 'body' => 'body', + 'addresses' => 'addresses' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'subject' => 'setSubject', + 'body' => 'setBody', + 'addresses' => 'setAddresses' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'subject' => 'getSubject', + 'body' => 'getBody', + 'addresses' => 'getAddresses' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['subject'] = isset($data['subject']) ? $data['subject'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + $this->container['addresses'] = isset($data['addresses']) ? $data['addresses'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['addresses'] === null) { + $invalid_properties[] = "'addresses' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['addresses'] === null) { + return false; + } + return true; + } + + + /** + * Gets subject + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * @param string $subject The subject line for the email. + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets body + * @return string + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * @param string $body The body of the email. + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + + return $this; + } + + /** + * Gets addresses + * @return string[] + */ + public function getAddresses() + { + return $this->container['addresses']; + } + + /** + * Sets addresses + * @param string[] $addresses A comma separated list of email addresses to which this invitation will be sent. NOTE: registrations with automatically be create for each of these e-mail addresses. + * @return $this + */ + public function setAddresses($addresses) + { + $this->container['addresses'] = $addresses; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/InvitationJobStatusSchema.php b/src/Model/InvitationJobStatusSchema.php new file mode 100644 index 0000000..722ddcd --- /dev/null +++ b/src/Model/InvitationJobStatusSchema.php @@ -0,0 +1,338 @@ + 'string', + 'errors' => 'string[]', + 'total' => 'int', + 'processed' => 'int' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'errors' => 'errors', + 'total' => 'total', + 'processed' => 'processed' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'errors' => 'setErrors', + 'total' => 'setTotal', + 'processed' => 'setProcessed' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'errors' => 'getErrors', + 'total' => 'getTotal', + 'processed' => 'getProcessed' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + const STATUS_STARTED = 'STARTED'; + const STATUS_CANCELLED = 'CANCELLED'; + const STATUS_COMPLETE = 'COMPLETE'; + const STATUS_ERROR = 'ERROR'; + + + + /** + * Gets allowable values of the enum + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_STARTED, + self::STATUS_CANCELLED, + self::STATUS_COMPLETE, + self::STATUS_ERROR, + ]; + } + + + /** + * 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->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['errors'] = isset($data['errors']) ? $data['errors'] : null; + $this->container['total'] = isset($data['total']) ? $data['total'] : null; + $this->container['processed'] = isset($data['processed']) ? $data['processed'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + $allowed_values = ["STARTED", "CANCELLED", "COMPLETE", "ERROR"]; + if (!in_array($this->container['status'], $allowed_values)) { + $invalid_properties[] = "invalid value for 'status', must be one of 'STARTED', 'CANCELLED', 'COMPLETE', 'ERROR'."; + } + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + $allowed_values = ["STARTED", "CANCELLED", "COMPLETE", "ERROR"]; + if (!in_array($this->container['status'], $allowed_values)) { + return false; + } + return true; + } + + + /** + * Gets status + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * @param string $status The status of the job. + * @return $this + */ + public function setStatus($status) + { + $allowed_values = array('STARTED', 'CANCELLED', 'COMPLETE', 'ERROR'); + if (!is_null($status) && (!in_array($status, $allowed_values))) { + throw new \InvalidArgumentException("Invalid value for 'status', must be one of 'STARTED', 'CANCELLED', 'COMPLETE', 'ERROR'"); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets errors + * @return string[] + */ + public function getErrors() + { + return $this->container['errors']; + } + + /** + * Sets errors + * @param string[] $errors An array containing any errors which occurred. + * @return $this + */ + public function setErrors($errors) + { + $this->container['errors'] = $errors; + + return $this; + } + + /** + * Gets total + * @return int + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * @param int $total The total number of private invitations to be sent. + * @return $this + */ + public function setTotal($total) + { + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets processed + * @return int + */ + public function getProcessed() + { + return $this->container['processed']; + } + + /** + * Sets processed + * @param int $processed The number of private invitations which have been sent. + * @return $this + */ + public function setProcessed($processed) + { + $this->container['processed'] = $processed; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/InvitationSummaryList.php b/src/Model/InvitationSummaryList.php new file mode 100644 index 0000000..acce102 --- /dev/null +++ b/src/Model/InvitationSummaryList.php @@ -0,0 +1,255 @@ + '\RusticiSoftware\Cloud\V2\Model\InvitationSummarySchema[]', + 'more' => 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'invitations' => 'invitations', + 'more' => 'more' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'invitations' => 'setInvitations', + 'more' => 'setMore' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'invitations' => 'getInvitations', + 'more' => 'getMore' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['invitations'] = isset($data['invitations']) ? $data['invitations'] : null; + $this->container['more'] = isset($data['more']) ? $data['more'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets invitations + * @return \RusticiSoftware\Cloud\V2\Model\InvitationSummarySchema[] + */ + public function getInvitations() + { + return $this->container['invitations']; + } + + /** + * Sets invitations + * @param \RusticiSoftware\Cloud\V2\Model\InvitationSummarySchema[] $invitations A list of invitation overview objects. + * @return $this + */ + public function setInvitations($invitations) + { + $this->container['invitations'] = $invitations; + + return $this; + } + + /** + * Gets more + * @return string + */ + public function getMore() + { + return $this->container['more']; + } + + /** + * Sets more + * @param string $more + * @return $this + */ + public function setMore($more) + { + $this->container['more'] = $more; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/InvitationSummarySchema.php b/src/Model/InvitationSummarySchema.php new file mode 100644 index 0000000..6a827cd --- /dev/null +++ b/src/Model/InvitationSummarySchema.php @@ -0,0 +1,333 @@ + 'string', + 'course_id' => 'string', + 'is_public' => 'bool', + 'create_date' => '\DateTime', + 'updated' => '\DateTime' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'course_id' => 'courseId', + 'is_public' => 'isPublic', + 'create_date' => 'createDate', + 'updated' => 'updated' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'course_id' => 'setCourseId', + 'is_public' => 'setIsPublic', + 'create_date' => 'setCreateDate', + 'updated' => 'setUpdated' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'course_id' => 'getCourseId', + 'is_public' => 'getIsPublic', + 'create_date' => 'getCreateDate', + 'updated' => 'getUpdated' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['course_id'] = isset($data['course_id']) ? $data['course_id'] : null; + $this->container['is_public'] = isset($data['is_public']) ? $data['is_public'] : null; + $this->container['create_date'] = isset($data['create_date']) ? $data['create_date'] : null; + $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets id + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param string $id The invitationId for this invitation. + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets course_id + * @return string + */ + public function getCourseId() + { + return $this->container['course_id']; + } + + /** + * Sets course_id + * @param string $course_id Course Id for this Invitation. + * @return $this + */ + public function setCourseId($course_id) + { + $this->container['course_id'] = $course_id; + + return $this; + } + + /** + * Gets is_public + * @return bool + */ + public function getIsPublic() + { + return $this->container['is_public']; + } + + /** + * Sets is_public + * @param bool $is_public Is the invitation Public or Private + * @return $this + */ + public function setIsPublic($is_public) + { + $this->container['is_public'] = $is_public; + + return $this; + } + + /** + * Gets create_date + * @return \DateTime + */ + public function getCreateDate() + { + return $this->container['create_date']; + } + + /** + * Sets create_date + * @param \DateTime $create_date The create date for the invitation + * @return $this + */ + public function setCreateDate($create_date) + { + $this->container['create_date'] = $create_date; + + return $this; + } + + /** + * Gets updated + * @return \DateTime + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * @param \DateTime $updated + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ItemValuePairSchema.php b/src/Model/ItemValuePairSchema.php index dd391d0..6a0dd8a 100644 --- a/src/Model/ItemValuePairSchema.php +++ b/src/Model/ItemValuePairSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/LaunchHistoryListSchema.php b/src/Model/LaunchHistoryListSchema.php index 991ed4b..4219e00 100644 --- a/src/Model/LaunchHistoryListSchema.php +++ b/src/Model/LaunchHistoryListSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/LaunchHistorySchema.php b/src/Model/LaunchHistorySchema.php index 7342fd7..6bd59fc 100644 --- a/src/Model/LaunchHistorySchema.php +++ b/src/Model/LaunchHistorySchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/LaunchLinkRequestSchema.php b/src/Model/LaunchLinkRequestSchema.php index 7119851..1f8a19b 100644 --- a/src/Model/LaunchLinkRequestSchema.php +++ b/src/Model/LaunchLinkRequestSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/LaunchLinkSchema.php b/src/Model/LaunchLinkSchema.php index a491241..8f02644 100644 --- a/src/Model/LaunchLinkSchema.php +++ b/src/Model/LaunchLinkSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/LearnerPreferenceSchema.php b/src/Model/LearnerPreferenceSchema.php index 1c662d2..e33be0a 100644 --- a/src/Model/LearnerPreferenceSchema.php +++ b/src/Model/LearnerPreferenceSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/LearnerSchema.php b/src/Model/LearnerSchema.php index 2850591..f2a9d7c 100644 --- a/src/Model/LearnerSchema.php +++ b/src/Model/LearnerSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/MessageSchema.php b/src/Model/MessageSchema.php index 8f3a0b6..4fff95c 100644 --- a/src/Model/MessageSchema.php +++ b/src/Model/MessageSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/MetadataSchema.php b/src/Model/MetadataSchema.php index a899bb0..07b91d9 100644 --- a/src/Model/MetadataSchema.php +++ b/src/Model/MetadataSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/ObjectiveSchema.php b/src/Model/ObjectiveSchema.php index 11b1700..d63cb82 100644 --- a/src/Model/ObjectiveSchema.php +++ b/src/Model/ObjectiveSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/PermissionsSchema.php b/src/Model/PermissionsSchema.php index ae227e3..3df6519 100644 --- a/src/Model/PermissionsSchema.php +++ b/src/Model/PermissionsSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/PingSchema.php b/src/Model/PingSchema.php index 98a82f4..f2ad8c3 100644 --- a/src/Model/PingSchema.php +++ b/src/Model/PingSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/PostBackSchema.php b/src/Model/PostBackSchema.php index 376af9e..a7fca2e 100644 --- a/src/Model/PostBackSchema.php +++ b/src/Model/PostBackSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -58,7 +58,8 @@ class PostBackSchema implements ArrayAccess 'auth_type' => 'string', 'user_name' => 'string', 'password' => 'string', - 'results_format' => 'string' + 'results_format' => 'string', + 'legacy' => 'bool' ]; public static function swaggerTypes() @@ -75,7 +76,8 @@ public static function swaggerTypes() 'auth_type' => 'authType', 'user_name' => 'userName', 'password' => 'password', - 'results_format' => 'resultsFormat' + 'results_format' => 'resultsFormat', + 'legacy' => 'legacy' ]; @@ -88,7 +90,8 @@ public static function swaggerTypes() 'auth_type' => 'setAuthType', 'user_name' => 'setUserName', 'password' => 'setPassword', - 'results_format' => 'setResultsFormat' + 'results_format' => 'setResultsFormat', + 'legacy' => 'setLegacy' ]; @@ -101,7 +104,8 @@ public static function swaggerTypes() 'auth_type' => 'getAuthType', 'user_name' => 'getUserName', 'password' => 'getPassword', - 'results_format' => 'getResultsFormat' + 'results_format' => 'getResultsFormat', + 'legacy' => 'getLegacy' ]; public static function attributeMap() @@ -122,6 +126,7 @@ public static function getters() const AUTH_TYPE_UNDEFINED = 'UNDEFINED'; const AUTH_TYPE_FORM = 'FORM'; const AUTH_TYPE_HTTPBASIC = 'HTTPBASIC'; + const RESULTS_FORMAT_UNDEFINED = 'UNDEFINED'; const RESULTS_FORMAT_COURSE = 'COURSE'; const RESULTS_FORMAT_ACTIVITY = 'ACTIVITY'; const RESULTS_FORMAT_FULL = 'FULL'; @@ -148,6 +153,7 @@ public function getAuthTypeAllowableValues() public function getResultsFormatAllowableValues() { return [ + self::RESULTS_FORMAT_UNDEFINED, self::RESULTS_FORMAT_COURSE, self::RESULTS_FORMAT_ACTIVITY, self::RESULTS_FORMAT_FULL, @@ -171,7 +177,8 @@ public function __construct(array $data = null) $this->container['auth_type'] = isset($data['auth_type']) ? $data['auth_type'] : 'UNDEFINED'; $this->container['user_name'] = isset($data['user_name']) ? $data['user_name'] : null; $this->container['password'] = isset($data['password']) ? $data['password'] : null; - $this->container['results_format'] = isset($data['results_format']) ? $data['results_format'] : 'COURSE'; + $this->container['results_format'] = isset($data['results_format']) ? $data['results_format'] : 'UNDEFINED'; + $this->container['legacy'] = isset($data['legacy']) ? $data['legacy'] : null; } /** @@ -188,9 +195,9 @@ public function listInvalidProperties() $invalid_properties[] = "invalid value for 'auth_type', must be one of 'UNDEFINED', 'FORM', 'HTTPBASIC'."; } - $allowed_values = ["COURSE", "ACTIVITY", "FULL"]; + $allowed_values = ["UNDEFINED", "COURSE", "ACTIVITY", "FULL"]; if (!in_array($this->container['results_format'], $allowed_values)) { - $invalid_properties[] = "invalid value for 'results_format', must be one of 'COURSE', 'ACTIVITY', 'FULL'."; + $invalid_properties[] = "invalid value for 'results_format', must be one of 'UNDEFINED', 'COURSE', 'ACTIVITY', 'FULL'."; } return $invalid_properties; @@ -209,7 +216,7 @@ public function valid() if (!in_array($this->container['auth_type'], $allowed_values)) { return false; } - $allowed_values = ["COURSE", "ACTIVITY", "FULL"]; + $allowed_values = ["UNDEFINED", "COURSE", "ACTIVITY", "FULL"]; if (!in_array($this->container['results_format'], $allowed_values)) { return false; } @@ -321,14 +328,35 @@ public function getResultsFormat() */ public function setResultsFormat($results_format) { - $allowed_values = array('COURSE', 'ACTIVITY', 'FULL'); + $allowed_values = array('UNDEFINED', 'COURSE', 'ACTIVITY', 'FULL'); if (!is_null($results_format) && (!in_array($results_format, $allowed_values))) { - throw new \InvalidArgumentException("Invalid value for 'results_format', must be one of 'COURSE', 'ACTIVITY', 'FULL'"); + throw new \InvalidArgumentException("Invalid value for 'results_format', must be one of 'UNDEFINED', 'COURSE', 'ACTIVITY', 'FULL'"); } $this->container['results_format'] = $results_format; return $this; } + + /** + * Gets legacy + * @return bool + */ + public function getLegacy() + { + return $this->container['legacy']; + } + + /** + * Sets legacy + * @param bool $legacy This paramenter is ONLY used for backwards compatibility with XML postback implementations. You probably shouldn't need to use this unless you're currently transitioning from the V1 api to the V2 api and already have existing XML postback logic in your application, but have not yet built out JSON postback logic. If a registration is created with the V2 api we will assume that you're expecting JSON results unless otherwise specified. + * @return $this + */ + public function setLegacy($legacy) + { + $this->container['legacy'] = $legacy; + + return $this; + } /** * Returns true if offset exists. False otherwise. * @param integer $offset Offset diff --git a/src/Model/PrivateInvitationList.php b/src/Model/PrivateInvitationList.php new file mode 100644 index 0000000..bf60857 --- /dev/null +++ b/src/Model/PrivateInvitationList.php @@ -0,0 +1,255 @@ + '\RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema[]', + 'more' => 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'invitations' => 'invitations', + 'more' => 'more' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'invitations' => 'setInvitations', + 'more' => 'setMore' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'invitations' => 'getInvitations', + 'more' => 'getMore' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['invitations'] = isset($data['invitations']) ? $data['invitations'] : null; + $this->container['more'] = isset($data['more']) ? $data['more'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets invitations + * @return \RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema[] + */ + public function getInvitations() + { + return $this->container['invitations']; + } + + /** + * Sets invitations + * @param \RusticiSoftware\Cloud\V2\Model\PrivateInvitationSchema[] $invitations A list of private invitation objects. + * @return $this + */ + public function setInvitations($invitations) + { + $this->container['invitations'] = $invitations; + + return $this; + } + + /** + * Gets more + * @return string + */ + public function getMore() + { + return $this->container['more']; + } + + /** + * Sets more + * @param string $more + * @return $this + */ + public function setMore($more) + { + $this->container['more'] = $more; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/PrivateInvitationSchema.php b/src/Model/PrivateInvitationSchema.php new file mode 100644 index 0000000..b737364 --- /dev/null +++ b/src/Model/PrivateInvitationSchema.php @@ -0,0 +1,437 @@ + 'string', + 'course_id' => 'string', + 'allow_launch' => 'bool', + 'invitation_email' => '\RusticiSoftware\Cloud\V2\Model\InvitationEmailSchema', + 'create_date' => '\DateTime', + 'updated' => '\DateTime', + 'post_back' => '\RusticiSoftware\Cloud\V2\Model\PostBackSchema', + 'expiration_date' => '\DateTime', + 'registration_count' => 'int' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'course_id' => 'courseId', + 'allow_launch' => 'allowLaunch', + 'invitation_email' => 'invitationEmail', + 'create_date' => 'createDate', + 'updated' => 'updated', + 'post_back' => 'postBack', + 'expiration_date' => 'expirationDate', + 'registration_count' => 'registrationCount' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'course_id' => 'setCourseId', + 'allow_launch' => 'setAllowLaunch', + 'invitation_email' => 'setInvitationEmail', + 'create_date' => 'setCreateDate', + 'updated' => 'setUpdated', + 'post_back' => 'setPostBack', + 'expiration_date' => 'setExpirationDate', + 'registration_count' => 'setRegistrationCount' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'course_id' => 'getCourseId', + 'allow_launch' => 'getAllowLaunch', + 'invitation_email' => 'getInvitationEmail', + 'create_date' => 'getCreateDate', + 'updated' => 'getUpdated', + 'post_back' => 'getPostBack', + 'expiration_date' => 'getExpirationDate', + 'registration_count' => 'getRegistrationCount' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['course_id'] = isset($data['course_id']) ? $data['course_id'] : null; + $this->container['allow_launch'] = isset($data['allow_launch']) ? $data['allow_launch'] : null; + $this->container['invitation_email'] = isset($data['invitation_email']) ? $data['invitation_email'] : null; + $this->container['create_date'] = isset($data['create_date']) ? $data['create_date'] : null; + $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; + $this->container['post_back'] = isset($data['post_back']) ? $data['post_back'] : null; + $this->container['expiration_date'] = isset($data['expiration_date']) ? $data['expiration_date'] : null; + $this->container['registration_count'] = isset($data['registration_count']) ? $data['registration_count'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets id + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param string $id The invitationId for this invitation. + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets course_id + * @return string + */ + public function getCourseId() + { + return $this->container['course_id']; + } + + /** + * Sets course_id + * @param string $course_id Course Id for this Invitation. + * @return $this + */ + public function setCourseId($course_id) + { + $this->container['course_id'] = $course_id; + + return $this; + } + + /** + * Gets allow_launch + * @return bool + */ + public function getAllowLaunch() + { + return $this->container['allow_launch']; + } + + /** + * Sets allow_launch + * @param bool $allow_launch If true, then new registrations can be created for this dispatch. + * @return $this + */ + public function setAllowLaunch($allow_launch) + { + $this->container['allow_launch'] = $allow_launch; + + return $this; + } + + /** + * Gets invitation_email + * @return \RusticiSoftware\Cloud\V2\Model\InvitationEmailSchema + */ + public function getInvitationEmail() + { + return $this->container['invitation_email']; + } + + /** + * Sets invitation_email + * @param \RusticiSoftware\Cloud\V2\Model\InvitationEmailSchema $invitation_email + * @return $this + */ + public function setInvitationEmail($invitation_email) + { + $this->container['invitation_email'] = $invitation_email; + + return $this; + } + + /** + * Gets create_date + * @return \DateTime + */ + public function getCreateDate() + { + return $this->container['create_date']; + } + + /** + * Sets create_date + * @param \DateTime $create_date The create date for the invitation + * @return $this + */ + public function setCreateDate($create_date) + { + $this->container['create_date'] = $create_date; + + return $this; + } + + /** + * Gets updated + * @return \DateTime + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * @param \DateTime $updated + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets post_back + * @return \RusticiSoftware\Cloud\V2\Model\PostBackSchema + */ + public function getPostBack() + { + return $this->container['post_back']; + } + + /** + * Sets post_back + * @param \RusticiSoftware\Cloud\V2\Model\PostBackSchema $post_back Specifies a URL for which to post activity and status data in real time as the course is completed + * @return $this + */ + public function setPostBack($post_back) + { + $this->container['post_back'] = $post_back; + + return $this; + } + + /** + * Gets expiration_date + * @return \DateTime + */ + public function getExpirationDate() + { + return $this->container['expiration_date']; + } + + /** + * Sets expiration_date + * @param \DateTime $expiration_date The date this invitation will expire and can not be launched (formatted yyyyMMddHHmmss in UTC time). + * @return $this + */ + public function setExpirationDate($expiration_date) + { + $this->container['expiration_date'] = $expiration_date; + + return $this; + } + + /** + * Gets registration_count + * @return int + */ + public function getRegistrationCount() + { + return $this->container['registration_count']; + } + + /** + * Sets registration_count + * @param int $registration_count The count of registrations for this invitation + * @return $this + */ + public function setRegistrationCount($registration_count) + { + $this->container['registration_count'] = $registration_count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/PublicInvitationList.php b/src/Model/PublicInvitationList.php new file mode 100644 index 0000000..f405333 --- /dev/null +++ b/src/Model/PublicInvitationList.php @@ -0,0 +1,255 @@ + '\RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema[]', + 'more' => 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'invitations' => 'invitations', + 'more' => 'more' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'invitations' => 'setInvitations', + 'more' => 'setMore' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'invitations' => 'getInvitations', + 'more' => 'getMore' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['invitations'] = isset($data['invitations']) ? $data['invitations'] : null; + $this->container['more'] = isset($data['more']) ? $data['more'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets invitations + * @return \RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema[] + */ + public function getInvitations() + { + return $this->container['invitations']; + } + + /** + * Sets invitations + * @param \RusticiSoftware\Cloud\V2\Model\PublicInvitationSchema[] $invitations A list of public invitation objects. + * @return $this + */ + public function setInvitations($invitations) + { + $this->container['invitations'] = $invitations; + + return $this; + } + + /** + * Gets more + * @return string + */ + public function getMore() + { + return $this->container['more']; + } + + /** + * Sets more + * @param string $more + * @return $this + */ + public function setMore($more) + { + $this->container['more'] = $more; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/PublicInvitationSchema.php b/src/Model/PublicInvitationSchema.php new file mode 100644 index 0000000..cfd6e8e --- /dev/null +++ b/src/Model/PublicInvitationSchema.php @@ -0,0 +1,489 @@ + 'string', + 'course_id' => 'string', + 'allow_launch' => 'bool', + 'allow_new_registrations' => 'bool', + 'url' => 'string', + 'create_date' => '\DateTime', + 'updated' => '\DateTime', + 'post_back' => '\RusticiSoftware\Cloud\V2\Model\PostBackSchema', + 'expiration_date' => '\DateTime', + 'registration_cap' => 'int', + 'registration_count' => 'int' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'course_id' => 'courseId', + 'allow_launch' => 'allowLaunch', + 'allow_new_registrations' => 'allowNewRegistrations', + 'url' => 'url', + 'create_date' => 'createDate', + 'updated' => 'updated', + 'post_back' => 'postBack', + 'expiration_date' => 'expirationDate', + 'registration_cap' => 'registrationCap', + 'registration_count' => 'registrationCount' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'course_id' => 'setCourseId', + 'allow_launch' => 'setAllowLaunch', + 'allow_new_registrations' => 'setAllowNewRegistrations', + 'url' => 'setUrl', + 'create_date' => 'setCreateDate', + 'updated' => 'setUpdated', + 'post_back' => 'setPostBack', + 'expiration_date' => 'setExpirationDate', + 'registration_cap' => 'setRegistrationCap', + 'registration_count' => 'setRegistrationCount' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'course_id' => 'getCourseId', + 'allow_launch' => 'getAllowLaunch', + 'allow_new_registrations' => 'getAllowNewRegistrations', + 'url' => 'getUrl', + 'create_date' => 'getCreateDate', + 'updated' => 'getUpdated', + 'post_back' => 'getPostBack', + 'expiration_date' => 'getExpirationDate', + 'registration_cap' => 'getRegistrationCap', + 'registration_count' => 'getRegistrationCount' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['course_id'] = isset($data['course_id']) ? $data['course_id'] : null; + $this->container['allow_launch'] = isset($data['allow_launch']) ? $data['allow_launch'] : null; + $this->container['allow_new_registrations'] = isset($data['allow_new_registrations']) ? $data['allow_new_registrations'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['create_date'] = isset($data['create_date']) ? $data['create_date'] : null; + $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; + $this->container['post_back'] = isset($data['post_back']) ? $data['post_back'] : null; + $this->container['expiration_date'] = isset($data['expiration_date']) ? $data['expiration_date'] : null; + $this->container['registration_cap'] = isset($data['registration_cap']) ? $data['registration_cap'] : 0; + $this->container['registration_count'] = isset($data['registration_count']) ? $data['registration_count'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets id + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param string $id The invitationId for this invitation. + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets course_id + * @return string + */ + public function getCourseId() + { + return $this->container['course_id']; + } + + /** + * Sets course_id + * @param string $course_id Course Id for this Invitation. + * @return $this + */ + public function setCourseId($course_id) + { + $this->container['course_id'] = $course_id; + + return $this; + } + + /** + * Gets allow_launch + * @return bool + */ + public function getAllowLaunch() + { + return $this->container['allow_launch']; + } + + /** + * Sets allow_launch + * @param bool $allow_launch If true, then new registrations can be created for this dispatch. + * @return $this + */ + public function setAllowLaunch($allow_launch) + { + $this->container['allow_launch'] = $allow_launch; + + return $this; + } + + /** + * Gets allow_new_registrations + * @return bool + */ + public function getAllowNewRegistrations() + { + return $this->container['allow_new_registrations']; + } + + /** + * Sets allow_new_registrations + * @param bool $allow_new_registrations If true, then new registrations can be created for this dispatch. + * @return $this + */ + public function setAllowNewRegistrations($allow_new_registrations) + { + $this->container['allow_new_registrations'] = $allow_new_registrations; + + return $this; + } + + /** + * Gets url + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * @param string $url The launch URL for the invitation + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets create_date + * @return \DateTime + */ + public function getCreateDate() + { + return $this->container['create_date']; + } + + /** + * Sets create_date + * @param \DateTime $create_date The create date for the invitation + * @return $this + */ + public function setCreateDate($create_date) + { + $this->container['create_date'] = $create_date; + + return $this; + } + + /** + * Gets updated + * @return \DateTime + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * @param \DateTime $updated + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets post_back + * @return \RusticiSoftware\Cloud\V2\Model\PostBackSchema + */ + public function getPostBack() + { + return $this->container['post_back']; + } + + /** + * Sets post_back + * @param \RusticiSoftware\Cloud\V2\Model\PostBackSchema $post_back Specifies a URL for which to post activity and status data in real time as the course is completed + * @return $this + */ + public function setPostBack($post_back) + { + $this->container['post_back'] = $post_back; + + return $this; + } + + /** + * Gets expiration_date + * @return \DateTime + */ + public function getExpirationDate() + { + return $this->container['expiration_date']; + } + + /** + * Sets expiration_date + * @param \DateTime $expiration_date The date this invitation will expire and can not be launched (formatted yyyyMMddHHmmss in UTC time). + * @return $this + */ + public function setExpirationDate($expiration_date) + { + $this->container['expiration_date'] = $expiration_date; + + return $this; + } + + /** + * Gets registration_cap + * @return int + */ + public function getRegistrationCap() + { + return $this->container['registration_cap']; + } + + /** + * Sets registration_cap + * @param int $registration_cap Integer value that limits the amount of registrations a public invitation can generate. + * @return $this + */ + public function setRegistrationCap($registration_cap) + { + $this->container['registration_cap'] = $registration_cap; + + return $this; + } + + /** + * Gets registration_count + * @return int + */ + public function getRegistrationCount() + { + return $this->container['registration_count']; + } + + /** + * Sets registration_count + * @param int $registration_count The count of registrations for this invitation + * @return $this + */ + public function setRegistrationCount($registration_count) + { + $this->container['registration_count'] = $registration_count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RegistrationCompletion.php b/src/Model/RegistrationCompletion.php index 82d307a..7c978dd 100644 --- a/src/Model/RegistrationCompletion.php +++ b/src/Model/RegistrationCompletion.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/RegistrationListSchema.php b/src/Model/RegistrationListSchema.php index c186558..5e8381a 100644 --- a/src/Model/RegistrationListSchema.php +++ b/src/Model/RegistrationListSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/RegistrationSchema.php b/src/Model/RegistrationSchema.php index 8bdb96a..034c887 100644 --- a/src/Model/RegistrationSchema.php +++ b/src/Model/RegistrationSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/RegistrationSuccess.php b/src/Model/RegistrationSuccess.php index c53daed..a29af21 100644 --- a/src/Model/RegistrationSuccess.php +++ b/src/Model/RegistrationSuccess.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/ReportageAccountInfoSchema.php b/src/Model/ReportageAccountInfoSchema.php new file mode 100644 index 0000000..bc3194b --- /dev/null +++ b/src/Model/ReportageAccountInfoSchema.php @@ -0,0 +1,437 @@ + 'string', + 'first_name' => 'string', + 'last_name' => 'string', + 'company' => 'string', + 'account_type' => 'string', + 'reg_limit' => 'int', + 'strict_limit' => 'bool', + 'create_date' => '\DateTime', + 'usage' => '\RusticiSoftware\Cloud\V2\Model\ReportageAccountInfoUsageSchema' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'first_name' => 'firstName', + 'last_name' => 'lastName', + 'company' => 'company', + 'account_type' => 'accountType', + 'reg_limit' => 'regLimit', + 'strict_limit' => 'strictLimit', + 'create_date' => 'createDate', + 'usage' => 'usage' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'first_name' => 'setFirstName', + 'last_name' => 'setLastName', + 'company' => 'setCompany', + 'account_type' => 'setAccountType', + 'reg_limit' => 'setRegLimit', + 'strict_limit' => 'setStrictLimit', + 'create_date' => 'setCreateDate', + 'usage' => 'setUsage' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'first_name' => 'getFirstName', + 'last_name' => 'getLastName', + 'company' => 'getCompany', + 'account_type' => 'getAccountType', + 'reg_limit' => 'getRegLimit', + 'strict_limit' => 'getStrictLimit', + 'create_date' => 'getCreateDate', + 'usage' => 'getUsage' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['first_name'] = isset($data['first_name']) ? $data['first_name'] : null; + $this->container['last_name'] = isset($data['last_name']) ? $data['last_name'] : null; + $this->container['company'] = isset($data['company']) ? $data['company'] : null; + $this->container['account_type'] = isset($data['account_type']) ? $data['account_type'] : null; + $this->container['reg_limit'] = isset($data['reg_limit']) ? $data['reg_limit'] : null; + $this->container['strict_limit'] = isset($data['strict_limit']) ? $data['strict_limit'] : null; + $this->container['create_date'] = isset($data['create_date']) ? $data['create_date'] : null; + $this->container['usage'] = isset($data['usage']) ? $data['usage'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets email + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * @param string $email + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets first_name + * @return string + */ + public function getFirstName() + { + return $this->container['first_name']; + } + + /** + * Sets first_name + * @param string $first_name + * @return $this + */ + public function setFirstName($first_name) + { + $this->container['first_name'] = $first_name; + + return $this; + } + + /** + * Gets last_name + * @return string + */ + public function getLastName() + { + return $this->container['last_name']; + } + + /** + * Sets last_name + * @param string $last_name + * @return $this + */ + public function setLastName($last_name) + { + $this->container['last_name'] = $last_name; + + return $this; + } + + /** + * Gets company + * @return string + */ + public function getCompany() + { + return $this->container['company']; + } + + /** + * Sets company + * @param string $company + * @return $this + */ + public function setCompany($company) + { + $this->container['company'] = $company; + + return $this; + } + + /** + * Gets account_type + * @return string + */ + public function getAccountType() + { + return $this->container['account_type']; + } + + /** + * Sets account_type + * @param string $account_type + * @return $this + */ + public function setAccountType($account_type) + { + $this->container['account_type'] = $account_type; + + return $this; + } + + /** + * Gets reg_limit + * @return int + */ + public function getRegLimit() + { + return $this->container['reg_limit']; + } + + /** + * Sets reg_limit + * @param int $reg_limit + * @return $this + */ + public function setRegLimit($reg_limit) + { + $this->container['reg_limit'] = $reg_limit; + + return $this; + } + + /** + * Gets strict_limit + * @return bool + */ + public function getStrictLimit() + { + return $this->container['strict_limit']; + } + + /** + * Sets strict_limit + * @param bool $strict_limit + * @return $this + */ + public function setStrictLimit($strict_limit) + { + $this->container['strict_limit'] = $strict_limit; + + return $this; + } + + /** + * Gets create_date + * @return \DateTime + */ + public function getCreateDate() + { + return $this->container['create_date']; + } + + /** + * Sets create_date + * @param \DateTime $create_date + * @return $this + */ + public function setCreateDate($create_date) + { + $this->container['create_date'] = $create_date; + + return $this; + } + + /** + * Gets usage + * @return \RusticiSoftware\Cloud\V2\Model\ReportageAccountInfoUsageSchema + */ + public function getUsage() + { + return $this->container['usage']; + } + + /** + * Sets usage + * @param \RusticiSoftware\Cloud\V2\Model\ReportageAccountInfoUsageSchema $usage + * @return $this + */ + public function setUsage($usage) + { + $this->container['usage'] = $usage; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ReportageAccountInfoUsageSchema.php b/src/Model/ReportageAccountInfoUsageSchema.php new file mode 100644 index 0000000..7b29b89 --- /dev/null +++ b/src/Model/ReportageAccountInfoUsageSchema.php @@ -0,0 +1,307 @@ + '\DateTime', + 'reg_count' => 'int', + 'total_registrations' => 'int', + 'total_courses' => 'int' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'month_start' => 'monthStart', + 'reg_count' => 'regCount', + 'total_registrations' => 'totalRegistrations', + 'total_courses' => 'totalCourses' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'month_start' => 'setMonthStart', + 'reg_count' => 'setRegCount', + 'total_registrations' => 'setTotalRegistrations', + 'total_courses' => 'setTotalCourses' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'month_start' => 'getMonthStart', + 'reg_count' => 'getRegCount', + 'total_registrations' => 'getTotalRegistrations', + 'total_courses' => 'getTotalCourses' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['month_start'] = isset($data['month_start']) ? $data['month_start'] : null; + $this->container['reg_count'] = isset($data['reg_count']) ? $data['reg_count'] : null; + $this->container['total_registrations'] = isset($data['total_registrations']) ? $data['total_registrations'] : null; + $this->container['total_courses'] = isset($data['total_courses']) ? $data['total_courses'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets month_start + * @return \DateTime + */ + public function getMonthStart() + { + return $this->container['month_start']; + } + + /** + * Sets month_start + * @param \DateTime $month_start + * @return $this + */ + public function setMonthStart($month_start) + { + $this->container['month_start'] = $month_start; + + return $this; + } + + /** + * Gets reg_count + * @return int + */ + public function getRegCount() + { + return $this->container['reg_count']; + } + + /** + * Sets reg_count + * @param int $reg_count + * @return $this + */ + public function setRegCount($reg_count) + { + $this->container['reg_count'] = $reg_count; + + return $this; + } + + /** + * Gets total_registrations + * @return int + */ + public function getTotalRegistrations() + { + return $this->container['total_registrations']; + } + + /** + * Sets total_registrations + * @param int $total_registrations + * @return $this + */ + public function setTotalRegistrations($total_registrations) + { + $this->container['total_registrations'] = $total_registrations; + + return $this; + } + + /** + * Gets total_courses + * @return int + */ + public function getTotalCourses() + { + return $this->container['total_courses']; + } + + /** + * Sets total_courses + * @param int $total_courses + * @return $this + */ + public function setTotalCourses($total_courses) + { + $this->container['total_courses'] = $total_courses; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ReportageAuthTokenSchema.php b/src/Model/ReportageAuthTokenSchema.php new file mode 100644 index 0000000..725b360 --- /dev/null +++ b/src/Model/ReportageAuthTokenSchema.php @@ -0,0 +1,255 @@ + 'bool', + 'query_string' => 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'auth_enabled' => 'authEnabled', + 'query_string' => 'queryString' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'auth_enabled' => 'setAuthEnabled', + 'query_string' => 'setQueryString' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'auth_enabled' => 'getAuthEnabled', + 'query_string' => 'getQueryString' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['auth_enabled'] = isset($data['auth_enabled']) ? $data['auth_enabled'] : null; + $this->container['query_string'] = isset($data['query_string']) ? $data['query_string'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets auth_enabled + * @return bool + */ + public function getAuthEnabled() + { + return $this->container['auth_enabled']; + } + + /** + * Sets auth_enabled + * @param bool $auth_enabled + * @return $this + */ + public function setAuthEnabled($auth_enabled) + { + $this->container['auth_enabled'] = $auth_enabled; + + return $this; + } + + /** + * Gets query_string + * @return string + */ + public function getQueryString() + { + return $this->container['query_string']; + } + + /** + * Sets query_string + * @param string $query_string + * @return $this + */ + public function setQueryString($query_string) + { + $this->container['query_string'] = $query_string; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ReportageLinkSchema.php b/src/Model/ReportageLinkSchema.php new file mode 100644 index 0000000..f7e62f9 --- /dev/null +++ b/src/Model/ReportageLinkSchema.php @@ -0,0 +1,229 @@ + 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'reportage_link' => 'reportageLink' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'reportage_link' => 'setReportageLink' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'reportage_link' => 'getReportageLink' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['reportage_link'] = isset($data['reportage_link']) ? $data['reportage_link'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets reportage_link + * @return string + */ + public function getReportageLink() + { + return $this->container['reportage_link']; + } + + /** + * Sets reportage_link + * @param string $reportage_link + * @return $this + */ + public function setReportageLink($reportage_link) + { + $this->container['reportage_link'] = $reportage_link; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ResponseError.php b/src/Model/ResponseError.php index 2df87ff..cd8f467 100644 --- a/src/Model/ResponseError.php +++ b/src/Model/ResponseError.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/RuntimeInteractionSchema.php b/src/Model/RuntimeInteractionSchema.php index 2565ce0..cfb96a1 100644 --- a/src/Model/RuntimeInteractionSchema.php +++ b/src/Model/RuntimeInteractionSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/RuntimeObjectiveSchema.php b/src/Model/RuntimeObjectiveSchema.php index 3285bac..4d9cc0b 100644 --- a/src/Model/RuntimeObjectiveSchema.php +++ b/src/Model/RuntimeObjectiveSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/RuntimeSchema.php b/src/Model/RuntimeSchema.php index 1cc4f3a..8a575ff 100644 --- a/src/Model/RuntimeSchema.php +++ b/src/Model/RuntimeSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/ScoreSchema.php b/src/Model/ScoreSchema.php index 60012a7..a56f288 100644 --- a/src/Model/ScoreSchema.php +++ b/src/Model/ScoreSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/SettingItem.php b/src/Model/SettingItem.php index 8685856..a92945d 100644 --- a/src/Model/SettingItem.php +++ b/src/Model/SettingItem.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -120,15 +120,11 @@ public static function getters() } const EFFECTIVE_VALUE_SOURCE_DEFAULT = 'default'; - const EFFECTIVE_VALUE_SOURCE_FALLBACK = 'fallback'; - const EFFECTIVE_VALUE_SOURCE_BASE = 'base'; - const EFFECTIVE_VALUE_SOURCE_SYSTEM = 'system'; - const EFFECTIVE_VALUE_SOURCE_LEARNING_STANDARD = 'learningStandard'; const EFFECTIVE_VALUE_SOURCE_APPLICATION = 'application'; const EFFECTIVE_VALUE_SOURCE_LEARNING_STANDARD_FOR_APPLICATION = 'learningStandardForApplication'; const EFFECTIVE_VALUE_SOURCE_DISPATCH_DESTINATION = 'dispatchDestination'; const EFFECTIVE_VALUE_SOURCE_COURSE = 'course'; - const EFFECTIVE_VALUE_SOURCE_DISPATCH_DESTINATION_FOR_COURSE = 'dispatchDestinationForCourse'; + const EFFECTIVE_VALUE_SOURCE_DISPATCH = 'dispatch'; const EFFECTIVE_VALUE_SOURCE_REGISTRATION = 'registration'; @@ -141,15 +137,11 @@ public function getEffectiveValueSourceAllowableValues() { return [ self::EFFECTIVE_VALUE_SOURCE_DEFAULT, - self::EFFECTIVE_VALUE_SOURCE_FALLBACK, - self::EFFECTIVE_VALUE_SOURCE_BASE, - self::EFFECTIVE_VALUE_SOURCE_SYSTEM, - self::EFFECTIVE_VALUE_SOURCE_LEARNING_STANDARD, self::EFFECTIVE_VALUE_SOURCE_APPLICATION, self::EFFECTIVE_VALUE_SOURCE_LEARNING_STANDARD_FOR_APPLICATION, self::EFFECTIVE_VALUE_SOURCE_DISPATCH_DESTINATION, self::EFFECTIVE_VALUE_SOURCE_COURSE, - self::EFFECTIVE_VALUE_SOURCE_DISPATCH_DESTINATION_FOR_COURSE, + self::EFFECTIVE_VALUE_SOURCE_DISPATCH, self::EFFECTIVE_VALUE_SOURCE_REGISTRATION, ]; } @@ -183,9 +175,9 @@ public function listInvalidProperties() { $invalid_properties = []; - $allowed_values = ["default", "fallback", "base", "system", "learningStandard", "application", "learningStandardForApplication", "dispatchDestination", "course", "dispatchDestinationForCourse", "registration"]; + $allowed_values = ["default", "application", "learningStandardForApplication", "dispatchDestination", "course", "dispatch", "registration"]; if (!in_array($this->container['effective_value_source'], $allowed_values)) { - $invalid_properties[] = "invalid value for 'effective_value_source', must be one of 'default', 'fallback', 'base', 'system', 'learningStandard', 'application', 'learningStandardForApplication', 'dispatchDestination', 'course', 'dispatchDestinationForCourse', 'registration'."; + $invalid_properties[] = "invalid value for 'effective_value_source', must be one of 'default', 'application', 'learningStandardForApplication', 'dispatchDestination', 'course', 'dispatch', 'registration'."; } return $invalid_properties; @@ -200,7 +192,7 @@ public function listInvalidProperties() public function valid() { - $allowed_values = ["default", "fallback", "base", "system", "learningStandard", "application", "learningStandardForApplication", "dispatchDestination", "course", "dispatchDestinationForCourse", "registration"]; + $allowed_values = ["default", "application", "learningStandardForApplication", "dispatchDestination", "course", "dispatch", "registration"]; if (!in_array($this->container['effective_value_source'], $allowed_values)) { return false; } @@ -266,9 +258,9 @@ public function getEffectiveValueSource() */ public function setEffectiveValueSource($effective_value_source) { - $allowed_values = array('default', 'fallback', 'base', 'system', 'learningStandard', 'application', 'learningStandardForApplication', 'dispatchDestination', 'course', 'dispatchDestinationForCourse', 'registration'); + $allowed_values = array('default', 'application', 'learningStandardForApplication', 'dispatchDestination', 'course', 'dispatch', 'registration'); if (!is_null($effective_value_source) && (!in_array($effective_value_source, $allowed_values))) { - throw new \InvalidArgumentException("Invalid value for 'effective_value_source', must be one of 'default', 'fallback', 'base', 'system', 'learningStandard', 'application', 'learningStandardForApplication', 'dispatchDestination', 'course', 'dispatchDestinationForCourse', 'registration'"); + throw new \InvalidArgumentException("Invalid value for 'effective_value_source', must be one of 'default', 'application', 'learningStandardForApplication', 'dispatchDestination', 'course', 'dispatch', 'registration'"); } $this->container['effective_value_source'] = $effective_value_source; diff --git a/src/Model/SettingListSchema.php b/src/Model/SettingListSchema.php index 850b56e..9cba490 100644 --- a/src/Model/SettingListSchema.php +++ b/src/Model/SettingListSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/SettingMetadata.php b/src/Model/SettingMetadata.php index a603221..6889f50 100644 --- a/src/Model/SettingMetadata.php +++ b/src/Model/SettingMetadata.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/SettingValidValue.php b/src/Model/SettingValidValue.php index deb5287..b93e6e5 100644 --- a/src/Model/SettingValidValue.php +++ b/src/Model/SettingValidValue.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/SettingsIndividualSchema.php b/src/Model/SettingsIndividualSchema.php index d481df5..64650a6 100644 --- a/src/Model/SettingsIndividualSchema.php +++ b/src/Model/SettingsIndividualSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/SettingsPostSchema.php b/src/Model/SettingsPostSchema.php index 3bb950c..9b54cfa 100644 --- a/src/Model/SettingsPostSchema.php +++ b/src/Model/SettingsPostSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/SharedDataEntrySchema.php b/src/Model/SharedDataEntrySchema.php index 4f2f893..1ef36dd 100644 --- a/src/Model/SharedDataEntrySchema.php +++ b/src/Model/SharedDataEntrySchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/StaticPropertiesSchema.php b/src/Model/StaticPropertiesSchema.php index d68cada..c961719 100644 --- a/src/Model/StaticPropertiesSchema.php +++ b/src/Model/StaticPropertiesSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/StringResultSchema.php b/src/Model/StringResultSchema.php index e084aff..1984893 100644 --- a/src/Model/StringResultSchema.php +++ b/src/Model/StringResultSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/TagListSchema.php b/src/Model/TagListSchema.php index 4244702..879dee2 100644 --- a/src/Model/TagListSchema.php +++ b/src/Model/TagListSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/TitleSchema.php b/src/Model/TitleSchema.php index 55d4b28..49f2008 100644 --- a/src/Model/TitleSchema.php +++ b/src/Model/TitleSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/TokenRequestSchema.php b/src/Model/TokenRequestSchema.php index f4b686f..6f05dd2 100644 --- a/src/Model/TokenRequestSchema.php +++ b/src/Model/TokenRequestSchema.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/UpdateDispatchSchema.php b/src/Model/UpdateDispatchSchema.php new file mode 100644 index 0000000..e932af6 --- /dev/null +++ b/src/Model/UpdateDispatchSchema.php @@ -0,0 +1,411 @@ + 'bool', + 'instanced' => 'bool', + 'registration_cap' => 'int', + 'expiration_date' => '\DateTime', + 'enabled' => 'bool', + 'email' => 'string', + 'notes' => 'string', + 'post_back' => '\RusticiSoftware\Cloud\V2\Model\PostBackSchema' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'allow_new_registrations' => 'allowNewRegistrations', + 'instanced' => 'instanced', + 'registration_cap' => 'registrationCap', + 'expiration_date' => 'expirationDate', + 'enabled' => 'enabled', + 'email' => 'email', + 'notes' => 'notes', + 'post_back' => 'postBack' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'allow_new_registrations' => 'setAllowNewRegistrations', + 'instanced' => 'setInstanced', + 'registration_cap' => 'setRegistrationCap', + 'expiration_date' => 'setExpirationDate', + 'enabled' => 'setEnabled', + 'email' => 'setEmail', + 'notes' => 'setNotes', + 'post_back' => 'setPostBack' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'allow_new_registrations' => 'getAllowNewRegistrations', + 'instanced' => 'getInstanced', + 'registration_cap' => 'getRegistrationCap', + 'expiration_date' => 'getExpirationDate', + 'enabled' => 'getEnabled', + 'email' => 'getEmail', + 'notes' => 'getNotes', + 'post_back' => 'getPostBack' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['allow_new_registrations'] = isset($data['allow_new_registrations']) ? $data['allow_new_registrations'] : null; + $this->container['instanced'] = isset($data['instanced']) ? $data['instanced'] : null; + $this->container['registration_cap'] = isset($data['registration_cap']) ? $data['registration_cap'] : null; + $this->container['expiration_date'] = isset($data['expiration_date']) ? $data['expiration_date'] : null; + $this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['notes'] = isset($data['notes']) ? $data['notes'] : null; + $this->container['post_back'] = isset($data['post_back']) ? $data['post_back'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets allow_new_registrations + * @return bool + */ + public function getAllowNewRegistrations() + { + return $this->container['allow_new_registrations']; + } + + /** + * Sets allow_new_registrations + * @param bool $allow_new_registrations If true, then new registrations can be created for this dispatch. + * @return $this + */ + public function setAllowNewRegistrations($allow_new_registrations) + { + $this->container['allow_new_registrations'] = $allow_new_registrations; + + return $this; + } + + /** + * Gets instanced + * @return bool + */ + public function getInstanced() + { + return $this->container['instanced']; + } + + /** + * Sets instanced + * @param bool $instanced If true, then a new registration instance will be created if the client LMS doesn't provide launch data for an existing one. Otherwise, the same instance will always be used for the given cmi.learner_id. + * @return $this + */ + public function setInstanced($instanced) + { + $this->container['instanced'] = $instanced; + + return $this; + } + + /** + * Gets registration_cap + * @return int + */ + public function getRegistrationCap() + { + return $this->container['registration_cap']; + } + + /** + * Sets registration_cap + * @param int $registration_cap The maximum number of registrations that can be created for this dispatch, where '0' means 'unlimited registrations'. + * @return $this + */ + public function setRegistrationCap($registration_cap) + { + $this->container['registration_cap'] = $registration_cap; + + return $this; + } + + /** + * Gets expiration_date + * @return \DateTime + */ + public function getExpirationDate() + { + return $this->container['expiration_date']; + } + + /** + * Sets expiration_date + * @param \DateTime $expiration_date The date after which this dispatch will be disabled as an ISO 8601 string, or not present for no expiration date. + * @return $this + */ + public function setExpirationDate($expiration_date) + { + $this->container['expiration_date'] = $expiration_date; + + return $this; + } + + /** + * Gets enabled + * @return bool + */ + public function getEnabled() + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * @param bool $enabled If true, then this dispatch can be launched. + * @return $this + */ + public function setEnabled($enabled) + { + $this->container['enabled'] = $enabled; + + return $this; + } + + /** + * Gets email + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * @param string $email SCORM Cloud user e-mail associated with this dispatch. If this is not provided, it will default to the owner of the Realm. + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets notes + * @return string + */ + public function getNotes() + { + return $this->container['notes']; + } + + /** + * Sets notes + * @param string $notes Any provided notes about this dispatch. + * @return $this + */ + public function setNotes($notes) + { + $this->container['notes'] = $notes; + + return $this; + } + + /** + * Gets post_back + * @return \RusticiSoftware\Cloud\V2\Model\PostBackSchema + */ + public function getPostBack() + { + return $this->container['post_back']; + } + + /** + * Sets post_back + * @param \RusticiSoftware\Cloud\V2\Model\PostBackSchema $post_back The postback information for this Dispatch. + * @return $this + */ + public function setPostBack($post_back) + { + $this->container['post_back'] = $post_back; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/UserInvitationList.php b/src/Model/UserInvitationList.php new file mode 100644 index 0000000..5be62da --- /dev/null +++ b/src/Model/UserInvitationList.php @@ -0,0 +1,255 @@ + '\RusticiSoftware\Cloud\V2\Model\UserInvitationSchema[]', + 'more' => 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'user_invitations' => 'userInvitations', + 'more' => 'more' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'user_invitations' => 'setUserInvitations', + 'more' => 'setMore' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'user_invitations' => 'getUserInvitations', + 'more' => 'getMore' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['user_invitations'] = isset($data['user_invitations']) ? $data['user_invitations'] : null; + $this->container['more'] = isset($data['more']) ? $data['more'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets user_invitations + * @return \RusticiSoftware\Cloud\V2\Model\UserInvitationSchema[] + */ + public function getUserInvitations() + { + return $this->container['user_invitations']; + } + + /** + * Sets user_invitations + * @param \RusticiSoftware\Cloud\V2\Model\UserInvitationSchema[] $user_invitations A list of user invitation objects. + * @return $this + */ + public function setUserInvitations($user_invitations) + { + $this->container['user_invitations'] = $user_invitations; + + return $this; + } + + /** + * Gets more + * @return string + */ + public function getMore() + { + return $this->container['more']; + } + + /** + * Sets more + * @param string $more + * @return $this + */ + public function setMore($more) + { + $this->container['more'] = $more; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/UserInvitationSchema.php b/src/Model/UserInvitationSchema.php new file mode 100644 index 0000000..d7085f6 --- /dev/null +++ b/src/Model/UserInvitationSchema.php @@ -0,0 +1,359 @@ + 'string', + 'url' => 'string', + 'is_started' => 'bool', + 'updated' => '\DateTime', + 'registration_id' => 'string', + 'registration_report' => '\RusticiSoftware\Cloud\V2\Model\UserInvitationSchemaRegistrationReport' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email', + 'url' => 'url', + 'is_started' => 'isStarted', + 'updated' => 'updated', + 'registration_id' => 'registrationId', + 'registration_report' => 'registrationReport' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail', + 'url' => 'setUrl', + 'is_started' => 'setIsStarted', + 'updated' => 'setUpdated', + 'registration_id' => 'setRegistrationId', + 'registration_report' => 'setRegistrationReport' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail', + 'url' => 'getUrl', + 'is_started' => 'getIsStarted', + 'updated' => 'getUpdated', + 'registration_id' => 'getRegistrationId', + 'registration_report' => 'getRegistrationReport' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['is_started'] = isset($data['is_started']) ? $data['is_started'] : null; + $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; + $this->container['registration_id'] = isset($data['registration_id']) ? $data['registration_id'] : null; + $this->container['registration_report'] = isset($data['registration_report']) ? $data['registration_report'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets email + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * @param string $email The email of the user who took an invitation. + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets url + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * @param string $url The URL which the user would follow to take the invitation. + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets is_started + * @return bool + */ + public function getIsStarted() + { + return $this->container['is_started']; + } + + /** + * Sets is_started + * @param bool $is_started A boolean flag stating if the user has started the invitation. + * @return $this + */ + public function setIsStarted($is_started) + { + $this->container['is_started'] = $is_started; + + return $this; + } + + /** + * Gets updated + * @return \DateTime + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * @param \DateTime $updated + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets registration_id + * @return string + */ + public function getRegistrationId() + { + return $this->container['registration_id']; + } + + /** + * Sets registration_id + * @param string $registration_id The id of the registration which was created from the user being invited. + * @return $this + */ + public function setRegistrationId($registration_id) + { + $this->container['registration_id'] = $registration_id; + + return $this; + } + + /** + * Gets registration_report + * @return \RusticiSoftware\Cloud\V2\Model\UserInvitationSchemaRegistrationReport + */ + public function getRegistrationReport() + { + return $this->container['registration_report']; + } + + /** + * Sets registration_report + * @param \RusticiSoftware\Cloud\V2\Model\UserInvitationSchemaRegistrationReport $registration_report + * @return $this + */ + public function setRegistrationReport($registration_report) + { + $this->container['registration_report'] = $registration_report; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/UserInvitationSchemaRegistrationReport.php b/src/Model/UserInvitationSchemaRegistrationReport.php new file mode 100644 index 0000000..4c83f16 --- /dev/null +++ b/src/Model/UserInvitationSchemaRegistrationReport.php @@ -0,0 +1,308 @@ + '\RusticiSoftware\Cloud\V2\Model\RegistrationCompletion', + 'success' => '\RusticiSoftware\Cloud\V2\Model\RegistrationSuccess', + 'total_seconds_tracked' => 'double', + 'score' => '\RusticiSoftware\Cloud\V2\Model\ScoreSchema' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'complete' => 'complete', + 'success' => 'success', + 'total_seconds_tracked' => 'totalSecondsTracked', + 'score' => 'score' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'complete' => 'setComplete', + 'success' => 'setSuccess', + 'total_seconds_tracked' => 'setTotalSecondsTracked', + 'score' => 'setScore' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'complete' => 'getComplete', + 'success' => 'getSuccess', + 'total_seconds_tracked' => 'getTotalSecondsTracked', + 'score' => 'getScore' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['complete'] = isset($data['complete']) ? $data['complete'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + $this->container['total_seconds_tracked'] = isset($data['total_seconds_tracked']) ? $data['total_seconds_tracked'] : null; + $this->container['score'] = isset($data['score']) ? $data['score'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets complete + * @return \RusticiSoftware\Cloud\V2\Model\RegistrationCompletion + */ + public function getComplete() + { + return $this->container['complete']; + } + + /** + * Sets complete + * @param \RusticiSoftware\Cloud\V2\Model\RegistrationCompletion $complete + * @return $this + */ + public function setComplete($complete) + { + $this->container['complete'] = $complete; + + return $this; + } + + /** + * Gets success + * @return \RusticiSoftware\Cloud\V2\Model\RegistrationSuccess + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * @param \RusticiSoftware\Cloud\V2\Model\RegistrationSuccess $success + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets total_seconds_tracked + * @return double + */ + public function getTotalSecondsTracked() + { + return $this->container['total_seconds_tracked']; + } + + /** + * Sets total_seconds_tracked + * @param double $total_seconds_tracked + * @return $this + */ + public function setTotalSecondsTracked($total_seconds_tracked) + { + $this->container['total_seconds_tracked'] = $total_seconds_tracked; + + return $this; + } + + /** + * Gets score + * @return \RusticiSoftware\Cloud\V2\Model\ScoreSchema + */ + public function getScore() + { + return $this->container['score']; + } + + /** + * Sets score + * @param \RusticiSoftware\Cloud\V2\Model\ScoreSchema $score + * @return $this + */ + public function setScore($score) + { + $this->container['score'] = $score; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/XapiAccount.php b/src/Model/XapiAccount.php index be369e5..5022e14 100644 --- a/src/Model/XapiAccount.php +++ b/src/Model/XapiAccount.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/XapiActivity.php b/src/Model/XapiActivity.php index 2765eb5..1f9b386 100644 --- a/src/Model/XapiActivity.php +++ b/src/Model/XapiActivity.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/XapiActivityDefinition.php b/src/Model/XapiActivityDefinition.php index 95691f6..ec16764 100644 --- a/src/Model/XapiActivityDefinition.php +++ b/src/Model/XapiActivityDefinition.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/XapiAgentGroup.php b/src/Model/XapiAgentGroup.php index 8ed1b7a..957fe59 100644 --- a/src/Model/XapiAgentGroup.php +++ b/src/Model/XapiAgentGroup.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/XapiAttachment.php b/src/Model/XapiAttachment.php index 9a280f1..11b2702 100644 --- a/src/Model/XapiAttachment.php +++ b/src/Model/XapiAttachment.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/XapiContext.php b/src/Model/XapiContext.php index e6bae94..e0e0889 100644 --- a/src/Model/XapiContext.php +++ b/src/Model/XapiContext.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/XapiContextActivity.php b/src/Model/XapiContextActivity.php index 3c67e00..0bb105d 100644 --- a/src/Model/XapiContextActivity.php +++ b/src/Model/XapiContextActivity.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/XapiCredentialAuthTypeSchema.php b/src/Model/XapiCredentialAuthTypeSchema.php new file mode 100644 index 0000000..f462920 --- /dev/null +++ b/src/Model/XapiCredentialAuthTypeSchema.php @@ -0,0 +1,256 @@ + 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'xapi_credential_auth_type' => 'xapiCredentialAuthType' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'xapi_credential_auth_type' => 'setXapiCredentialAuthType' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'xapi_credential_auth_type' => 'getXapiCredentialAuthType' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + const XAPI_CREDENTIAL_AUTH_TYPE_BASICAUTH = 'BASICAUTH'; + const XAPI_CREDENTIAL_AUTH_TYPE_OAUTH = 'OAUTH'; + + + + /** + * Gets allowable values of the enum + * @return string[] + */ + public function getXapiCredentialAuthTypeAllowableValues() + { + return [ + self::XAPI_CREDENTIAL_AUTH_TYPE_BASICAUTH, + self::XAPI_CREDENTIAL_AUTH_TYPE_OAUTH, + ]; + } + + + /** + * 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->container['xapi_credential_auth_type'] = isset($data['xapi_credential_auth_type']) ? $data['xapi_credential_auth_type'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + $allowed_values = ["BASICAUTH", "OAUTH"]; + if (!in_array($this->container['xapi_credential_auth_type'], $allowed_values)) { + $invalid_properties[] = "invalid value for 'xapi_credential_auth_type', must be one of 'BASICAUTH', 'OAUTH'."; + } + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + $allowed_values = ["BASICAUTH", "OAUTH"]; + if (!in_array($this->container['xapi_credential_auth_type'], $allowed_values)) { + return false; + } + return true; + } + + + /** + * Gets xapi_credential_auth_type + * @return string + */ + public function getXapiCredentialAuthType() + { + return $this->container['xapi_credential_auth_type']; + } + + /** + * Sets xapi_credential_auth_type + * @param string $xapi_credential_auth_type + * @return $this + */ + public function setXapiCredentialAuthType($xapi_credential_auth_type) + { + $allowed_values = array('BASICAUTH', 'OAUTH'); + if (!is_null($xapi_credential_auth_type) && (!in_array($xapi_credential_auth_type, $allowed_values))) { + throw new \InvalidArgumentException("Invalid value for 'xapi_credential_auth_type', must be one of 'BASICAUTH', 'OAUTH'"); + } + $this->container['xapi_credential_auth_type'] = $xapi_credential_auth_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/XapiCredentialPermissionsLevelSchema.php b/src/Model/XapiCredentialPermissionsLevelSchema.php new file mode 100644 index 0000000..2361ff1 --- /dev/null +++ b/src/Model/XapiCredentialPermissionsLevelSchema.php @@ -0,0 +1,262 @@ + 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'xapi_credential_permissions_level' => 'xapiCredentialPermissionsLevel' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'xapi_credential_permissions_level' => 'setXapiCredentialPermissionsLevel' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'xapi_credential_permissions_level' => 'getXapiCredentialPermissionsLevel' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + const XAPI_CREDENTIAL_PERMISSIONS_LEVEL_DEFAULT = 'DEFAULT'; + const XAPI_CREDENTIAL_PERMISSIONS_LEVEL_USER = 'USER'; + const XAPI_CREDENTIAL_PERMISSIONS_LEVEL_ROOT = 'ROOT'; + const XAPI_CREDENTIAL_PERMISSIONS_LEVEL_READONLY = 'READONLY'; + const XAPI_CREDENTIAL_PERMISSIONS_LEVEL_WRITEONLY = 'WRITEONLY'; + + + + /** + * Gets allowable values of the enum + * @return string[] + */ + public function getXapiCredentialPermissionsLevelAllowableValues() + { + return [ + self::XAPI_CREDENTIAL_PERMISSIONS_LEVEL_DEFAULT, + self::XAPI_CREDENTIAL_PERMISSIONS_LEVEL_USER, + self::XAPI_CREDENTIAL_PERMISSIONS_LEVEL_ROOT, + self::XAPI_CREDENTIAL_PERMISSIONS_LEVEL_READONLY, + self::XAPI_CREDENTIAL_PERMISSIONS_LEVEL_WRITEONLY, + ]; + } + + + /** + * 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->container['xapi_credential_permissions_level'] = isset($data['xapi_credential_permissions_level']) ? $data['xapi_credential_permissions_level'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + $allowed_values = ["DEFAULT", "USER", "ROOT", "READONLY", "WRITEONLY"]; + if (!in_array($this->container['xapi_credential_permissions_level'], $allowed_values)) { + $invalid_properties[] = "invalid value for 'xapi_credential_permissions_level', must be one of 'DEFAULT', 'USER', 'ROOT', 'READONLY', 'WRITEONLY'."; + } + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + $allowed_values = ["DEFAULT", "USER", "ROOT", "READONLY", "WRITEONLY"]; + if (!in_array($this->container['xapi_credential_permissions_level'], $allowed_values)) { + return false; + } + return true; + } + + + /** + * Gets xapi_credential_permissions_level + * @return string + */ + public function getXapiCredentialPermissionsLevel() + { + return $this->container['xapi_credential_permissions_level']; + } + + /** + * Sets xapi_credential_permissions_level + * @param string $xapi_credential_permissions_level + * @return $this + */ + public function setXapiCredentialPermissionsLevel($xapi_credential_permissions_level) + { + $allowed_values = array('DEFAULT', 'USER', 'ROOT', 'READONLY', 'WRITEONLY'); + if (!is_null($xapi_credential_permissions_level) && (!in_array($xapi_credential_permissions_level, $allowed_values))) { + throw new \InvalidArgumentException("Invalid value for 'xapi_credential_permissions_level', must be one of 'DEFAULT', 'USER', 'ROOT', 'READONLY', 'WRITEONLY'"); + } + $this->container['xapi_credential_permissions_level'] = $xapi_credential_permissions_level; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/XapiCredentialPostSchema.php b/src/Model/XapiCredentialPostSchema.php new file mode 100644 index 0000000..e86f654 --- /dev/null +++ b/src/Model/XapiCredentialPostSchema.php @@ -0,0 +1,383 @@ + 'string', + 'info' => 'string', + 'secret' => 'string', + 'is_enabled' => 'bool', + 'auth' => '\RusticiSoftware\Cloud\V2\Model\XapiCredentialAuthTypeSchema', + 'permissions_level' => '\RusticiSoftware\Cloud\V2\Model\XapiCredentialPermissionsLevelSchema' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'info' => 'info', + 'secret' => 'secret', + 'is_enabled' => 'isEnabled', + 'auth' => 'auth', + 'permissions_level' => 'permissionsLevel' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'info' => 'setInfo', + 'secret' => 'setSecret', + 'is_enabled' => 'setIsEnabled', + 'auth' => 'setAuth', + 'permissions_level' => 'setPermissionsLevel' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'info' => 'getInfo', + 'secret' => 'getSecret', + 'is_enabled' => 'getIsEnabled', + 'auth' => 'getAuth', + 'permissions_level' => 'getPermissionsLevel' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['info'] = isset($data['info']) ? $data['info'] : null; + $this->container['secret'] = isset($data['secret']) ? $data['secret'] : null; + $this->container['is_enabled'] = isset($data['is_enabled']) ? $data['is_enabled'] : null; + $this->container['auth'] = isset($data['auth']) ? $data['auth'] : null; + $this->container['permissions_level'] = isset($data['permissions_level']) ? $data['permissions_level'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['name'] === null) { + $invalid_properties[] = "'name' can't be null"; + } + if ($this->container['is_enabled'] === null) { + $invalid_properties[] = "'is_enabled' can't be null"; + } + if ($this->container['auth'] === null) { + $invalid_properties[] = "'auth' can't be null"; + } + if ($this->container['permissions_level'] === null) { + $invalid_properties[] = "'permissions_level' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['name'] === null) { + return false; + } + if ($this->container['is_enabled'] === null) { + return false; + } + if ($this->container['auth'] === null) { + return false; + } + if ($this->container['permissions_level'] === null) { + return false; + } + return true; + } + + + /** + * Gets name + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * @param string $name + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets info + * @return string + */ + public function getInfo() + { + return $this->container['info']; + } + + /** + * Sets info + * @param string $info + * @return $this + */ + public function setInfo($info) + { + $this->container['info'] = $info; + + return $this; + } + + /** + * Gets secret + * @return string + */ + public function getSecret() + { + return $this->container['secret']; + } + + /** + * Sets secret + * @param string $secret + * @return $this + */ + public function setSecret($secret) + { + $this->container['secret'] = $secret; + + return $this; + } + + /** + * Gets is_enabled + * @return bool + */ + public function getIsEnabled() + { + return $this->container['is_enabled']; + } + + /** + * Sets is_enabled + * @param bool $is_enabled + * @return $this + */ + public function setIsEnabled($is_enabled) + { + $this->container['is_enabled'] = $is_enabled; + + return $this; + } + + /** + * Gets auth + * @return \RusticiSoftware\Cloud\V2\Model\XapiCredentialAuthTypeSchema + */ + public function getAuth() + { + return $this->container['auth']; + } + + /** + * Sets auth + * @param \RusticiSoftware\Cloud\V2\Model\XapiCredentialAuthTypeSchema $auth + * @return $this + */ + public function setAuth($auth) + { + $this->container['auth'] = $auth; + + return $this; + } + + /** + * Gets permissions_level + * @return \RusticiSoftware\Cloud\V2\Model\XapiCredentialPermissionsLevelSchema + */ + public function getPermissionsLevel() + { + return $this->container['permissions_level']; + } + + /** + * Sets permissions_level + * @param \RusticiSoftware\Cloud\V2\Model\XapiCredentialPermissionsLevelSchema $permissions_level + * @return $this + */ + public function setPermissionsLevel($permissions_level) + { + $this->container['permissions_level'] = $permissions_level; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/XapiCredentialSchema.php b/src/Model/XapiCredentialSchema.php new file mode 100644 index 0000000..87e96bd --- /dev/null +++ b/src/Model/XapiCredentialSchema.php @@ -0,0 +1,415 @@ + 'string', + 'name' => 'string', + 'info' => 'string', + 'secret' => 'string', + 'is_enabled' => 'bool', + 'auth' => '\RusticiSoftware\Cloud\V2\Model\XapiCredentialAuthTypeSchema', + 'permissions_level' => '\RusticiSoftware\Cloud\V2\Model\XapiCredentialPermissionsLevelSchema' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * 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', + 'info' => 'info', + 'secret' => 'secret', + 'is_enabled' => 'isEnabled', + 'auth' => 'auth', + 'permissions_level' => 'permissionsLevel' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'info' => 'setInfo', + 'secret' => 'setSecret', + 'is_enabled' => 'setIsEnabled', + 'auth' => 'setAuth', + 'permissions_level' => 'setPermissionsLevel' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'info' => 'getInfo', + 'secret' => 'getSecret', + 'is_enabled' => 'getIsEnabled', + 'auth' => 'getAuth', + 'permissions_level' => 'getPermissionsLevel' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['info'] = isset($data['info']) ? $data['info'] : null; + $this->container['secret'] = isset($data['secret']) ? $data['secret'] : null; + $this->container['is_enabled'] = isset($data['is_enabled']) ? $data['is_enabled'] : null; + $this->container['auth'] = isset($data['auth']) ? $data['auth'] : null; + $this->container['permissions_level'] = isset($data['permissions_level']) ? $data['permissions_level'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['name'] === null) { + $invalid_properties[] = "'name' can't be null"; + } + if ($this->container['secret'] === null) { + $invalid_properties[] = "'secret' can't be null"; + } + if ($this->container['is_enabled'] === null) { + $invalid_properties[] = "'is_enabled' can't be null"; + } + if ($this->container['auth'] === null) { + $invalid_properties[] = "'auth' can't be null"; + } + if ($this->container['permissions_level'] === null) { + $invalid_properties[] = "'permissions_level' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['name'] === null) { + return false; + } + if ($this->container['secret'] === null) { + return false; + } + if ($this->container['is_enabled'] === null) { + return false; + } + if ($this->container['auth'] === null) { + return false; + } + if ($this->container['permissions_level'] === null) { + return false; + } + return true; + } + + + /** + * Gets id + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param string $id + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * @param string $name + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets info + * @return string + */ + public function getInfo() + { + return $this->container['info']; + } + + /** + * Sets info + * @param string $info + * @return $this + */ + public function setInfo($info) + { + $this->container['info'] = $info; + + return $this; + } + + /** + * Gets secret + * @return string + */ + public function getSecret() + { + return $this->container['secret']; + } + + /** + * Sets secret + * @param string $secret + * @return $this + */ + public function setSecret($secret) + { + $this->container['secret'] = $secret; + + return $this; + } + + /** + * Gets is_enabled + * @return bool + */ + public function getIsEnabled() + { + return $this->container['is_enabled']; + } + + /** + * Sets is_enabled + * @param bool $is_enabled + * @return $this + */ + public function setIsEnabled($is_enabled) + { + $this->container['is_enabled'] = $is_enabled; + + return $this; + } + + /** + * Gets auth + * @return \RusticiSoftware\Cloud\V2\Model\XapiCredentialAuthTypeSchema + */ + public function getAuth() + { + return $this->container['auth']; + } + + /** + * Sets auth + * @param \RusticiSoftware\Cloud\V2\Model\XapiCredentialAuthTypeSchema $auth + * @return $this + */ + public function setAuth($auth) + { + $this->container['auth'] = $auth; + + return $this; + } + + /** + * Gets permissions_level + * @return \RusticiSoftware\Cloud\V2\Model\XapiCredentialPermissionsLevelSchema + */ + public function getPermissionsLevel() + { + return $this->container['permissions_level']; + } + + /** + * Sets permissions_level + * @param \RusticiSoftware\Cloud\V2\Model\XapiCredentialPermissionsLevelSchema $permissions_level + * @return $this + */ + public function setPermissionsLevel($permissions_level) + { + $this->container['permissions_level'] = $permissions_level; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/XapiCredentialsListSchema.php b/src/Model/XapiCredentialsListSchema.php new file mode 100644 index 0000000..d5bb1dd --- /dev/null +++ b/src/Model/XapiCredentialsListSchema.php @@ -0,0 +1,261 @@ + '\RusticiSoftware\Cloud\V2\Model\XapiCredentialSchema[]', + 'more' => 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'xapi_credentials' => 'xapiCredentials', + 'more' => 'more' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'xapi_credentials' => 'setXapiCredentials', + 'more' => 'setMore' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'xapi_credentials' => 'getXapiCredentials', + 'more' => 'getMore' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['xapi_credentials'] = isset($data['xapi_credentials']) ? $data['xapi_credentials'] : null; + $this->container['more'] = isset($data['more']) ? $data['more'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['xapi_credentials'] === null) { + $invalid_properties[] = "'xapi_credentials' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['xapi_credentials'] === null) { + return false; + } + return true; + } + + + /** + * Gets xapi_credentials + * @return \RusticiSoftware\Cloud\V2\Model\XapiCredentialSchema[] + */ + public function getXapiCredentials() + { + return $this->container['xapi_credentials']; + } + + /** + * Sets xapi_credentials + * @param \RusticiSoftware\Cloud\V2\Model\XapiCredentialSchema[] $xapi_credentials + * @return $this + */ + public function setXapiCredentials($xapi_credentials) + { + $this->container['xapi_credentials'] = $xapi_credentials; + + return $this; + } + + /** + * Gets more + * @return string + */ + public function getMore() + { + return $this->container['more']; + } + + /** + * Sets more + * @param string $more + * @return $this + */ + public function setMore($more) + { + $this->container['more'] = $more; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/XapiEndpointSchema.php b/src/Model/XapiEndpointSchema.php new file mode 100644 index 0000000..40e442d --- /dev/null +++ b/src/Model/XapiEndpointSchema.php @@ -0,0 +1,281 @@ + 'string', + 'user_name' => 'string', + 'password' => 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'url' => 'url', + 'user_name' => 'userName', + 'password' => 'password' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'url' => 'setUrl', + 'user_name' => 'setUserName', + 'password' => 'setPassword' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'url' => 'getUrl', + 'user_name' => 'getUserName', + 'password' => 'getPassword' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['user_name'] = isset($data['user_name']) ? $data['user_name'] : null; + $this->container['password'] = isset($data['password']) ? $data['password'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets url + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * @param string $url + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets user_name + * @return string + */ + public function getUserName() + { + return $this->container['user_name']; + } + + /** + * Sets user_name + * @param string $user_name + * @return $this + */ + public function setUserName($user_name) + { + $this->container['user_name'] = $user_name; + + return $this; + } + + /** + * Gets password + * @return string + */ + public function getPassword() + { + return $this->container['password']; + } + + /** + * Sets password + * @param string $password + * @return $this + */ + public function setPassword($password) + { + $this->container['password'] = $password; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/XapiInteractionComponent.php b/src/Model/XapiInteractionComponent.php index ec0e8b8..213a22d 100644 --- a/src/Model/XapiInteractionComponent.php +++ b/src/Model/XapiInteractionComponent.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/XapiResult.php b/src/Model/XapiResult.php index 60baab5..44abda8 100644 --- a/src/Model/XapiResult.php +++ b/src/Model/XapiResult.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/XapiScore.php b/src/Model/XapiScore.php index cb38038..629850e 100644 --- a/src/Model/XapiScore.php +++ b/src/Model/XapiScore.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/XapiStatement.php b/src/Model/XapiStatement.php index ecacde9..e454e4d 100644 --- a/src/Model/XapiStatement.php +++ b/src/Model/XapiStatement.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/XapiStatementPipeListSchema.php b/src/Model/XapiStatementPipeListSchema.php new file mode 100644 index 0000000..077b205 --- /dev/null +++ b/src/Model/XapiStatementPipeListSchema.php @@ -0,0 +1,235 @@ + '\RusticiSoftware\Cloud\V2\Model\XapiStatementPipeSchema[]' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'xapi_statement_pipes' => 'xapiStatementPipes' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'xapi_statement_pipes' => 'setXapiStatementPipes' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'xapi_statement_pipes' => 'getXapiStatementPipes' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['xapi_statement_pipes'] = isset($data['xapi_statement_pipes']) ? $data['xapi_statement_pipes'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['xapi_statement_pipes'] === null) { + $invalid_properties[] = "'xapi_statement_pipes' can't be null"; + } + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + if ($this->container['xapi_statement_pipes'] === null) { + return false; + } + return true; + } + + + /** + * Gets xapi_statement_pipes + * @return \RusticiSoftware\Cloud\V2\Model\XapiStatementPipeSchema[] + */ + public function getXapiStatementPipes() + { + return $this->container['xapi_statement_pipes']; + } + + /** + * Sets xapi_statement_pipes + * @param \RusticiSoftware\Cloud\V2\Model\XapiStatementPipeSchema[] $xapi_statement_pipes + * @return $this + */ + public function setXapiStatementPipes($xapi_statement_pipes) + { + $this->container['xapi_statement_pipes'] = $xapi_statement_pipes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/XapiStatementPipePostSchema.php b/src/Model/XapiStatementPipePostSchema.php new file mode 100644 index 0000000..884a215 --- /dev/null +++ b/src/Model/XapiStatementPipePostSchema.php @@ -0,0 +1,255 @@ + '\RusticiSoftware\Cloud\V2\Model\XapiEndpointSchema', + 'target' => '\RusticiSoftware\Cloud\V2\Model\XapiEndpointSchema' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'source' => 'source', + 'target' => 'target' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'source' => 'setSource', + 'target' => 'setTarget' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'source' => 'getSource', + 'target' => 'getTarget' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['source'] = isset($data['source']) ? $data['source'] : null; + $this->container['target'] = isset($data['target']) ? $data['target'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets source + * @return \RusticiSoftware\Cloud\V2\Model\XapiEndpointSchema + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * @param \RusticiSoftware\Cloud\V2\Model\XapiEndpointSchema $source + * @return $this + */ + public function setSource($source) + { + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets target + * @return \RusticiSoftware\Cloud\V2\Model\XapiEndpointSchema + */ + public function getTarget() + { + return $this->container['target']; + } + + /** + * Sets target + * @param \RusticiSoftware\Cloud\V2\Model\XapiEndpointSchema $target + * @return $this + */ + public function setTarget($target) + { + $this->container['target'] = $target; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/XapiStatementPipeSchema.php b/src/Model/XapiStatementPipeSchema.php new file mode 100644 index 0000000..988b9b0 --- /dev/null +++ b/src/Model/XapiStatementPipeSchema.php @@ -0,0 +1,385 @@ + 'string', + 'last_forwarded_statement_date' => 'string', + 'more_url' => 'string', + 'attempts' => 'int', + 'visible_after' => 'string', + 'source' => '\RusticiSoftware\Cloud\V2\Model\XapiEndpointSchema', + 'target' => '\RusticiSoftware\Cloud\V2\Model\XapiEndpointSchema' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'last_forwarded_statement_date' => 'lastForwardedStatementDate', + 'more_url' => 'moreUrl', + 'attempts' => 'attempts', + 'visible_after' => 'visibleAfter', + 'source' => 'source', + 'target' => 'target' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'last_forwarded_statement_date' => 'setLastForwardedStatementDate', + 'more_url' => 'setMoreUrl', + 'attempts' => 'setAttempts', + 'visible_after' => 'setVisibleAfter', + 'source' => 'setSource', + 'target' => 'setTarget' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'last_forwarded_statement_date' => 'getLastForwardedStatementDate', + 'more_url' => 'getMoreUrl', + 'attempts' => 'getAttempts', + 'visible_after' => 'getVisibleAfter', + 'source' => 'getSource', + 'target' => 'getTarget' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['last_forwarded_statement_date'] = isset($data['last_forwarded_statement_date']) ? $data['last_forwarded_statement_date'] : null; + $this->container['more_url'] = isset($data['more_url']) ? $data['more_url'] : null; + $this->container['attempts'] = isset($data['attempts']) ? $data['attempts'] : null; + $this->container['visible_after'] = isset($data['visible_after']) ? $data['visible_after'] : null; + $this->container['source'] = isset($data['source']) ? $data['source'] : null; + $this->container['target'] = isset($data['target']) ? $data['target'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets id + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param string $id + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets last_forwarded_statement_date + * @return string + */ + public function getLastForwardedStatementDate() + { + return $this->container['last_forwarded_statement_date']; + } + + /** + * Sets last_forwarded_statement_date + * @param string $last_forwarded_statement_date + * @return $this + */ + public function setLastForwardedStatementDate($last_forwarded_statement_date) + { + $this->container['last_forwarded_statement_date'] = $last_forwarded_statement_date; + + return $this; + } + + /** + * Gets more_url + * @return string + */ + public function getMoreUrl() + { + return $this->container['more_url']; + } + + /** + * Sets more_url + * @param string $more_url + * @return $this + */ + public function setMoreUrl($more_url) + { + $this->container['more_url'] = $more_url; + + return $this; + } + + /** + * Gets attempts + * @return int + */ + public function getAttempts() + { + return $this->container['attempts']; + } + + /** + * Sets attempts + * @param int $attempts + * @return $this + */ + public function setAttempts($attempts) + { + $this->container['attempts'] = $attempts; + + return $this; + } + + /** + * Gets visible_after + * @return string + */ + public function getVisibleAfter() + { + return $this->container['visible_after']; + } + + /** + * Sets visible_after + * @param string $visible_after + * @return $this + */ + public function setVisibleAfter($visible_after) + { + $this->container['visible_after'] = $visible_after; + + return $this; + } + + /** + * Gets source + * @return \RusticiSoftware\Cloud\V2\Model\XapiEndpointSchema + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * @param \RusticiSoftware\Cloud\V2\Model\XapiEndpointSchema $source + * @return $this + */ + public function setSource($source) + { + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets target + * @return \RusticiSoftware\Cloud\V2\Model\XapiEndpointSchema + */ + public function getTarget() + { + return $this->container['target']; + } + + /** + * Sets target + * @param \RusticiSoftware\Cloud\V2\Model\XapiEndpointSchema $target + * @return $this + */ + public function setTarget($target) + { + $this->container['target'] = $target; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/XapiStatementReference.php b/src/Model/XapiStatementReference.php index ad20411..b676ce1 100644 --- a/src/Model/XapiStatementReference.php +++ b/src/Model/XapiStatementReference.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/XapiStatementResult.php b/src/Model/XapiStatementResult.php index f2dc363..719a81c 100644 --- a/src/Model/XapiStatementResult.php +++ b/src/Model/XapiStatementResult.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/XapiVerb.php b/src/Model/XapiVerb.php index 653d2f7..7a3a53a 100644 --- a/src/Model/XapiVerb.php +++ b/src/Model/XapiVerb.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/src/Model/ZoomiCompanyId.php b/src/Model/ZoomiCompanyId.php new file mode 100644 index 0000000..3f61b69 --- /dev/null +++ b/src/Model/ZoomiCompanyId.php @@ -0,0 +1,229 @@ + 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'zoomi_company_id' => 'zoomi_company_id' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'zoomi_company_id' => 'setZoomiCompanyId' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'zoomi_company_id' => 'getZoomiCompanyId' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['zoomi_company_id'] = isset($data['zoomi_company_id']) ? $data['zoomi_company_id'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets zoomi_company_id + * @return string + */ + public function getZoomiCompanyId() + { + return $this->container['zoomi_company_id']; + } + + /** + * Sets zoomi_company_id + * @param string $zoomi_company_id + * @return $this + */ + public function setZoomiCompanyId($zoomi_company_id) + { + $this->container['zoomi_company_id'] = $zoomi_company_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ZoomiCourseOptionsSchema.php b/src/Model/ZoomiCourseOptionsSchema.php new file mode 100644 index 0000000..69bf1d3 --- /dev/null +++ b/src/Model/ZoomiCourseOptionsSchema.php @@ -0,0 +1,255 @@ + 'string', + 'cta' => 'string' + ]; + + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'nti' => 'nti', + 'cta' => 'cta' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'nti' => 'setNti', + 'cta' => 'setCta' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'nti' => 'getNti', + 'cta' => 'getCta' + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * 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->container['nti'] = isset($data['nti']) ? $data['nti'] : null; + $this->container['cta'] = isset($data['cta']) ? $data['cta'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets nti + * @return string + */ + public function getNti() + { + return $this->container['nti']; + } + + /** + * Sets nti + * @param string $nti + * @return $this + */ + public function setNti($nti) + { + $this->container['nti'] = $nti; + + return $this; + } + + /** + * Gets cta + * @return string + */ + public function getCta() + { + return $this->container['cta']; + } + + /** + * Sets cta + * @param string $cta + * @return $this + */ + public function setCta($cta) + { + $this->container['cta'] = $cta; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * @param integer $offset Offset + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * @param integer $offset Offset + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * @param integer $offset Offset + * @param mixed $value Value to be set + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * @param integer $offset Offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\RusticiSoftware\Cloud\V2\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 2c653e9..5f7a23d 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -15,7 +15,7 @@ * * REST API used for SCORM Cloud integrations. * - * OpenAPI spec version: 2.0 beta + * OpenAPI spec version: 2.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git *