commit 4a3123aa748c8b5d531c2c9f9d2d7e34aa1e2cd0 Author: Wlad Meixner Date: Sun Nov 5 19:54:17 2023 +0100 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..383c324 --- /dev/null +++ b/README.md @@ -0,0 +1,808 @@ +# openapi +You're looking at the current **stable** documentation of the OpenProject APIv3. If you're interested in the current +development version, please go to [github.com/opf](https://github.com/opf/openproject/tree/dev/docs/api/apiv3). + +## Introduction + +The documentation for the APIv3 is written according to the [OpenAPI 3.0 Specification](https://swagger.io/specification/). +You can either view the static version of this documentation on the [website](https://www.openproject.org/docs/api/introduction/) +or the interactive version, rendered with [OpenAPI Explorer](https://github.com/Rhosys/openapi-explorer/blob/main/README.md), +in your OpenProject installation under `/api/docs`. +In the latter you can try out the various API endpoints directly interacting with our OpenProject data. +Moreover you can access the specification source itself under `/api/v3/spec.json` and `/api/v3/spec.yml` +(e.g. [here](https://community.openproject.org/api/v3/spec.yml)). + +The APIv3 is a hypermedia REST API, a shorthand for \"Hypermedia As The Engine Of Application State\" (HATEOAS). +This means that each endpoint of this API will have links to other resources or actions defined in the resulting body. + +These related resources and actions for any given resource will be context sensitive. For example, only actions that the +authenticated user can take are being rendered. This can be used to dynamically identify actions that the user might take for any +given response. + +As an example, if you fetch a work package through the [Work Package endpoint](https://www.openproject.org/docs/api/endpoints/work-packages/), the `update` link will only +be present when the user you authenticated has been granted a permission to update the work package in the assigned project. + +## HAL+JSON + +HAL is a simple format that gives a consistent and easy way to hyperlink between resources in your API. +Read more in the following specification: [https://tools.ietf.org/html/draft-kelly-json-hal-08](https://tools.ietf.org/html/draft-kelly-json-hal-08) + +**OpenProject API implementation of HAL+JSON format** enriches JSON and introduces a few meta properties: + +- `_type` - specifies the type of the resource (e.g.: WorkPackage, Project) +- `_links` - contains all related resource and action links available for the resource +- `_embedded` - contains all embedded objects + +HAL does not guarantee that embedded resources are embedded in their full representation, they might as well be +partially represented (e.g. some properties can be left out). +However in this API you have the guarantee that whenever a resource is **embedded**, it is embedded in its **full representation**. + +## API response structure + +All API responses contain a single HAL+JSON object, even collections of objects are technically represented by +a single HAL+JSON object that itself contains its members. More details on collections can be found +in the [Collections Section](https://www.openproject.org/docs/api/collections/). + +## Authentication + +The API supports the following authentication schemes: OAuth2, session based authentication, and basic auth. + +Depending on the settings of the OpenProject instance many resources can be accessed without being authenticated. +In case the instance requires authentication on all requests the client will receive an **HTTP 401** status code +in response to any request. + +Otherwise unauthenticated clients have all the permissions of the anonymous user. + +### Session-based Authentication + +This means you have to login to OpenProject via the Web-Interface to be authenticated in the API. +This method is well-suited for clients acting within the browser, like the Angular-Client built into OpenProject. + +In this case, you always need to pass the HTTP header `X-Requested-With \"XMLHttpRequest\"` for authentication. + +### API Key through Basic Auth + +Users can authenticate towards the API v3 using basic auth with the user name `apikey` (NOT your login) and the API key as the password. +Users can find their API key on their account page. + +Example: + +```shell +API_KEY=2519132cdf62dcf5a66fd96394672079f9e9cad1 +curl -u apikey:$API_KEY https://community.openproject.com/api/v3/users/42 +``` + +### OAuth2.0 authentication + +OpenProject allows authentication and authorization with OAuth2 with *Authorization code flow*, as well as *Client credentials* operation modes. + +To get started, you first need to register an application in the OpenProject OAuth administration section of your installation. +This will save an entry for your application with a client unique identifier (`client_id`) and an accompanying secret key (`client_secret`). + +You can then use one the following guides to perform the supported OAuth 2.0 flows: + +- [Authorization code flow](https://oauth.net/2/grant-types/authorization-code) + +- [Authorization code flow with PKCE](https://doorkeeper.gitbook.io/guides/ruby-on-rails/pkce-flow), recommended for clients unable to keep the client_secret confidential. + +- [Client credentials](https://oauth.net/2/grant-types/client-credentials/) - Requires an application to be bound to an impersonating user for non-public access + +### Why not username and password? + +The simplest way to do basic auth would be to use a user's username and password naturally. +However, OpenProject already has supported API keys in the past for the API v2, though not through basic auth. + +Using **username and password** directly would have some advantages: + +* It is intuitive for the user who then just has to provide those just as they would when logging into OpenProject. + +* No extra logic for token management necessary. + +On the other hand using **API keys** has some advantages too, which is why we went for that: + +* If compromised while saved on an insecure client the user only has to regenerate the API key instead of changing their password, too. + +* They are naturally long and random which makes them invulnerable to dictionary attacks and harder to crack in general. + +Most importantly users may not actually have a password to begin with. Specifically when they have registered +through an OpenID Connect provider. + +## Cross-Origin Resource Sharing (CORS) + +By default, the OpenProject API is _not_ responding with any CORS headers. +If you want to allow cross-domain AJAX calls against your OpenProject instance, you need to enable CORS headers being returned. + +Please see [our API settings documentation](https://www.openproject.org/docs/system-admin-guide/api-and-webhooks/) on +how to selectively enable CORS. + +## Allowed HTTP methods + +- `GET` - Get a single resource or collection of resources + +- `POST` - Create a new resource or perform + +- `PATCH` - Update a resource + +- `DELETE` - Delete a resource + +## Compression + +Responses are compressed if requested by the client. Currently [gzip](https://www.gzip.org/) and [deflate](https://tools.ietf.org/html/rfc1951) +are supported. The client signals the desired compression by setting the [`Accept-Encoding` header](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3). +If no `Accept-Encoding` header is send, `Accept-Encoding: identity` is assumed which will result in the API responding uncompressed. + +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 3 +- Build package: org.openapitools.codegen.languages.DartClientCodegen + +## Requirements + +Dart 2.12 or later + +## Installation & Usage + +### Github +If this Dart package is published to Github, add the following dependency to your pubspec.yaml +``` +dependencies: + openapi: + git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` + +### Local +To use the package in your local drive, add the following dependency to your pubspec.yaml +``` +dependencies: + openapi: + path: /path/to/openapi +``` + +## Tests + +TODO + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```dart +import 'package:openapi/api.dart'; + +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ActionsCapabilitiesApi(); +final filters = [{ "id": { "operator": "=", "values": ["memberships/create"] }" }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Returns only the action having the id or all actions except those having the id(s). +final sortBy = [["id", "asc"]]; // String | JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + *No sort supported yet* + +try { + final result = api_instance.listActions(filters, sortBy); + print(result); +} catch (e) { + print('Exception when calling ActionsCapabilitiesApi->listActions: $e\n'); +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://community.openproject.org* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ActionsCapabilitiesApi* | [**listActions**](doc//ActionsCapabilitiesApi.md#listactions) | **GET** /api/v3/actions | List actions +*ActionsCapabilitiesApi* | [**listCapabilities**](doc//ActionsCapabilitiesApi.md#listcapabilities) | **GET** /api/v3/capabilities | List capabilities +*ActionsCapabilitiesApi* | [**viewAction**](doc//ActionsCapabilitiesApi.md#viewaction) | **GET** /api/v3/actions/{id} | View action +*ActionsCapabilitiesApi* | [**viewCapabilities**](doc//ActionsCapabilitiesApi.md#viewcapabilities) | **GET** /api/v3/capabilities/{id} | View capabilities +*ActionsCapabilitiesApi* | [**viewGlobalContext**](doc//ActionsCapabilitiesApi.md#viewglobalcontext) | **GET** /api/v3/capabilities/context/global | View global context +*ActivitiesApi* | [**updateActivity**](doc//ActivitiesApi.md#updateactivity) | **PATCH** /api/v3/activities/{id} | Update activity +*ActivitiesApi* | [**viewActivity**](doc//ActivitiesApi.md#viewactivity) | **GET** /api/v3/activities/{id} | View activity +*AttachmentsApi* | [**addAttachmentToPost**](doc//AttachmentsApi.md#addattachmenttopost) | **POST** /api/v3/posts/{id}/attachments | Add attachment to post +*AttachmentsApi* | [**addAttachmentToWikiPage**](doc//AttachmentsApi.md#addattachmenttowikipage) | **POST** /api/v3/wiki_pages/{id}/attachments | Add attachment to wiki page +*AttachmentsApi* | [**createAttachment**](doc//AttachmentsApi.md#createattachment) | **POST** /api/v3/attachments | Create Attachment +*AttachmentsApi* | [**createWorkPackageAttachment**](doc//AttachmentsApi.md#createworkpackageattachment) | **POST** /api/v3/work_packages/{id}/attachments | Create work package attachment +*AttachmentsApi* | [**deleteAttachment**](doc//AttachmentsApi.md#deleteattachment) | **DELETE** /api/v3/attachments/{id} | Delete attachment +*AttachmentsApi* | [**listAttachmentsByPost**](doc//AttachmentsApi.md#listattachmentsbypost) | **GET** /api/v3/posts/{id}/attachments | List attachments by post +*AttachmentsApi* | [**listAttachmentsByWikiPage**](doc//AttachmentsApi.md#listattachmentsbywikipage) | **GET** /api/v3/wiki_pages/{id}/attachments | List attachments by wiki page +*AttachmentsApi* | [**listWorkPackageAttachments**](doc//AttachmentsApi.md#listworkpackageattachments) | **GET** /api/v3/work_packages/{id}/attachments | List attachments by work package +*AttachmentsApi* | [**viewAttachment**](doc//AttachmentsApi.md#viewattachment) | **GET** /api/v3/attachments/{id} | View attachment +*BudgetsApi* | [**viewBudget**](doc//BudgetsApi.md#viewbudget) | **GET** /api/v3/budgets/{id} | view Budget +*BudgetsApi* | [**viewBudgetsOfAProject**](doc//BudgetsApi.md#viewbudgetsofaproject) | **GET** /api/v3/projects/{id}/budgets | view Budgets of a Project +*CategoriesApi* | [**listCategoriesOfAProject**](doc//CategoriesApi.md#listcategoriesofaproject) | **GET** /api/v3/projects/{id}/categories | List categories of a project +*CategoriesApi* | [**viewCategory**](doc//CategoriesApi.md#viewcategory) | **GET** /api/v3/categories/{id} | View Category +*CollectionsApi* | [**viewAggregatedResult**](doc//CollectionsApi.md#viewaggregatedresult) | **GET** /api/v3/examples | view aggregated result +*ConfigurationApi* | [**viewConfiguration**](doc//ConfigurationApi.md#viewconfiguration) | **GET** /api/v3/configuration | View configuration +*CustomActionsApi* | [**executeCustomAction**](doc//CustomActionsApi.md#executecustomaction) | **POST** /api/v3/custom_actions/{id}/execute | Execute custom action +*CustomActionsApi* | [**getCustomAction**](doc//CustomActionsApi.md#getcustomaction) | **GET** /api/v3/custom_actions/{id} | Get a custom action +*CustomOptionsApi* | [**viewCustomOption**](doc//CustomOptionsApi.md#viewcustomoption) | **GET** /api/v3/custom_options/{id} | View Custom Option +*DocumentsApi* | [**listDocuments**](doc//DocumentsApi.md#listdocuments) | **GET** /api/v3/documents | List Documents +*DocumentsApi* | [**viewDocument**](doc//DocumentsApi.md#viewdocument) | **GET** /api/v3/documents/{id} | View document +*FileLinksApi* | [**createStorage**](doc//FileLinksApi.md#createstorage) | **POST** /api/v3/storages | Creates a storage. +*FileLinksApi* | [**createStorageOauthCredentials**](doc//FileLinksApi.md#createstorageoauthcredentials) | **POST** /api/v3/storages/{id}/oauth_client_credentials | Creates an oauth client credentials object for a storage. +*FileLinksApi* | [**createWorkPackageFileLink**](doc//FileLinksApi.md#createworkpackagefilelink) | **POST** /api/v3/work_packages/{id}/file_links | Creates file links. +*FileLinksApi* | [**deleteFileLink**](doc//FileLinksApi.md#deletefilelink) | **DELETE** /api/v3/file_links/{id} | Removes a file link. +*FileLinksApi* | [**deleteStorage**](doc//FileLinksApi.md#deletestorage) | **DELETE** /api/v3/storages/{id} | Delete a storage +*FileLinksApi* | [**downloadFileLink**](doc//FileLinksApi.md#downloadfilelink) | **GET** /api/v3/file_links/{id}/download | Creates a download uri of the linked file. +*FileLinksApi* | [**getProjectStorage**](doc//FileLinksApi.md#getprojectstorage) | **GET** /api/v3/project_storages/{id} | Gets a project storage +*FileLinksApi* | [**getStorage**](doc//FileLinksApi.md#getstorage) | **GET** /api/v3/storages/{id} | Get a storage +*FileLinksApi* | [**getStorageFiles**](doc//FileLinksApi.md#getstoragefiles) | **GET** /api/v3/storages/{id}/files | Gets files of a storage. +*FileLinksApi* | [**listProjectStorages**](doc//FileLinksApi.md#listprojectstorages) | **GET** /api/v3/project_storages | Gets a list of project storages +*FileLinksApi* | [**listWorkPackageFileLinks**](doc//FileLinksApi.md#listworkpackagefilelinks) | **GET** /api/v3/work_packages/{id}/file_links | Gets all file links of a work package +*FileLinksApi* | [**openFileLink**](doc//FileLinksApi.md#openfilelink) | **GET** /api/v3/file_links/{id}/open | Creates an opening uri of the linked file. +*FileLinksApi* | [**prepareStorageFileUpload**](doc//FileLinksApi.md#preparestoragefileupload) | **POST** /api/v3/storages/{id}/files/prepare_upload | Preparation of a direct upload of a file to the given storage. +*FileLinksApi* | [**updateStorage**](doc//FileLinksApi.md#updatestorage) | **PATCH** /api/v3/storages/{id} | Update a storage +*FileLinksApi* | [**viewFileLink**](doc//FileLinksApi.md#viewfilelink) | **GET** /api/v3/file_links/{id} | Gets a file link. +*FormsApi* | [**showOrValidateForm**](doc//FormsApi.md#showorvalidateform) | **POST** /api/v3/example/form | show or validate form +*GridsApi* | [**createGrid**](doc//GridsApi.md#creategrid) | **POST** /api/v3/grids | Create a grid +*GridsApi* | [**getGrid**](doc//GridsApi.md#getgrid) | **GET** /api/v3/grids/{id} | Get a grid +*GridsApi* | [**gridCreateForm**](doc//GridsApi.md#gridcreateform) | **POST** /api/v3/grids/form | Grid Create Form +*GridsApi* | [**gridUpdateForm**](doc//GridsApi.md#gridupdateform) | **POST** /api/v3/grids/{id}/form | Grid Update Form +*GridsApi* | [**listGrids**](doc//GridsApi.md#listgrids) | **GET** /api/v3/grids | List grids +*GridsApi* | [**updateGrid**](doc//GridsApi.md#updategrid) | **PATCH** /api/v3/grids/{id} | Update a grid +*GroupsApi* | [**createGroup**](doc//GroupsApi.md#creategroup) | **POST** /api/v3/groups | Create group +*GroupsApi* | [**deleteGroup**](doc//GroupsApi.md#deletegroup) | **DELETE** /api/v3/groups/{id} | Delete group +*GroupsApi* | [**getGroup**](doc//GroupsApi.md#getgroup) | **GET** /api/v3/groups/{id} | Get group +*GroupsApi* | [**listGroups**](doc//GroupsApi.md#listgroups) | **GET** /api/v3/groups | List groups +*GroupsApi* | [**updateGroup**](doc//GroupsApi.md#updategroup) | **PATCH** /api/v3/groups/{id} | Update group +*HelpTextsApi* | [**getHelpText**](doc//HelpTextsApi.md#gethelptext) | **GET** /api/v3/help_texts/{id} | Get help text +*HelpTextsApi* | [**listHelpTexts**](doc//HelpTextsApi.md#listhelptexts) | **GET** /api/v3/help_texts | List help texts +*MembershipsApi* | [**availableProjectsForMemberships**](doc//MembershipsApi.md#availableprojectsformemberships) | **GET** /api/v3/memberships/available_projects | Available projects for memberships +*MembershipsApi* | [**createMembership**](doc//MembershipsApi.md#createmembership) | **POST** /api/v3/memberships | Create membership +*MembershipsApi* | [**deleteMembership**](doc//MembershipsApi.md#deletemembership) | **DELETE** /api/v3/memberships/{id} | Delete membership +*MembershipsApi* | [**listMemberships**](doc//MembershipsApi.md#listmemberships) | **GET** /api/v3/memberships | List memberships +*MembershipsApi* | [**membershipCreateForm**](doc//MembershipsApi.md#membershipcreateform) | **POST** /api/v3/memberships/form | Membership create form +*MembershipsApi* | [**membershipUpdateForm**](doc//MembershipsApi.md#membershipupdateform) | **POST** /api/v3/memberships/{id}/form | Membership update form +*MembershipsApi* | [**updateMembership**](doc//MembershipsApi.md#updatemembership) | **PATCH** /api/v3/memberships/{id} | Update membership +*MembershipsApi* | [**viewMembership**](doc//MembershipsApi.md#viewmembership) | **GET** /api/v3/memberships/{id} | View membership +*MembershipsApi* | [**viewMembershipSchema**](doc//MembershipsApi.md#viewmembershipschema) | **GET** /api/v3/memberships/schema | View membership schema +*NewsApi* | [**listNews**](doc//NewsApi.md#listnews) | **GET** /api/v3/news | List News +*NewsApi* | [**viewNews**](doc//NewsApi.md#viewnews) | **GET** /api/v3/news/{id} | View news +*NotificationsApi* | [**listNotifications**](doc//NotificationsApi.md#listnotifications) | **GET** /api/v3/notifications | Get notification collection +*NotificationsApi* | [**readNotification**](doc//NotificationsApi.md#readnotification) | **POST** /api/v3/notifications/{id}/read_ian | Read notification +*NotificationsApi* | [**readNotifications**](doc//NotificationsApi.md#readnotifications) | **POST** /api/v3/notifications/read_ian | Read all notifications +*NotificationsApi* | [**unreadNotification**](doc//NotificationsApi.md#unreadnotification) | **POST** /api/v3/notifications/{id}/unread_ian | Unread notification +*NotificationsApi* | [**unreadNotifications**](doc//NotificationsApi.md#unreadnotifications) | **POST** /api/v3/notifications/unread_ian | Unread all notifications +*NotificationsApi* | [**viewNotification**](doc//NotificationsApi.md#viewnotification) | **GET** /api/v3/notifications/{id} | Get the notification +*NotificationsApi* | [**viewNotificationDetail**](doc//NotificationsApi.md#viewnotificationdetail) | **GET** /api/v3/notifications/{notification_id}/details/{id} | Get a notification detail +*OAuth2Api* | [**getOauthApplication**](doc//OAuth2Api.md#getoauthapplication) | **GET** /api/v3/oauth_applications/{id} | Get the oauth application. +*OAuth2Api* | [**getOauthClientCredentials**](doc//OAuth2Api.md#getoauthclientcredentials) | **GET** /api/v3/oauth_client_credentials/{id} | Get the oauth client credentials object. +*PostsApi* | [**viewPost**](doc//PostsApi.md#viewpost) | **GET** /api/v3/posts/{id} | View Post +*PreviewingApi* | [**previewMarkdownDocument**](doc//PreviewingApi.md#previewmarkdowndocument) | **POST** /api/v3/render/markdown | Preview Markdown document +*PreviewingApi* | [**previewPlainDocument**](doc//PreviewingApi.md#previewplaindocument) | **POST** /api/v3/render/plain | Preview plain document +*PrincipalsApi* | [**listPrincipals**](doc//PrincipalsApi.md#listprincipals) | **GET** /api/v3/principals | List principals +*PrioritiesApi* | [**listAllPriorities**](doc//PrioritiesApi.md#listallpriorities) | **GET** /api/v3/priorities | List all Priorities +*PrioritiesApi* | [**viewPriority**](doc//PrioritiesApi.md#viewpriority) | **GET** /api/v3/priorities/{id} | View Priority +*ProjectsApi* | [**createProject**](doc//ProjectsApi.md#createproject) | **POST** /api/v3/projects | Create project +*ProjectsApi* | [**createProjectCopy**](doc//ProjectsApi.md#createprojectcopy) | **POST** /api/v3/projects/{id}/copy | Create project copy +*ProjectsApi* | [**deleteProject**](doc//ProjectsApi.md#deleteproject) | **DELETE** /api/v3/projects/{id} | Delete Project +*ProjectsApi* | [**listAvailableParentProjectCandidates**](doc//ProjectsApi.md#listavailableparentprojectcandidates) | **GET** /api/v3/projects/available_parent_projects | List available parent project candidates +*ProjectsApi* | [**listProjects**](doc//ProjectsApi.md#listprojects) | **GET** /api/v3/projects | List projects +*ProjectsApi* | [**listProjectsWithVersion**](doc//ProjectsApi.md#listprojectswithversion) | **GET** /api/v3/versions/{id}/projects | List projects having version +*ProjectsApi* | [**projectCopyForm**](doc//ProjectsApi.md#projectcopyform) | **POST** /api/v3/projects/{id}/copy/form | Project copy form +*ProjectsApi* | [**projectCreateForm**](doc//ProjectsApi.md#projectcreateform) | **POST** /api/v3/projects/form | Project create form +*ProjectsApi* | [**projectUpdateForm**](doc//ProjectsApi.md#projectupdateform) | **POST** /api/v3/projects/{id}/form | Project update form +*ProjectsApi* | [**updateProject**](doc//ProjectsApi.md#updateproject) | **PATCH** /api/v3/projects/{id} | Update Project +*ProjectsApi* | [**viewProject**](doc//ProjectsApi.md#viewproject) | **GET** /api/v3/projects/{id} | View project +*ProjectsApi* | [**viewProjectSchema**](doc//ProjectsApi.md#viewprojectschema) | **GET** /api/v3/projects/schema | View project schema +*ProjectsApi* | [**viewProjectStatus**](doc//ProjectsApi.md#viewprojectstatus) | **GET** /api/v3/project_statuses/{id} | View project status +*QueriesApi* | [**availableProjectsForQuery**](doc//QueriesApi.md#availableprojectsforquery) | **GET** /api/v3/queries/available_projects | Available projects for query +*QueriesApi* | [**createQuery**](doc//QueriesApi.md#createquery) | **POST** /api/v3/queries | Create query +*QueriesApi* | [**deleteQuery**](doc//QueriesApi.md#deletequery) | **DELETE** /api/v3/queries/{id} | Delete query +*QueriesApi* | [**editQuery**](doc//QueriesApi.md#editquery) | **PATCH** /api/v3/queries/{id} | Edit Query +*QueriesApi* | [**listQueries**](doc//QueriesApi.md#listqueries) | **GET** /api/v3/queries | List queries +*QueriesApi* | [**queryCreateForm**](doc//QueriesApi.md#querycreateform) | **POST** /api/v3/queries/form | Query Create Form +*QueriesApi* | [**queryUpdateForm**](doc//QueriesApi.md#queryupdateform) | **POST** /api/v3/queries/{id}/form | Query Update Form +*QueriesApi* | [**starQuery**](doc//QueriesApi.md#starquery) | **PATCH** /api/v3/queries/{id}/star | Star query +*QueriesApi* | [**unstarQuery**](doc//QueriesApi.md#unstarquery) | **PATCH** /api/v3/queries/{id}/unstar | Unstar query +*QueriesApi* | [**viewDefaultQuery**](doc//QueriesApi.md#viewdefaultquery) | **GET** /api/v3/queries/default | View default query +*QueriesApi* | [**viewDefaultQueryForProject**](doc//QueriesApi.md#viewdefaultqueryforproject) | **GET** /api/v3/projects/{id}/queries/default | View default query for project +*QueriesApi* | [**viewQuery**](doc//QueriesApi.md#viewquery) | **GET** /api/v3/queries/{id} | View query +*QueriesApi* | [**viewSchemaForGlobalQueries**](doc//QueriesApi.md#viewschemaforglobalqueries) | **GET** /api/v3/queries/schema | View schema for global queries +*QueriesApi* | [**viewSchemaForProjectQueries**](doc//QueriesApi.md#viewschemaforprojectqueries) | **GET** /api/v3/projects/{id}/queries/schema | View schema for project queries +*QueryColumnsApi* | [**viewQueryColumn**](doc//QueryColumnsApi.md#viewquerycolumn) | **GET** /api/v3/queries/columns/{id} | View Query Column +*QueryFilterInstanceSchemaApi* | [**listQueryFilterInstanceSchemas**](doc//QueryFilterInstanceSchemaApi.md#listqueryfilterinstanceschemas) | **GET** /api/v3/queries/filter_instance_schemas | List Query Filter Instance Schemas +*QueryFilterInstanceSchemaApi* | [**listQueryFilterInstanceSchemasForProject**](doc//QueryFilterInstanceSchemaApi.md#listqueryfilterinstanceschemasforproject) | **GET** /api/v3/projects/{id}/queries/filter_instance_schemas | List Query Filter Instance Schemas for Project +*QueryFilterInstanceSchemaApi* | [**viewQueryFilterInstanceSchema**](doc//QueryFilterInstanceSchemaApi.md#viewqueryfilterinstanceschema) | **GET** /api/v3/queries/filter_instance_schemas/{id} | View Query Filter Instance Schema +*QueryFiltersApi* | [**viewQueryFilter**](doc//QueryFiltersApi.md#viewqueryfilter) | **GET** /api/v3/queries/filters/{id} | View Query Filter +*QueryOperatorsApi* | [**viewQueryOperator**](doc//QueryOperatorsApi.md#viewqueryoperator) | **GET** /api/v3/queries/operators/{id} | View Query Operator +*QuerySortBysApi* | [**viewQuerySortBy**](doc//QuerySortBysApi.md#viewquerysortby) | **GET** /api/v3/queries/sort_bys/{id} | View Query Sort By +*RelationsApi* | [**deleteRelation**](doc//RelationsApi.md#deleterelation) | **DELETE** /api/v3/relations/{id} | Delete Relation +*RelationsApi* | [**editRelation**](doc//RelationsApi.md#editrelation) | **PATCH** /api/v3/relations/{id} | Edit Relation +*RelationsApi* | [**listRelations**](doc//RelationsApi.md#listrelations) | **GET** /api/v3/relations | List Relations +*RelationsApi* | [**relationEditForm**](doc//RelationsApi.md#relationeditform) | **POST** /api/v3/relations/{id}/form | Relation edit form +*RelationsApi* | [**viewRelation**](doc//RelationsApi.md#viewrelation) | **GET** /api/v3/relations/{id} | View Relation +*RelationsApi* | [**viewRelationSchema**](doc//RelationsApi.md#viewrelationschema) | **GET** /api/v3/relations/schema | View relation schema +*RelationsApi* | [**viewRelationSchemaForType**](doc//RelationsApi.md#viewrelationschemafortype) | **GET** /api/v3/relations/schema/{type} | View relation schema for type +*RevisionsApi* | [**viewRevision**](doc//RevisionsApi.md#viewrevision) | **GET** /api/v3/revisions/{id} | View revision +*RolesApi* | [**listRoles**](doc//RolesApi.md#listroles) | **GET** /api/v3/roles | List roles +*RolesApi* | [**viewRole**](doc//RolesApi.md#viewrole) | **GET** /api/v3/roles/{id} | View role +*RootApi* | [**viewRoot**](doc//RootApi.md#viewroot) | **GET** /api/v3 | View root +*SchemasApi* | [**viewTheSchema**](doc//SchemasApi.md#viewtheschema) | **GET** /api/v3/example/schema | view the schema +*StatusesApi* | [**listAllStatuses**](doc//StatusesApi.md#listallstatuses) | **GET** /api/v3/statuses | List all Statuses +*StatusesApi* | [**viewStatus**](doc//StatusesApi.md#viewstatus) | **GET** /api/v3/statuses/{id} | View Status +*TimeEntriesApi* | [**availableProjectsForTimeEntries**](doc//TimeEntriesApi.md#availableprojectsfortimeentries) | **GET** /api/v3/time_entries/available_projects | Available projects for time entries +*TimeEntriesApi* | [**createTimeEntry**](doc//TimeEntriesApi.md#createtimeentry) | **POST** /api/v3/time_entries | Create time entry +*TimeEntriesApi* | [**deleteTimeEntry**](doc//TimeEntriesApi.md#deletetimeentry) | **DELETE** /api/v3/time_entries/{id} | Delete time entry +*TimeEntriesApi* | [**getTimeEntry**](doc//TimeEntriesApi.md#gettimeentry) | **GET** /api/v3/time_entries/{id} | Get time entry +*TimeEntriesApi* | [**listTimeEntries**](doc//TimeEntriesApi.md#listtimeentries) | **GET** /api/v3/time_entries | List time entries +*TimeEntriesApi* | [**timeEntryCreateForm**](doc//TimeEntriesApi.md#timeentrycreateform) | **POST** /api/v3/time_entries/form | Time entry create form +*TimeEntriesApi* | [**timeEntryUpdateForm**](doc//TimeEntriesApi.md#timeentryupdateform) | **POST** /api/v3/time_entries/{id}/form | Time entry update form +*TimeEntriesApi* | [**updateTimeEntry**](doc//TimeEntriesApi.md#updatetimeentry) | **PATCH** /api/v3/time_entries/{id} | update time entry +*TimeEntriesApi* | [**viewTimeEntrySchema**](doc//TimeEntriesApi.md#viewtimeentryschema) | **GET** /api/v3/time_entries/schema | View time entry schema +*TimeEntryActivitiesApi* | [**getTimeEntriesActivity**](doc//TimeEntryActivitiesApi.md#gettimeentriesactivity) | **GET** /api/v3/time_entries/activity/{id} | View time entries activity +*TypesApi* | [**listAllTypes**](doc//TypesApi.md#listalltypes) | **GET** /api/v3/types | List all Types +*TypesApi* | [**listTypesAvailableInAProject**](doc//TypesApi.md#listtypesavailableinaproject) | **GET** /api/v3/projects/{id}/types | List types available in a project +*TypesApi* | [**viewType**](doc//TypesApi.md#viewtype) | **GET** /api/v3/types/{id} | View Type +*UserPreferencesApi* | [**showMyPreferences**](doc//UserPreferencesApi.md#showmypreferences) | **GET** /api/v3/my_preferences | Show my preferences +*UserPreferencesApi* | [**updateUserPreferences**](doc//UserPreferencesApi.md#updateuserpreferences) | **PATCH** /api/v3/my_preferences | Update my preferences +*UsersApi* | [**createUser**](doc//UsersApi.md#createuser) | **POST** /api/v3/users | Create User +*UsersApi* | [**deleteUser**](doc//UsersApi.md#deleteuser) | **DELETE** /api/v3/users/{id} | Delete user +*UsersApi* | [**listUsers**](doc//UsersApi.md#listusers) | **GET** /api/v3/users | List Users +*UsersApi* | [**lockUser**](doc//UsersApi.md#lockuser) | **POST** /api/v3/users/{id}/lock | Lock user +*UsersApi* | [**unlockUser**](doc//UsersApi.md#unlockuser) | **DELETE** /api/v3/users/{id}/lock | Unlock user +*UsersApi* | [**updateUser**](doc//UsersApi.md#updateuser) | **PATCH** /api/v3/users/{id} | Update user +*UsersApi* | [**userUpdateForm**](doc//UsersApi.md#userupdateform) | **POST** /api/v3/users/{id}/form | User update form +*UsersApi* | [**viewUser**](doc//UsersApi.md#viewuser) | **GET** /api/v3/users/{id} | View user +*UsersApi* | [**viewUserSchema**](doc//UsersApi.md#viewuserschema) | **GET** /api/v3/users/schema | View user schema +*ValuesPropertyApi* | [**viewNotificationDetail**](doc//ValuesPropertyApi.md#viewnotificationdetail) | **GET** /api/v3/notifications/{notification_id}/details/{id} | Get a notification detail +*ValuesPropertyApi* | [**viewValuesSchema**](doc//ValuesPropertyApi.md#viewvaluesschema) | **GET** /api/v3/values/schema/{id} | View Values schema +*VersionsApi* | [**availableProjectsForVersions**](doc//VersionsApi.md#availableprojectsforversions) | **GET** /api/v3/versions/available_projects | Available projects for versions +*VersionsApi* | [**createVersion**](doc//VersionsApi.md#createversion) | **POST** /api/v3/versions | Create version +*VersionsApi* | [**deleteVersion**](doc//VersionsApi.md#deleteversion) | **DELETE** /api/v3/versions/{id} | Delete version +*VersionsApi* | [**listVersions**](doc//VersionsApi.md#listversions) | **GET** /api/v3/versions | List versions +*VersionsApi* | [**listVersionsAvailableInAProject**](doc//VersionsApi.md#listversionsavailableinaproject) | **GET** /api/v3/projects/{id}/versions | List versions available in a project +*VersionsApi* | [**updateVersion**](doc//VersionsApi.md#updateversion) | **PATCH** /api/v3/versions/{id} | Update Version +*VersionsApi* | [**versionCreateForm**](doc//VersionsApi.md#versioncreateform) | **POST** /api/v3/versions/form | Version create form +*VersionsApi* | [**versionUpdateForm**](doc//VersionsApi.md#versionupdateform) | **POST** /api/v3/versions/{id}/form | Version update form +*VersionsApi* | [**viewVersion**](doc//VersionsApi.md#viewversion) | **GET** /api/v3/versions/{id} | View version +*VersionsApi* | [**viewVersionSchema**](doc//VersionsApi.md#viewversionschema) | **GET** /api/v3/versions/schema | View version schema +*ViewsApi* | [**createViews**](doc//ViewsApi.md#createviews) | **POST** /api/v3/views/{id} | Create view +*ViewsApi* | [**listViews**](doc//ViewsApi.md#listviews) | **GET** /api/v3/views | List views +*ViewsApi* | [**viewView**](doc//ViewsApi.md#viewview) | **GET** /api/v3/views/{id} | View view +*WikiPagesApi* | [**viewWikiPage**](doc//WikiPagesApi.md#viewwikipage) | **GET** /api/v3/wiki_pages/{id} | View Wiki Page +*WorkPackagesApi* | [**addWatcher**](doc//WorkPackagesApi.md#addwatcher) | **POST** /api/v3/work_packages/{id}/watchers | Add watcher +*WorkPackagesApi* | [**availableAssignees**](doc//WorkPackagesApi.md#availableassignees) | **GET** /api/v3/projects/{id}/available_assignees | Available assignees +*WorkPackagesApi* | [**availableProjectsForWorkPackage**](doc//WorkPackagesApi.md#availableprojectsforworkpackage) | **GET** /api/v3/work_packages/{id}/available_projects | Available projects for work package +*WorkPackagesApi* | [**availableResponsibles**](doc//WorkPackagesApi.md#availableresponsibles) | **GET** /api/v3/projects/{id}/available_responsibles | Available responsibles +*WorkPackagesApi* | [**availableWatchers**](doc//WorkPackagesApi.md#availablewatchers) | **GET** /api/v3/work_packages/{id}/available_watchers | Available watchers +*WorkPackagesApi* | [**commentWorkPackage**](doc//WorkPackagesApi.md#commentworkpackage) | **POST** /api/v3/work_packages/{id}/activities | Comment work package +*WorkPackagesApi* | [**createProjectWorkPackage**](doc//WorkPackagesApi.md#createprojectworkpackage) | **POST** /api/v3/projects/{id}/work_packages | Create work package in project +*WorkPackagesApi* | [**createRelation**](doc//WorkPackagesApi.md#createrelation) | **POST** /api/v3/work_packages/{id}/relations | Create Relation +*WorkPackagesApi* | [**createWorkPackage**](doc//WorkPackagesApi.md#createworkpackage) | **POST** /api/v3/work_packages | Create Work Package +*WorkPackagesApi* | [**createWorkPackageFileLink**](doc//WorkPackagesApi.md#createworkpackagefilelink) | **POST** /api/v3/work_packages/{id}/file_links | Creates file links. +*WorkPackagesApi* | [**deleteWorkPackage**](doc//WorkPackagesApi.md#deleteworkpackage) | **DELETE** /api/v3/work_packages/{id} | Delete Work Package +*WorkPackagesApi* | [**getProjectWorkPackageCollection**](doc//WorkPackagesApi.md#getprojectworkpackagecollection) | **GET** /api/v3/projects/{id}/work_packages | Get work packages of project +*WorkPackagesApi* | [**listAvailableRelationCandidates**](doc//WorkPackagesApi.md#listavailablerelationcandidates) | **GET** /api/v3/work_packages/{id}/available_relation_candidates | Available relation candidates +*WorkPackagesApi* | [**listRelations**](doc//WorkPackagesApi.md#listrelations) | **GET** /api/v3/work_packages/{id}/relations | List relations +*WorkPackagesApi* | [**listWatchers**](doc//WorkPackagesApi.md#listwatchers) | **GET** /api/v3/work_packages/{id}/watchers | List watchers +*WorkPackagesApi* | [**listWorkPackageActivities**](doc//WorkPackagesApi.md#listworkpackageactivities) | **GET** /api/v3/work_packages/{id}/activities | List work package activities +*WorkPackagesApi* | [**listWorkPackageFileLinks**](doc//WorkPackagesApi.md#listworkpackagefilelinks) | **GET** /api/v3/work_packages/{id}/file_links | Gets all file links of a work package +*WorkPackagesApi* | [**listWorkPackageSchemas**](doc//WorkPackagesApi.md#listworkpackageschemas) | **GET** /api/v3/work_packages/schemas | List Work Package Schemas +*WorkPackagesApi* | [**listWorkPackages**](doc//WorkPackagesApi.md#listworkpackages) | **GET** /api/v3/work_packages | List work packages +*WorkPackagesApi* | [**removeWatcher**](doc//WorkPackagesApi.md#removewatcher) | **DELETE** /api/v3/work_packages/{id}/watchers/{user_id} | Remove watcher +*WorkPackagesApi* | [**revisions**](doc//WorkPackagesApi.md#revisions) | **GET** /api/v3/work_packages/{id}/revisions | Revisions +*WorkPackagesApi* | [**updateWorkPackage**](doc//WorkPackagesApi.md#updateworkpackage) | **PATCH** /api/v3/work_packages/{id} | Update a Work Package +*WorkPackagesApi* | [**viewWorkPackage**](doc//WorkPackagesApi.md#viewworkpackage) | **GET** /api/v3/work_packages/{id} | View Work Package +*WorkPackagesApi* | [**viewWorkPackageSchema**](doc//WorkPackagesApi.md#viewworkpackageschema) | **GET** /api/v3/work_packages/schemas/{identifier} | View Work Package Schema +*WorkPackagesApi* | [**workPackageCreateForm**](doc//WorkPackagesApi.md#workpackagecreateform) | **POST** /api/v3/work_packages/form | Work Package Create Form +*WorkPackagesApi* | [**workPackageCreateFormForProject**](doc//WorkPackagesApi.md#workpackagecreateformforproject) | **POST** /api/v3/projects/{id}/work_packages/form | Work Package Create Form For Project +*WorkPackagesApi* | [**workPackageEditForm**](doc//WorkPackagesApi.md#workpackageeditform) | **POST** /api/v3/work_packages/{id}/form | Work Package Edit Form +*WorkScheduleApi* | [**createNonWorkingDay**](doc//WorkScheduleApi.md#createnonworkingday) | **POST** /api/v3/days/non_working | Creates a non-working day (NOT IMPLEMENTED) +*WorkScheduleApi* | [**deleteNonWorkingDay**](doc//WorkScheduleApi.md#deletenonworkingday) | **DELETE** /api/v3/days/non_working/{date} | Removes a non-working day (NOT IMPLEMENTED) +*WorkScheduleApi* | [**listDays**](doc//WorkScheduleApi.md#listdays) | **GET** /api/v3/days | Lists days +*WorkScheduleApi* | [**listNonWorkingDays**](doc//WorkScheduleApi.md#listnonworkingdays) | **GET** /api/v3/days/non_working | Lists all non working days +*WorkScheduleApi* | [**listWeekDays**](doc//WorkScheduleApi.md#listweekdays) | **GET** /api/v3/days/week | Lists week days +*WorkScheduleApi* | [**updateNonWorkingDay**](doc//WorkScheduleApi.md#updatenonworkingday) | **PATCH** /api/v3/days/non_working/{date} | Update a non-working day attributes (NOT IMPLEMENTED) +*WorkScheduleApi* | [**updateWeekDay**](doc//WorkScheduleApi.md#updateweekday) | **PATCH** /api/v3/days/week/{day} | Update a week day attributes (NOT IMPLEMENTED) +*WorkScheduleApi* | [**updateWeekDays**](doc//WorkScheduleApi.md#updateweekdays) | **PATCH** /api/v3/days/week | Update week days (NOT IMPLEMENTED) +*WorkScheduleApi* | [**viewDay**](doc//WorkScheduleApi.md#viewday) | **GET** /api/v3/days/{date} | View day +*WorkScheduleApi* | [**viewNonWorkingDay**](doc//WorkScheduleApi.md#viewnonworkingday) | **GET** /api/v3/days/non_working/{date} | View a non-working day +*WorkScheduleApi* | [**viewWeekDay**](doc//WorkScheduleApi.md#viewweekday) | **GET** /api/v3/days/week/{day} | View a week day + + +## Documentation For Models + + - [ActivityModel](doc//ActivityModel.md) + - [ActivityModelComment](doc//ActivityModelComment.md) + - [AddWatcherRequest](doc//AddWatcherRequest.md) + - [AttachmentModel](doc//AttachmentModel.md) + - [AttachmentModelDescription](doc//AttachmentModelDescription.md) + - [AttachmentModelLinks](doc//AttachmentModelLinks.md) + - [AttachmentModelLinksAuthor](doc//AttachmentModelLinksAuthor.md) + - [AttachmentModelLinksContainer](doc//AttachmentModelLinksContainer.md) + - [AttachmentModelLinksDelete](doc//AttachmentModelLinksDelete.md) + - [AttachmentModelLinksDownloadLocation](doc//AttachmentModelLinksDownloadLocation.md) + - [AttachmentModelLinksSelf](doc//AttachmentModelLinksSelf.md) + - [AttachmentsModel](doc//AttachmentsModel.md) + - [AttachmentsModelAllOfEmbedded](doc//AttachmentsModelAllOfEmbedded.md) + - [AttachmentsModelAllOfEmbeddedElementsInner](doc//AttachmentsModelAllOfEmbeddedElementsInner.md) + - [AttachmentsModelAllOfLinks](doc//AttachmentsModelAllOfLinks.md) + - [AttachmentsModelAllOfLinksSelf](doc//AttachmentsModelAllOfLinksSelf.md) + - [BudgetModel](doc//BudgetModel.md) + - [BudgetModelLinks](doc//BudgetModelLinks.md) + - [BudgetModelLinksSelf](doc//BudgetModelLinksSelf.md) + - [CategoryModel](doc//CategoryModel.md) + - [CategoryModelLinks](doc//CategoryModelLinks.md) + - [CategoryModelLinksDefaultAssignee](doc//CategoryModelLinksDefaultAssignee.md) + - [CategoryModelLinksProject](doc//CategoryModelLinksProject.md) + - [CategoryModelLinksSelf](doc//CategoryModelLinksSelf.md) + - [CollectionModel](doc//CollectionModel.md) + - [CollectionModelLinks](doc//CollectionModelLinks.md) + - [CollectionModelLinksSelf](doc//CollectionModelLinksSelf.md) + - [CommentWorkPackageRequest](doc//CommentWorkPackageRequest.md) + - [ConfigurationModel](doc//ConfigurationModel.md) + - [CreateViewsRequest](doc//CreateViewsRequest.md) + - [CreateViewsRequestLinks](doc//CreateViewsRequestLinks.md) + - [CreateViewsRequestLinksQuery](doc//CreateViewsRequestLinksQuery.md) + - [CustomActionModel](doc//CustomActionModel.md) + - [CustomActionModelLinks](doc//CustomActionModelLinks.md) + - [CustomActionModelLinksExecuteImmediately](doc//CustomActionModelLinksExecuteImmediately.md) + - [CustomActionModelLinksSelf](doc//CustomActionModelLinksSelf.md) + - [CustomOptionModel](doc//CustomOptionModel.md) + - [CustomOptionModelLinks](doc//CustomOptionModelLinks.md) + - [CustomOptionModelLinksSelf](doc//CustomOptionModelLinksSelf.md) + - [DayCollectionModel](doc//DayCollectionModel.md) + - [DayCollectionModelAllOfEmbedded](doc//DayCollectionModelAllOfEmbedded.md) + - [DayCollectionModelAllOfLinks](doc//DayCollectionModelAllOfLinks.md) + - [DayCollectionModelAllOfLinksSelf](doc//DayCollectionModelAllOfLinksSelf.md) + - [DayModel](doc//DayModel.md) + - [DayModelLinks](doc//DayModelLinks.md) + - [DayModelLinksWeekDay](doc//DayModelLinksWeekDay.md) + - [DocumentModel](doc//DocumentModel.md) + - [DocumentModelLinks](doc//DocumentModelLinks.md) + - [DocumentModelLinksAttachments](doc//DocumentModelLinksAttachments.md) + - [DocumentModelLinksProject](doc//DocumentModelLinksProject.md) + - [DocumentModelLinksSelf](doc//DocumentModelLinksSelf.md) + - [ErrorResponse](doc//ErrorResponse.md) + - [ErrorResponseEmbedded](doc//ErrorResponseEmbedded.md) + - [ErrorResponseEmbeddedDetails](doc//ErrorResponseEmbeddedDetails.md) + - [ExecuteCustomActionRequest](doc//ExecuteCustomActionRequest.md) + - [ExecuteCustomActionRequestLinks](doc//ExecuteCustomActionRequestLinks.md) + - [ExecuteCustomActionRequestLinksWorkPackage](doc//ExecuteCustomActionRequestLinksWorkPackage.md) + - [FileLinkCollectionReadModel](doc//FileLinkCollectionReadModel.md) + - [FileLinkCollectionReadModelAllOfEmbedded](doc//FileLinkCollectionReadModelAllOfEmbedded.md) + - [FileLinkCollectionReadModelAllOfLinks](doc//FileLinkCollectionReadModelAllOfLinks.md) + - [FileLinkCollectionReadModelAllOfLinksSelf](doc//FileLinkCollectionReadModelAllOfLinksSelf.md) + - [FileLinkCollectionWriteModel](doc//FileLinkCollectionWriteModel.md) + - [FileLinkCollectionWriteModelAllOfEmbedded](doc//FileLinkCollectionWriteModelAllOfEmbedded.md) + - [FileLinkOriginDataModel](doc//FileLinkOriginDataModel.md) + - [FileLinkReadModel](doc//FileLinkReadModel.md) + - [FileLinkReadModelEmbedded](doc//FileLinkReadModelEmbedded.md) + - [FileLinkReadModelLinks](doc//FileLinkReadModelLinks.md) + - [FileLinkReadModelLinksContainer](doc//FileLinkReadModelLinksContainer.md) + - [FileLinkReadModelLinksCreator](doc//FileLinkReadModelLinksCreator.md) + - [FileLinkReadModelLinksDelete](doc//FileLinkReadModelLinksDelete.md) + - [FileLinkReadModelLinksOriginOpen](doc//FileLinkReadModelLinksOriginOpen.md) + - [FileLinkReadModelLinksOriginOpenLocation](doc//FileLinkReadModelLinksOriginOpenLocation.md) + - [FileLinkReadModelLinksPermission](doc//FileLinkReadModelLinksPermission.md) + - [FileLinkReadModelLinksSelf](doc//FileLinkReadModelLinksSelf.md) + - [FileLinkReadModelLinksStaticOriginDownload](doc//FileLinkReadModelLinksStaticOriginDownload.md) + - [FileLinkReadModelLinksStaticOriginOpen](doc//FileLinkReadModelLinksStaticOriginOpen.md) + - [FileLinkReadModelLinksStaticOriginOpenLocation](doc//FileLinkReadModelLinksStaticOriginOpenLocation.md) + - [FileLinkReadModelLinksStorage](doc//FileLinkReadModelLinksStorage.md) + - [FileLinkWriteModel](doc//FileLinkWriteModel.md) + - [Formattable](doc//Formattable.md) + - [GridCollectionModel](doc//GridCollectionModel.md) + - [GridCollectionModelAllOfEmbedded](doc//GridCollectionModelAllOfEmbedded.md) + - [GridReadModel](doc//GridReadModel.md) + - [GridReadModelLinks](doc//GridReadModelLinks.md) + - [GridReadModelLinksAddAttachment](doc//GridReadModelLinksAddAttachment.md) + - [GridReadModelLinksAttachments](doc//GridReadModelLinksAttachments.md) + - [GridReadModelLinksDelete](doc//GridReadModelLinksDelete.md) + - [GridReadModelLinksScope](doc//GridReadModelLinksScope.md) + - [GridReadModelLinksSelf](doc//GridReadModelLinksSelf.md) + - [GridReadModelLinksUpdate](doc//GridReadModelLinksUpdate.md) + - [GridReadModelLinksUpdateImmediately](doc//GridReadModelLinksUpdateImmediately.md) + - [GridWidgetModel](doc//GridWidgetModel.md) + - [GridWriteModel](doc//GridWriteModel.md) + - [GridWriteModelLinks](doc//GridWriteModelLinks.md) + - [GroupCollectionModel](doc//GroupCollectionModel.md) + - [GroupCollectionModelAllOfEmbedded](doc//GroupCollectionModelAllOfEmbedded.md) + - [GroupCollectionModelAllOfLinks](doc//GroupCollectionModelAllOfLinks.md) + - [GroupCollectionModelAllOfLinksSelf](doc//GroupCollectionModelAllOfLinksSelf.md) + - [GroupModel](doc//GroupModel.md) + - [GroupModelLinks](doc//GroupModelLinks.md) + - [GroupModelLinksDelete](doc//GroupModelLinksDelete.md) + - [GroupModelLinksMembersInner](doc//GroupModelLinksMembersInner.md) + - [GroupModelLinksMemberships](doc//GroupModelLinksMemberships.md) + - [GroupModelLinksSelf](doc//GroupModelLinksSelf.md) + - [GroupModelLinksUpdateImmediately](doc//GroupModelLinksUpdateImmediately.md) + - [GroupWriteModel](doc//GroupWriteModel.md) + - [GroupWriteModelLinks](doc//GroupWriteModelLinks.md) + - [GroupWriteModelLinksMembersInner](doc//GroupWriteModelLinksMembersInner.md) + - [HelpTextCollectionModel](doc//HelpTextCollectionModel.md) + - [HelpTextCollectionModelAllOfEmbedded](doc//HelpTextCollectionModelAllOfEmbedded.md) + - [HelpTextCollectionModelAllOfLinks](doc//HelpTextCollectionModelAllOfLinks.md) + - [HelpTextCollectionModelAllOfLinksSelf](doc//HelpTextCollectionModelAllOfLinksSelf.md) + - [HelpTextModel](doc//HelpTextModel.md) + - [HelpTextModelLinks](doc//HelpTextModelLinks.md) + - [HelpTextModelLinksAddAttachment](doc//HelpTextModelLinksAddAttachment.md) + - [HelpTextModelLinksAttachments](doc//HelpTextModelLinksAttachments.md) + - [HelpTextModelLinksEditText](doc//HelpTextModelLinksEditText.md) + - [HelpTextModelLinksSelf](doc//HelpTextModelLinksSelf.md) + - [Link](doc//Link.md) + - [NewsModel](doc//NewsModel.md) + - [NewsModelLinks](doc//NewsModelLinks.md) + - [NewsModelLinksAuthor](doc//NewsModelLinksAuthor.md) + - [NewsModelLinksProject](doc//NewsModelLinksProject.md) + - [NewsModelLinksSelf](doc//NewsModelLinksSelf.md) + - [NonWorkingDayCollectionModel](doc//NonWorkingDayCollectionModel.md) + - [NonWorkingDayCollectionModelAllOfEmbedded](doc//NonWorkingDayCollectionModelAllOfEmbedded.md) + - [NonWorkingDayCollectionModelAllOfLinks](doc//NonWorkingDayCollectionModelAllOfLinks.md) + - [NonWorkingDayCollectionModelAllOfLinksSelf](doc//NonWorkingDayCollectionModelAllOfLinksSelf.md) + - [NonWorkingDayModel](doc//NonWorkingDayModel.md) + - [NonWorkingDayModelLinks](doc//NonWorkingDayModelLinks.md) + - [NonWorkingDayModelLinksSelf](doc//NonWorkingDayModelLinksSelf.md) + - [NotificationCollectionModel](doc//NotificationCollectionModel.md) + - [NotificationCollectionModelAllOfEmbedded](doc//NotificationCollectionModelAllOfEmbedded.md) + - [NotificationCollectionModelAllOfLinks](doc//NotificationCollectionModelAllOfLinks.md) + - [NotificationCollectionModelAllOfLinksChangeSize](doc//NotificationCollectionModelAllOfLinksChangeSize.md) + - [NotificationCollectionModelAllOfLinksJumpTo](doc//NotificationCollectionModelAllOfLinksJumpTo.md) + - [NotificationCollectionModelAllOfLinksSelf](doc//NotificationCollectionModelAllOfLinksSelf.md) + - [NotificationModel](doc//NotificationModel.md) + - [NotificationModelDetailsInner](doc//NotificationModelDetailsInner.md) + - [NotificationModelEmbedded](doc//NotificationModelEmbedded.md) + - [NotificationModelEmbeddedResource](doc//NotificationModelEmbeddedResource.md) + - [NotificationModelLinks](doc//NotificationModelLinks.md) + - [NotificationModelLinksActivity](doc//NotificationModelLinksActivity.md) + - [NotificationModelLinksActor](doc//NotificationModelLinksActor.md) + - [NotificationModelLinksDetailsInner](doc//NotificationModelLinksDetailsInner.md) + - [NotificationModelLinksProject](doc//NotificationModelLinksProject.md) + - [NotificationModelLinksReadIAN](doc//NotificationModelLinksReadIAN.md) + - [NotificationModelLinksResource](doc//NotificationModelLinksResource.md) + - [NotificationModelLinksSelf](doc//NotificationModelLinksSelf.md) + - [NotificationModelLinksUnreadIAN](doc//NotificationModelLinksUnreadIAN.md) + - [OAuthApplicationReadModel](doc//OAuthApplicationReadModel.md) + - [OAuthApplicationReadModelLinks](doc//OAuthApplicationReadModelLinks.md) + - [OAuthApplicationReadModelLinksIntegration](doc//OAuthApplicationReadModelLinksIntegration.md) + - [OAuthApplicationReadModelLinksOwner](doc//OAuthApplicationReadModelLinksOwner.md) + - [OAuthApplicationReadModelLinksRedirectUri](doc//OAuthApplicationReadModelLinksRedirectUri.md) + - [OAuthApplicationReadModelLinksSelf](doc//OAuthApplicationReadModelLinksSelf.md) + - [OAuthClientCredentialsReadModel](doc//OAuthClientCredentialsReadModel.md) + - [OAuthClientCredentialsReadModelLinks](doc//OAuthClientCredentialsReadModelLinks.md) + - [OAuthClientCredentialsReadModelLinksIntegration](doc//OAuthClientCredentialsReadModelLinksIntegration.md) + - [OAuthClientCredentialsReadModelLinksSelf](doc//OAuthClientCredentialsReadModelLinksSelf.md) + - [OAuthClientCredentialsWriteModel](doc//OAuthClientCredentialsWriteModel.md) + - [PaginatedCollectionModel](doc//PaginatedCollectionModel.md) + - [PaginatedCollectionModelAllOfLinks](doc//PaginatedCollectionModelAllOfLinks.md) + - [PaginatedCollectionModelAllOfLinksChangeSize](doc//PaginatedCollectionModelAllOfLinksChangeSize.md) + - [PaginatedCollectionModelAllOfLinksJumpTo](doc//PaginatedCollectionModelAllOfLinksJumpTo.md) + - [PostModel](doc//PostModel.md) + - [PostModelLinks](doc//PostModelLinks.md) + - [PostModelLinksAddAttachment](doc//PostModelLinksAddAttachment.md) + - [PriorityModel](doc//PriorityModel.md) + - [PriorityModelLinks](doc//PriorityModelLinks.md) + - [PriorityModelLinksSelf](doc//PriorityModelLinksSelf.md) + - [ProjectModel](doc//ProjectModel.md) + - [ProjectModelLinks](doc//ProjectModelLinks.md) + - [ProjectModelLinksCategories](doc//ProjectModelLinksCategories.md) + - [ProjectModelLinksCreateWorkPackage](doc//ProjectModelLinksCreateWorkPackage.md) + - [ProjectModelLinksCreateWorkPackageImmediately](doc//ProjectModelLinksCreateWorkPackageImmediately.md) + - [ProjectModelLinksDelete](doc//ProjectModelLinksDelete.md) + - [ProjectModelLinksMemberships](doc//ProjectModelLinksMemberships.md) + - [ProjectModelLinksParent](doc//ProjectModelLinksParent.md) + - [ProjectModelLinksSelf](doc//ProjectModelLinksSelf.md) + - [ProjectModelLinksStatus](doc//ProjectModelLinksStatus.md) + - [ProjectModelLinksStoragesInner](doc//ProjectModelLinksStoragesInner.md) + - [ProjectModelLinksTypes](doc//ProjectModelLinksTypes.md) + - [ProjectModelLinksUpdate](doc//ProjectModelLinksUpdate.md) + - [ProjectModelLinksUpdateImmediately](doc//ProjectModelLinksUpdateImmediately.md) + - [ProjectModelLinksVersions](doc//ProjectModelLinksVersions.md) + - [ProjectModelLinksWorkPackages](doc//ProjectModelLinksWorkPackages.md) + - [ProjectModelStatusExplanation](doc//ProjectModelStatusExplanation.md) + - [ProjectStorageCollectionModel](doc//ProjectStorageCollectionModel.md) + - [ProjectStorageCollectionModelAllOfEmbedded](doc//ProjectStorageCollectionModelAllOfEmbedded.md) + - [ProjectStorageCollectionModelAllOfLinks](doc//ProjectStorageCollectionModelAllOfLinks.md) + - [ProjectStorageCollectionModelAllOfLinksSelf](doc//ProjectStorageCollectionModelAllOfLinksSelf.md) + - [ProjectStorageModel](doc//ProjectStorageModel.md) + - [ProjectStorageModelLinks](doc//ProjectStorageModelLinks.md) + - [ProjectStorageModelLinksCreator](doc//ProjectStorageModelLinksCreator.md) + - [ProjectStorageModelLinksProject](doc//ProjectStorageModelLinksProject.md) + - [ProjectStorageModelLinksProjectFolder](doc//ProjectStorageModelLinksProjectFolder.md) + - [ProjectStorageModelLinksSelf](doc//ProjectStorageModelLinksSelf.md) + - [ProjectStorageModelLinksStorage](doc//ProjectStorageModelLinksStorage.md) + - [QueryColumnModel](doc//QueryColumnModel.md) + - [QueryCreateForm](doc//QueryCreateForm.md) + - [QueryFilterInstanceSchemaModel](doc//QueryFilterInstanceSchemaModel.md) + - [QueryFilterInstanceSchemaModelLinks](doc//QueryFilterInstanceSchemaModelLinks.md) + - [QueryFilterInstanceSchemaModelLinksFilter](doc//QueryFilterInstanceSchemaModelLinksFilter.md) + - [QueryFilterInstanceSchemaModelLinksSelf](doc//QueryFilterInstanceSchemaModelLinksSelf.md) + - [QueryFilterModel](doc//QueryFilterModel.md) + - [QueryModel](doc//QueryModel.md) + - [QueryModelLinks](doc//QueryModelLinks.md) + - [QueryModelLinksStar](doc//QueryModelLinksStar.md) + - [QueryModelLinksUnstar](doc//QueryModelLinksUnstar.md) + - [QueryModelLinksUpdate](doc//QueryModelLinksUpdate.md) + - [QueryModelLinksUpdateImmediately](doc//QueryModelLinksUpdateImmediately.md) + - [QueryOperatorModel](doc//QueryOperatorModel.md) + - [QuerySortByModel](doc//QuerySortByModel.md) + - [QueryUpdateForm](doc//QueryUpdateForm.md) + - [RelationModel](doc//RelationModel.md) + - [RelationModelLinks](doc//RelationModelLinks.md) + - [RelationModelLinksDelete](doc//RelationModelLinksDelete.md) + - [RelationModelLinksFrom](doc//RelationModelLinksFrom.md) + - [RelationModelLinksSchema](doc//RelationModelLinksSchema.md) + - [RelationModelLinksSelf](doc//RelationModelLinksSelf.md) + - [RelationModelLinksTo](doc//RelationModelLinksTo.md) + - [RelationModelLinksUpdate](doc//RelationModelLinksUpdate.md) + - [RelationModelLinksUpdateImmediately](doc//RelationModelLinksUpdateImmediately.md) + - [RevisionModel](doc//RevisionModel.md) + - [RevisionModelLinks](doc//RevisionModelLinks.md) + - [RevisionModelLinksAuthor](doc//RevisionModelLinksAuthor.md) + - [RevisionModelLinksProject](doc//RevisionModelLinksProject.md) + - [RevisionModelLinksSelf](doc//RevisionModelLinksSelf.md) + - [RevisionModelLinksShowRevision](doc//RevisionModelLinksShowRevision.md) + - [RevisionModelMessage](doc//RevisionModelMessage.md) + - [RoleModel](doc//RoleModel.md) + - [RoleModelLinks](doc//RoleModelLinks.md) + - [RoleModelLinksSelf](doc//RoleModelLinksSelf.md) + - [RootModel](doc//RootModel.md) + - [RootModelLinks](doc//RootModelLinks.md) + - [RootModelLinksConfiguration](doc//RootModelLinksConfiguration.md) + - [RootModelLinksMemberships](doc//RootModelLinksMemberships.md) + - [RootModelLinksPriorities](doc//RootModelLinksPriorities.md) + - [RootModelLinksRelations](doc//RootModelLinksRelations.md) + - [RootModelLinksSelf](doc//RootModelLinksSelf.md) + - [RootModelLinksStatuses](doc//RootModelLinksStatuses.md) + - [RootModelLinksTimeEntries](doc//RootModelLinksTimeEntries.md) + - [RootModelLinksTypes](doc//RootModelLinksTypes.md) + - [RootModelLinksUser](doc//RootModelLinksUser.md) + - [RootModelLinksUserPreferences](doc//RootModelLinksUserPreferences.md) + - [RootModelLinksWorkPackages](doc//RootModelLinksWorkPackages.md) + - [SchemaModel](doc//SchemaModel.md) + - [SchemaModelLinks](doc//SchemaModelLinks.md) + - [SchemaModelLinksSelf](doc//SchemaModelLinksSelf.md) + - [ShowOrValidateFormRequest](doc//ShowOrValidateFormRequest.md) + - [StatusModel](doc//StatusModel.md) + - [StatusModelLinks](doc//StatusModelLinks.md) + - [StatusModelLinksSelf](doc//StatusModelLinksSelf.md) + - [StorageFileModel](doc//StorageFileModel.md) + - [StorageFileModelAllOfLinks](doc//StorageFileModelAllOfLinks.md) + - [StorageFileModelAllOfLinksSelf](doc//StorageFileModelAllOfLinksSelf.md) + - [StorageFileUploadLinkModel](doc//StorageFileUploadLinkModel.md) + - [StorageFileUploadLinkModelLinks](doc//StorageFileUploadLinkModelLinks.md) + - [StorageFileUploadLinkModelLinksDestination](doc//StorageFileUploadLinkModelLinksDestination.md) + - [StorageFileUploadLinkModelLinksSelf](doc//StorageFileUploadLinkModelLinksSelf.md) + - [StorageFileUploadPreparationModel](doc//StorageFileUploadPreparationModel.md) + - [StorageFilesModel](doc//StorageFilesModel.md) + - [StorageFilesModelParent](doc//StorageFilesModelParent.md) + - [StorageReadModel](doc//StorageReadModel.md) + - [StorageReadModelEmbedded](doc//StorageReadModelEmbedded.md) + - [StorageReadModelLinks](doc//StorageReadModelLinks.md) + - [StorageReadModelLinksAuthorizationState](doc//StorageReadModelLinksAuthorizationState.md) + - [StorageReadModelLinksAuthorize](doc//StorageReadModelLinksAuthorize.md) + - [StorageReadModelLinksOauthApplication](doc//StorageReadModelLinksOauthApplication.md) + - [StorageReadModelLinksOauthClientCredentials](doc//StorageReadModelLinksOauthClientCredentials.md) + - [StorageReadModelLinksOpen](doc//StorageReadModelLinksOpen.md) + - [StorageReadModelLinksOrigin](doc//StorageReadModelLinksOrigin.md) + - [StorageReadModelLinksSelf](doc//StorageReadModelLinksSelf.md) + - [StorageReadModelLinksType](doc//StorageReadModelLinksType.md) + - [StorageWriteModel](doc//StorageWriteModel.md) + - [StorageWriteModelLinks](doc//StorageWriteModelLinks.md) + - [StorageWriteModelLinksOrigin](doc//StorageWriteModelLinksOrigin.md) + - [StorageWriteModelLinksType](doc//StorageWriteModelLinksType.md) + - [TimeEntryActivityModel](doc//TimeEntryActivityModel.md) + - [TimeEntryActivityModelEmbedded](doc//TimeEntryActivityModelEmbedded.md) + - [TimeEntryActivityModelLinks](doc//TimeEntryActivityModelLinks.md) + - [TimeEntryActivityModelLinksSelf](doc//TimeEntryActivityModelLinksSelf.md) + - [TimeEntryCollectionModel](doc//TimeEntryCollectionModel.md) + - [TimeEntryCollectionModelAllOfEmbedded](doc//TimeEntryCollectionModelAllOfEmbedded.md) + - [TimeEntryCollectionModelAllOfLinks](doc//TimeEntryCollectionModelAllOfLinks.md) + - [TimeEntryCollectionModelAllOfLinksSelf](doc//TimeEntryCollectionModelAllOfLinksSelf.md) + - [TimeEntryModel](doc//TimeEntryModel.md) + - [TimeEntryModelComment](doc//TimeEntryModelComment.md) + - [TimeEntryModelLinks](doc//TimeEntryModelLinks.md) + - [TimeEntryModelLinksActivity](doc//TimeEntryModelLinksActivity.md) + - [TimeEntryModelLinksDelete](doc//TimeEntryModelLinksDelete.md) + - [TimeEntryModelLinksProject](doc//TimeEntryModelLinksProject.md) + - [TimeEntryModelLinksSchema](doc//TimeEntryModelLinksSchema.md) + - [TimeEntryModelLinksSelf](doc//TimeEntryModelLinksSelf.md) + - [TimeEntryModelLinksUpdate](doc//TimeEntryModelLinksUpdate.md) + - [TimeEntryModelLinksUpdateImmediately](doc//TimeEntryModelLinksUpdateImmediately.md) + - [TimeEntryModelLinksUser](doc//TimeEntryModelLinksUser.md) + - [TimeEntryModelLinksWorkPackage](doc//TimeEntryModelLinksWorkPackage.md) + - [TypeModel](doc//TypeModel.md) + - [TypeModelLinks](doc//TypeModelLinks.md) + - [TypeModelLinksSelf](doc//TypeModelLinksSelf.md) + - [UpdateActivityRequest](doc//UpdateActivityRequest.md) + - [UpdateActivityRequestComment](doc//UpdateActivityRequestComment.md) + - [UpdateUserPreferencesRequest](doc//UpdateUserPreferencesRequest.md) + - [UserCollectionModel](doc//UserCollectionModel.md) + - [UserCollectionModelAllOfEmbedded](doc//UserCollectionModelAllOfEmbedded.md) + - [UserCollectionModelAllOfLinks](doc//UserCollectionModelAllOfLinks.md) + - [UserCollectionModelAllOfLinksSelf](doc//UserCollectionModelAllOfLinksSelf.md) + - [UserCreateModel](doc//UserCreateModel.md) + - [UserModel](doc//UserModel.md) + - [UserModelLinks](doc//UserModelLinks.md) + - [UserModelLinksDelete](doc//UserModelLinksDelete.md) + - [UserModelLinksLock](doc//UserModelLinksLock.md) + - [UserModelLinksMemberships](doc//UserModelLinksMemberships.md) + - [UserModelLinksSelf](doc//UserModelLinksSelf.md) + - [UserModelLinksShowUser](doc//UserModelLinksShowUser.md) + - [UserModelLinksUnlock](doc//UserModelLinksUnlock.md) + - [UserModelLinksUpdateImmediately](doc//UserModelLinksUpdateImmediately.md) + - [ValuesPropertyModel](doc//ValuesPropertyModel.md) + - [ValuesPropertyModelLinks](doc//ValuesPropertyModelLinks.md) + - [ValuesPropertyModelLinksSchema](doc//ValuesPropertyModelLinksSchema.md) + - [ValuesPropertyModelLinksSelf](doc//ValuesPropertyModelLinksSelf.md) + - [VersionModel](doc//VersionModel.md) + - [VersionModelLinks](doc//VersionModelLinks.md) + - [VersionModelLinksAvailableInProjects](doc//VersionModelLinksAvailableInProjects.md) + - [VersionModelLinksDefiningProject](doc//VersionModelLinksDefiningProject.md) + - [VersionModelLinksSelf](doc//VersionModelLinksSelf.md) + - [VersionModelLinksUpdate](doc//VersionModelLinksUpdate.md) + - [VersionModelLinksUpdateImmediately](doc//VersionModelLinksUpdateImmediately.md) + - [WatchersModel](doc//WatchersModel.md) + - [WatchersModelAllOfEmbedded](doc//WatchersModelAllOfEmbedded.md) + - [WatchersModelAllOfLinks](doc//WatchersModelAllOfLinks.md) + - [WatchersModelAllOfLinksSelf](doc//WatchersModelAllOfLinksSelf.md) + - [WeekDayCollectionModel](doc//WeekDayCollectionModel.md) + - [WeekDayCollectionModelAllOfEmbedded](doc//WeekDayCollectionModelAllOfEmbedded.md) + - [WeekDayCollectionModelAllOfLinks](doc//WeekDayCollectionModelAllOfLinks.md) + - [WeekDayCollectionModelAllOfLinksSelf](doc//WeekDayCollectionModelAllOfLinksSelf.md) + - [WeekDayCollectionWriteModel](doc//WeekDayCollectionWriteModel.md) + - [WeekDayCollectionWriteModelEmbedded](doc//WeekDayCollectionWriteModelEmbedded.md) + - [WeekDayModel](doc//WeekDayModel.md) + - [WeekDaySelfLinkModel](doc//WeekDaySelfLinkModel.md) + - [WeekDaySelfLinkModelSelf](doc//WeekDaySelfLinkModelSelf.md) + - [WeekDayWriteModel](doc//WeekDayWriteModel.md) + - [WikiPageModel](doc//WikiPageModel.md) + - [WikiPageModelLinks](doc//WikiPageModelLinks.md) + - [WikiPageModelLinksAddAttachment](doc//WikiPageModelLinksAddAttachment.md) + - [WorkPackageModel](doc//WorkPackageModel.md) + - [WorkPackageModelDescription](doc//WorkPackageModelDescription.md) + - [WorkPackageModelLinks](doc//WorkPackageModelLinks.md) + - [WorkPackageModelLinksAddAttachment](doc//WorkPackageModelLinksAddAttachment.md) + - [WorkPackageModelLinksAddComment](doc//WorkPackageModelLinksAddComment.md) + - [WorkPackageModelLinksAddFileLink](doc//WorkPackageModelLinksAddFileLink.md) + - [WorkPackageModelLinksAddRelation](doc//WorkPackageModelLinksAddRelation.md) + - [WorkPackageModelLinksAddWatcher](doc//WorkPackageModelLinksAddWatcher.md) + - [WorkPackageModelLinksAssignee](doc//WorkPackageModelLinksAssignee.md) + - [WorkPackageModelLinksAttachments](doc//WorkPackageModelLinksAttachments.md) + - [WorkPackageModelLinksAuthor](doc//WorkPackageModelLinksAuthor.md) + - [WorkPackageModelLinksAvailableWatchers](doc//WorkPackageModelLinksAvailableWatchers.md) + - [WorkPackageModelLinksBudget](doc//WorkPackageModelLinksBudget.md) + - [WorkPackageModelLinksCategory](doc//WorkPackageModelLinksCategory.md) + - [WorkPackageModelLinksFileLinks](doc//WorkPackageModelLinksFileLinks.md) + - [WorkPackageModelLinksParent](doc//WorkPackageModelLinksParent.md) + - [WorkPackageModelLinksPreviewMarkup](doc//WorkPackageModelLinksPreviewMarkup.md) + - [WorkPackageModelLinksPriority](doc//WorkPackageModelLinksPriority.md) + - [WorkPackageModelLinksProject](doc//WorkPackageModelLinksProject.md) + - [WorkPackageModelLinksRelations](doc//WorkPackageModelLinksRelations.md) + - [WorkPackageModelLinksRemoveWatcher](doc//WorkPackageModelLinksRemoveWatcher.md) + - [WorkPackageModelLinksResponsible](doc//WorkPackageModelLinksResponsible.md) + - [WorkPackageModelLinksRevisions](doc//WorkPackageModelLinksRevisions.md) + - [WorkPackageModelLinksSchema](doc//WorkPackageModelLinksSchema.md) + - [WorkPackageModelLinksSelf](doc//WorkPackageModelLinksSelf.md) + - [WorkPackageModelLinksStatus](doc//WorkPackageModelLinksStatus.md) + - [WorkPackageModelLinksTimeEntries](doc//WorkPackageModelLinksTimeEntries.md) + - [WorkPackageModelLinksType](doc//WorkPackageModelLinksType.md) + - [WorkPackageModelLinksUnwatch](doc//WorkPackageModelLinksUnwatch.md) + - [WorkPackageModelLinksUpdate](doc//WorkPackageModelLinksUpdate.md) + - [WorkPackageModelLinksUpdateImmediately](doc//WorkPackageModelLinksUpdateImmediately.md) + - [WorkPackageModelLinksVersion](doc//WorkPackageModelLinksVersion.md) + - [WorkPackageModelLinksWatch](doc//WorkPackageModelLinksWatch.md) + - [WorkPackageModelLinksWatchers](doc//WorkPackageModelLinksWatchers.md) + - [WorkPackagePatchModel](doc//WorkPackagePatchModel.md) + - [WorkPackagePatchModelLinks](doc//WorkPackagePatchModelLinks.md) + - [WorkPackagesModel](doc//WorkPackagesModel.md) + - [WorkPackagesModelAllOfEmbedded](doc//WorkPackagesModelAllOfEmbedded.md) + - [WorkPackagesModelAllOfLinks](doc//WorkPackagesModelAllOfLinks.md) + - [WorkPackagesModelAllOfLinksSelf](doc//WorkPackagesModelAllOfLinksSelf.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### BasicAuth + +- **Type**: HTTP Basic authentication + + +## Author + + + diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..e69de29 diff --git a/doc/ActionsCapabilitiesApi.md b/doc/ActionsCapabilitiesApi.md new file mode 100644 index 0000000..4cf9161 --- /dev/null +++ b/doc/ActionsCapabilitiesApi.md @@ -0,0 +1,248 @@ +# openapi.api.ActionsCapabilitiesApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listActions**](ActionsCapabilitiesApi.md#listactions) | **GET** /api/v3/actions | List actions +[**listCapabilities**](ActionsCapabilitiesApi.md#listcapabilities) | **GET** /api/v3/capabilities | List capabilities +[**viewAction**](ActionsCapabilitiesApi.md#viewaction) | **GET** /api/v3/actions/{id} | View action +[**viewCapabilities**](ActionsCapabilitiesApi.md#viewcapabilities) | **GET** /api/v3/capabilities/{id} | View capabilities +[**viewGlobalContext**](ActionsCapabilitiesApi.md#viewglobalcontext) | **GET** /api/v3/capabilities/context/global | View global context + + +# **listActions** +> Object listActions(filters, sortBy) + +List actions + +Returns a collection of actions. The client can choose to filter the actions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain actions, for which the requesting client has sufficient permissions. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ActionsCapabilitiesApi(); +final filters = [{ "id": { "operator": "=", "values": ["memberships/create"] }" }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Returns only the action having the id or all actions except those having the id(s). +final sortBy = [["id", "asc"]]; // String | JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + *No sort supported yet* + +try { + final result = api_instance.listActions(filters, sortBy); + print(result); +} catch (e) { + print('Exception when calling ActionsCapabilitiesApi->listActions: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Returns only the action having the id or all actions except those having the id(s). | [optional] + **sortBy** | **String**| JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + *No sort supported yet* | [optional] [default to '[["id", "asc"]]'] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listCapabilities** +> Object listCapabilities(filters, sortBy) + +List capabilities + +Returns a collection of actions assigned to a principal in a context. The client can choose to filter the actions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain actions, for which the requesting client has sufficient permissions + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ActionsCapabilitiesApi(); +final filters = [{ "principal": { "operator": "=", "values": ["1"] }" }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + action: Get all capabilities of a certain action + principal: Get all capabilities of a principal + context: Get all capabilities within a context. Note that for a project context the client needs to provide `p{id}`, e.g. `p5` and for the global context a `g` +final sortBy = [["id", "asc"]]; // String | JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by the capabilities id + +try { + final result = api_instance.listCapabilities(filters, sortBy); + print(result); +} catch (e) { + print('Exception when calling ActionsCapabilitiesApi->listCapabilities: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + action: Get all capabilities of a certain action + principal: Get all capabilities of a principal + context: Get all capabilities within a context. Note that for a project context the client needs to provide `p{id}`, e.g. `p5` and for the global context a `g` | [optional] + **sortBy** | **String**| JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by the capabilities id | [optional] [default to '[["id", "asc"]]'] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewAction** +> Object viewAction(id) + +View action + +Returns an individual action. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ActionsCapabilitiesApi(); +final id = work_packages/create; // String | action id which is the name of the action + +try { + final result = api_instance.viewAction(id); + print(result); +} catch (e) { + print('Exception when calling ActionsCapabilitiesApi->viewAction: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| action id which is the name of the action | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewCapabilities** +> Object viewCapabilities(id) + +View capabilities + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ActionsCapabilitiesApi(); +final id = work_packages/create/p123-567; // String | capability id + +try { + final result = api_instance.viewCapabilities(id); + print(result); +} catch (e) { + print('Exception when calling ActionsCapabilitiesApi->viewCapabilities: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| capability id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewGlobalContext** +> Object viewGlobalContext() + +View global context + +Returns the global capability context. This context is necessary to consistently link to a context even if the context is not a project. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ActionsCapabilitiesApi(); + +try { + final result = api_instance.viewGlobalContext(); + print(result); +} catch (e) { + print('Exception when calling ActionsCapabilitiesApi->viewGlobalContext: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/ActivitiesApi.md b/doc/ActivitiesApi.md new file mode 100644 index 0000000..b861670 --- /dev/null +++ b/doc/ActivitiesApi.md @@ -0,0 +1,109 @@ +# openapi.api.ActivitiesApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**updateActivity**](ActivitiesApi.md#updateactivity) | **PATCH** /api/v3/activities/{id} | Update activity +[**viewActivity**](ActivitiesApi.md#viewactivity) | **GET** /api/v3/activities/{id} | View activity + + +# **updateActivity** +> ActivityModel updateActivity(id, updateActivityRequest) + +Update activity + +Updates an activity's comment and, on success, returns the updated activity. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ActivitiesApi(); +final id = 1; // int | Activity id +final updateActivityRequest = UpdateActivityRequest(); // UpdateActivityRequest | + +try { + final result = api_instance.updateActivity(id, updateActivityRequest); + print(result); +} catch (e) { + print('Exception when calling ActivitiesApi->updateActivity: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Activity id | + **updateActivityRequest** | [**UpdateActivityRequest**](UpdateActivityRequest.md)| | [optional] + +### Return type + +[**ActivityModel**](ActivityModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewActivity** +> ActivityModel viewActivity(id) + +View activity + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ActivitiesApi(); +final id = 1; // int | Activity id + +try { + final result = api_instance.viewActivity(id); + print(result); +} catch (e) { + print('Exception when calling ActivitiesApi->viewActivity: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Activity id | + +### Return type + +[**ActivityModel**](ActivityModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/ActivityModel.md b/doc/ActivityModel.md new file mode 100644 index 0000000..70a291e --- /dev/null +++ b/doc/ActivityModel.md @@ -0,0 +1,20 @@ +# openapi.model.ActivityModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Activity id | [optional] [readonly] +**version** | **int** | Activity version | [optional] [readonly] +**comment** | [**ActivityModelComment**](ActivityModelComment.md) | | [optional] +**details** | [**List**](Formattable.md) | | [optional] [default to const []] +**createdAt** | [**DateTime**](DateTime.md) | Time of creation | [optional] [readonly] +**updatedAt** | [**DateTime**](DateTime.md) | Time of update | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ActivityModelComment.md b/doc/ActivityModelComment.md new file mode 100644 index 0000000..6379043 --- /dev/null +++ b/doc/ActivityModelComment.md @@ -0,0 +1,17 @@ +# openapi.model.ActivityModelComment + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**format** | **String** | Indicates the formatting language of the raw text | [readonly] +**raw** | **String** | The raw text, as entered by the user | [optional] +**html** | **String** | The text converted to HTML according to the format | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/AddWatcherRequest.md b/doc/AddWatcherRequest.md new file mode 100644 index 0000000..725e694 --- /dev/null +++ b/doc/AddWatcherRequest.md @@ -0,0 +1,15 @@ +# openapi.model.AddWatcherRequest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [**ExecuteCustomActionRequestLinksWorkPackage**](ExecuteCustomActionRequestLinksWorkPackage.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/AttachmentModel.md b/doc/AttachmentModel.md new file mode 100644 index 0000000..3d9eadc --- /dev/null +++ b/doc/AttachmentModel.md @@ -0,0 +1,23 @@ +# openapi.model.AttachmentModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Attachment's id | [optional] +**title** | **String** | The name of the file | +**fileName** | **String** | The name of the uploaded file | +**fileSize** | **int** | The size of the uploaded file in Bytes | [optional] +**description** | [**AttachmentModelDescription**](AttachmentModelDescription.md) | | +**contentType** | **String** | The files MIME-Type as determined by the server | +**digest** | **String** | A checksum for the files content | +**createdAt** | [**DateTime**](DateTime.md) | Time of creation | +**links** | [**AttachmentModelLinks**](AttachmentModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/AttachmentModelDescription.md b/doc/AttachmentModelDescription.md new file mode 100644 index 0000000..378d30d --- /dev/null +++ b/doc/AttachmentModelDescription.md @@ -0,0 +1,17 @@ +# openapi.model.AttachmentModelDescription + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**format** | **String** | Indicates the formatting language of the raw text | [readonly] +**raw** | **String** | The raw text, as entered by the user | [optional] +**html** | **String** | The text converted to HTML according to the format | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/AttachmentModelLinks.md b/doc/AttachmentModelLinks.md new file mode 100644 index 0000000..4477b5a --- /dev/null +++ b/doc/AttachmentModelLinks.md @@ -0,0 +1,19 @@ +# openapi.model.AttachmentModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**delete** | [**AttachmentModelLinksDelete**](AttachmentModelLinksDelete.md) | | [optional] +**self** | [**AttachmentModelLinksSelf**](AttachmentModelLinksSelf.md) | | +**container** | [**AttachmentModelLinksContainer**](AttachmentModelLinksContainer.md) | | +**author** | [**AttachmentModelLinksAuthor**](AttachmentModelLinksAuthor.md) | | +**downloadLocation** | [**AttachmentModelLinksDownloadLocation**](AttachmentModelLinksDownloadLocation.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/AttachmentModelLinksAuthor.md b/doc/AttachmentModelLinksAuthor.md new file mode 100644 index 0000000..52cad50 --- /dev/null +++ b/doc/AttachmentModelLinksAuthor.md @@ -0,0 +1,20 @@ +# openapi.model.AttachmentModelLinksAuthor + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/AttachmentModelLinksContainer.md b/doc/AttachmentModelLinksContainer.md new file mode 100644 index 0000000..983bb36 --- /dev/null +++ b/doc/AttachmentModelLinksContainer.md @@ -0,0 +1,20 @@ +# openapi.model.AttachmentModelLinksContainer + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/AttachmentModelLinksDelete.md b/doc/AttachmentModelLinksDelete.md new file mode 100644 index 0000000..7bda441 --- /dev/null +++ b/doc/AttachmentModelLinksDelete.md @@ -0,0 +1,20 @@ +# openapi.model.AttachmentModelLinksDelete + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/AttachmentModelLinksDownloadLocation.md b/doc/AttachmentModelLinksDownloadLocation.md new file mode 100644 index 0000000..61c5745 --- /dev/null +++ b/doc/AttachmentModelLinksDownloadLocation.md @@ -0,0 +1,20 @@ +# openapi.model.AttachmentModelLinksDownloadLocation + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/AttachmentModelLinksSelf.md b/doc/AttachmentModelLinksSelf.md new file mode 100644 index 0000000..e5050fa --- /dev/null +++ b/doc/AttachmentModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.AttachmentModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/AttachmentsApi.md b/doc/AttachmentsApi.md new file mode 100644 index 0000000..5a48663 --- /dev/null +++ b/doc/AttachmentsApi.md @@ -0,0 +1,429 @@ +# openapi.api.AttachmentsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addAttachmentToPost**](AttachmentsApi.md#addattachmenttopost) | **POST** /api/v3/posts/{id}/attachments | Add attachment to post +[**addAttachmentToWikiPage**](AttachmentsApi.md#addattachmenttowikipage) | **POST** /api/v3/wiki_pages/{id}/attachments | Add attachment to wiki page +[**createAttachment**](AttachmentsApi.md#createattachment) | **POST** /api/v3/attachments | Create Attachment +[**createWorkPackageAttachment**](AttachmentsApi.md#createworkpackageattachment) | **POST** /api/v3/work_packages/{id}/attachments | Create work package attachment +[**deleteAttachment**](AttachmentsApi.md#deleteattachment) | **DELETE** /api/v3/attachments/{id} | Delete attachment +[**listAttachmentsByPost**](AttachmentsApi.md#listattachmentsbypost) | **GET** /api/v3/posts/{id}/attachments | List attachments by post +[**listAttachmentsByWikiPage**](AttachmentsApi.md#listattachmentsbywikipage) | **GET** /api/v3/wiki_pages/{id}/attachments | List attachments by wiki page +[**listWorkPackageAttachments**](AttachmentsApi.md#listworkpackageattachments) | **GET** /api/v3/work_packages/{id}/attachments | List attachments by work package +[**viewAttachment**](AttachmentsApi.md#viewattachment) | **GET** /api/v3/attachments/{id} | View attachment + + +# **addAttachmentToPost** +> addAttachmentToPost(id) + +Add attachment to post + +Adds an attachment with the post as it's container. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = AttachmentsApi(); +final id = 1; // int | ID of the post to receive the attachment + +try { + api_instance.addAttachmentToPost(id); +} catch (e) { + print('Exception when calling AttachmentsApi->addAttachmentToPost: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| ID of the post to receive the attachment | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **addAttachmentToWikiPage** +> addAttachmentToWikiPage(id) + +Add attachment to wiki page + +Adds an attachment with the wiki page as it's container. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = AttachmentsApi(); +final id = 1; // int | ID of the wiki page to receive the attachment + +try { + api_instance.addAttachmentToWikiPage(id); +} catch (e) { + print('Exception when calling AttachmentsApi->addAttachmentToWikiPage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| ID of the wiki page to receive the attachment | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createAttachment** +> AttachmentModel createAttachment() + +Create Attachment + +Clients can create attachments without a container first and attach them later on. This is useful if the container does not exist at the time the attachment is uploaded. After the upload, the client can then claim such containerless attachments for any resource eligible (e.g. WorkPackage) on subsequent requests. The upload and the claiming *must* be done for the same user account. Attachments uploaded by another user cannot be claimed and once claimed for a resource, they cannot be claimed by another. The upload request must be of type `multipart/form-data` with exactly two parts. The first part *must* be called `metadata`. Its content type is expected to be `application/json`, the body *must* be a single JSON object, containing at least the `fileName` and optionally the attachments `description`. The second part *must* be called `file`, its content type *should* match the mime type of the file. The body *must* be the raw content of the file. Note that a `filename` *must* be indicated in the `Content-Disposition` of this part, although it will be ignored. Instead the `fileName` inside the JSON of the metadata part will be used. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = AttachmentsApi(); + +try { + final result = api_instance.createAttachment(); + print(result); +} catch (e) { + print('Exception when calling AttachmentsApi->createAttachment: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AttachmentModel**](AttachmentModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createWorkPackageAttachment** +> AttachmentModel createWorkPackageAttachment(id) + +Create work package attachment + +To add an attachment to a work package, a client needs to issue a request of type `multipart/form-data` with exactly two parts. The first part *must* be called `metadata`. Its content type is expected to be `application/json`, the body *must* be a single JSON object, containing at least the `fileName` and optionally the attachments `description`. The second part *must* be called `file`, its content type *should* match the mime type of the file. The body *must* be the raw content of the file. Note that a `filename` must be indicated in the `Content-Disposition` of this part, however it will be ignored. Instead the `fileName` inside the JSON of the metadata part will be used. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = AttachmentsApi(); +final id = 1; // int | ID of the work package to receive the attachment + +try { + final result = api_instance.createWorkPackageAttachment(id); + print(result); +} catch (e) { + print('Exception when calling AttachmentsApi->createWorkPackageAttachment: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| ID of the work package to receive the attachment | + +### Return type + +[**AttachmentModel**](AttachmentModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteAttachment** +> deleteAttachment(id) + +Delete attachment + +Permanently deletes the specified attachment. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = AttachmentsApi(); +final id = 1; // int | Attachment id + +try { + api_instance.deleteAttachment(id); +} catch (e) { + print('Exception when calling AttachmentsApi->deleteAttachment: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Attachment id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listAttachmentsByPost** +> AttachmentsModel listAttachmentsByPost(id) + +List attachments by post + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = AttachmentsApi(); +final id = 1; // int | ID of the post whose attachments will be listed + +try { + final result = api_instance.listAttachmentsByPost(id); + print(result); +} catch (e) { + print('Exception when calling AttachmentsApi->listAttachmentsByPost: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| ID of the post whose attachments will be listed | + +### Return type + +[**AttachmentsModel**](AttachmentsModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listAttachmentsByWikiPage** +> AttachmentsModel listAttachmentsByWikiPage(id) + +List attachments by wiki page + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = AttachmentsApi(); +final id = 1; // int | ID of the wiki page whose attachments will be listed + +try { + final result = api_instance.listAttachmentsByWikiPage(id); + print(result); +} catch (e) { + print('Exception when calling AttachmentsApi->listAttachmentsByWikiPage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| ID of the wiki page whose attachments will be listed | + +### Return type + +[**AttachmentsModel**](AttachmentsModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listWorkPackageAttachments** +> AttachmentsModel listWorkPackageAttachments(id) + +List attachments by work package + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = AttachmentsApi(); +final id = 1; // int | ID of the work package whose attachments will be listed + +try { + final result = api_instance.listWorkPackageAttachments(id); + print(result); +} catch (e) { + print('Exception when calling AttachmentsApi->listWorkPackageAttachments: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| ID of the work package whose attachments will be listed | + +### Return type + +[**AttachmentsModel**](AttachmentsModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewAttachment** +> AttachmentModel viewAttachment(id) + +View attachment + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = AttachmentsApi(); +final id = 1; // int | Attachment id + +try { + final result = api_instance.viewAttachment(id); + print(result); +} catch (e) { + print('Exception when calling AttachmentsApi->viewAttachment: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Attachment id | + +### Return type + +[**AttachmentModel**](AttachmentModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/AttachmentsModel.md b/doc/AttachmentsModel.md new file mode 100644 index 0000000..f5290ae --- /dev/null +++ b/doc/AttachmentsModel.md @@ -0,0 +1,19 @@ +# openapi.model.AttachmentsModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**AttachmentsModelAllOfLinks**](AttachmentsModelAllOfLinks.md) | | +**embedded** | [**AttachmentsModelAllOfEmbedded**](AttachmentsModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/AttachmentsModelAllOfEmbedded.md b/doc/AttachmentsModelAllOfEmbedded.md new file mode 100644 index 0000000..560437a --- /dev/null +++ b/doc/AttachmentsModelAllOfEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.AttachmentsModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**List**](AttachmentsModelAllOfEmbeddedElementsInner.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/AttachmentsModelAllOfEmbeddedElementsInner.md b/doc/AttachmentsModelAllOfEmbeddedElementsInner.md new file mode 100644 index 0000000..ef14a03 --- /dev/null +++ b/doc/AttachmentsModelAllOfEmbeddedElementsInner.md @@ -0,0 +1,23 @@ +# openapi.model.AttachmentsModelAllOfEmbeddedElementsInner + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Attachment's id | [optional] +**title** | **String** | The name of the file | +**fileName** | **String** | The name of the uploaded file | +**fileSize** | **int** | The size of the uploaded file in Bytes | [optional] +**description** | [**AttachmentModelDescription**](AttachmentModelDescription.md) | | +**contentType** | **String** | The files MIME-Type as determined by the server | +**digest** | **String** | A checksum for the files content | +**createdAt** | [**DateTime**](DateTime.md) | Time of creation | +**links** | [**AttachmentModelLinks**](AttachmentModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/AttachmentsModelAllOfLinks.md b/doc/AttachmentsModelAllOfLinks.md new file mode 100644 index 0000000..be4dff7 --- /dev/null +++ b/doc/AttachmentsModelAllOfLinks.md @@ -0,0 +1,15 @@ +# openapi.model.AttachmentsModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**AttachmentsModelAllOfLinksSelf**](AttachmentsModelAllOfLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/AttachmentsModelAllOfLinksSelf.md b/doc/AttachmentsModelAllOfLinksSelf.md new file mode 100644 index 0000000..d91feb8 --- /dev/null +++ b/doc/AttachmentsModelAllOfLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.AttachmentsModelAllOfLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/BudgetModel.md b/doc/BudgetModel.md new file mode 100644 index 0000000..7612dd8 --- /dev/null +++ b/doc/BudgetModel.md @@ -0,0 +1,15 @@ +# openapi.model.BudgetModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**BudgetModelLinks**](BudgetModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/BudgetModelLinks.md b/doc/BudgetModelLinks.md new file mode 100644 index 0000000..2d07fbf --- /dev/null +++ b/doc/BudgetModelLinks.md @@ -0,0 +1,15 @@ +# openapi.model.BudgetModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**BudgetModelLinksSelf**](BudgetModelLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/BudgetModelLinksSelf.md b/doc/BudgetModelLinksSelf.md new file mode 100644 index 0000000..278689e --- /dev/null +++ b/doc/BudgetModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.BudgetModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/BudgetsApi.md b/doc/BudgetsApi.md new file mode 100644 index 0000000..2372be1 --- /dev/null +++ b/doc/BudgetsApi.md @@ -0,0 +1,107 @@ +# openapi.api.BudgetsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**viewBudget**](BudgetsApi.md#viewbudget) | **GET** /api/v3/budgets/{id} | view Budget +[**viewBudgetsOfAProject**](BudgetsApi.md#viewbudgetsofaproject) | **GET** /api/v3/projects/{id}/budgets | view Budgets of a Project + + +# **viewBudget** +> BudgetModel viewBudget(id) + +view Budget + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = BudgetsApi(); +final id = 1; // int | Budget id + +try { + final result = api_instance.viewBudget(id); + print(result); +} catch (e) { + print('Exception when calling BudgetsApi->viewBudget: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Budget id | + +### Return type + +[**BudgetModel**](BudgetModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewBudgetsOfAProject** +> Object viewBudgetsOfAProject(id) + +view Budgets of a Project + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = BudgetsApi(); +final id = 1; // int | Project id + +try { + final result = api_instance.viewBudgetsOfAProject(id); + print(result); +} catch (e) { + print('Exception when calling BudgetsApi->viewBudgetsOfAProject: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/CategoriesApi.md b/doc/CategoriesApi.md new file mode 100644 index 0000000..805dde4 --- /dev/null +++ b/doc/CategoriesApi.md @@ -0,0 +1,107 @@ +# openapi.api.CategoriesApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listCategoriesOfAProject**](CategoriesApi.md#listcategoriesofaproject) | **GET** /api/v3/projects/{id}/categories | List categories of a project +[**viewCategory**](CategoriesApi.md#viewcategory) | **GET** /api/v3/categories/{id} | View Category + + +# **listCategoriesOfAProject** +> Object listCategoriesOfAProject(id) + +List categories of a project + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = CategoriesApi(); +final id = 1; // int | ID of the project whose categories will be listed + +try { + final result = api_instance.listCategoriesOfAProject(id); + print(result); +} catch (e) { + print('Exception when calling CategoriesApi->listCategoriesOfAProject: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| ID of the project whose categories will be listed | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewCategory** +> CategoryModel viewCategory(id) + +View Category + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = CategoriesApi(); +final id = 1; // int | Category id + +try { + final result = api_instance.viewCategory(id); + print(result); +} catch (e) { + print('Exception when calling CategoriesApi->viewCategory: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Category id | + +### Return type + +[**CategoryModel**](CategoryModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/CategoryModel.md b/doc/CategoryModel.md new file mode 100644 index 0000000..e5b9369 --- /dev/null +++ b/doc/CategoryModel.md @@ -0,0 +1,17 @@ +# openapi.model.CategoryModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Category id | [optional] [readonly] +**name** | **String** | Category name | [optional] +**links** | [**CategoryModelLinks**](CategoryModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CategoryModelLinks.md b/doc/CategoryModelLinks.md new file mode 100644 index 0000000..50215f3 --- /dev/null +++ b/doc/CategoryModelLinks.md @@ -0,0 +1,17 @@ +# openapi.model.CategoryModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**CategoryModelLinksSelf**](CategoryModelLinksSelf.md) | | +**project** | [**CategoryModelLinksProject**](CategoryModelLinksProject.md) | | +**defaultAssignee** | [**CategoryModelLinksDefaultAssignee**](CategoryModelLinksDefaultAssignee.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CategoryModelLinksDefaultAssignee.md b/doc/CategoryModelLinksDefaultAssignee.md new file mode 100644 index 0000000..dea5704 --- /dev/null +++ b/doc/CategoryModelLinksDefaultAssignee.md @@ -0,0 +1,20 @@ +# openapi.model.CategoryModelLinksDefaultAssignee + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CategoryModelLinksProject.md b/doc/CategoryModelLinksProject.md new file mode 100644 index 0000000..6e19d88 --- /dev/null +++ b/doc/CategoryModelLinksProject.md @@ -0,0 +1,20 @@ +# openapi.model.CategoryModelLinksProject + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CategoryModelLinksSelf.md b/doc/CategoryModelLinksSelf.md new file mode 100644 index 0000000..063536c --- /dev/null +++ b/doc/CategoryModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.CategoryModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CollectionModel.md b/doc/CollectionModel.md new file mode 100644 index 0000000..050cd93 --- /dev/null +++ b/doc/CollectionModel.md @@ -0,0 +1,18 @@ +# openapi.model.CollectionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**CollectionModelLinks**](CollectionModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CollectionModelLinks.md b/doc/CollectionModelLinks.md new file mode 100644 index 0000000..0c55628 --- /dev/null +++ b/doc/CollectionModelLinks.md @@ -0,0 +1,15 @@ +# openapi.model.CollectionModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**CollectionModelLinksSelf**](CollectionModelLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CollectionModelLinksSelf.md b/doc/CollectionModelLinksSelf.md new file mode 100644 index 0000000..d54db44 --- /dev/null +++ b/doc/CollectionModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.CollectionModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CollectionsApi.md b/doc/CollectionsApi.md new file mode 100644 index 0000000..00cd15a --- /dev/null +++ b/doc/CollectionsApi.md @@ -0,0 +1,61 @@ +# openapi.api.CollectionsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**viewAggregatedResult**](CollectionsApi.md#viewaggregatedresult) | **GET** /api/v3/examples | view aggregated result + + +# **viewAggregatedResult** +> viewAggregatedResult(groupBy, showSums) + +view aggregated result + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = CollectionsApi(); +final groupBy = status; // String | The column to group by. Note: Aggregation is as of now only supported by the work package collection. You can pass any column name as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. +final showSums = true; // bool | + +try { + api_instance.viewAggregatedResult(groupBy, showSums); +} catch (e) { + print('Exception when calling CollectionsApi->viewAggregatedResult: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupBy** | **String**| The column to group by. Note: Aggregation is as of now only supported by the work package collection. You can pass any column name as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. | [optional] + **showSums** | **bool**| | [optional] [default to false] + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/CommentWorkPackageRequest.md b/doc/CommentWorkPackageRequest.md new file mode 100644 index 0000000..a3b8c9f --- /dev/null +++ b/doc/CommentWorkPackageRequest.md @@ -0,0 +1,15 @@ +# openapi.model.CommentWorkPackageRequest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comment** | [**UpdateActivityRequestComment**](UpdateActivityRequestComment.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ConfigurationApi.md b/doc/ConfigurationApi.md new file mode 100644 index 0000000..cac9f25 --- /dev/null +++ b/doc/ConfigurationApi.md @@ -0,0 +1,56 @@ +# openapi.api.ConfigurationApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**viewConfiguration**](ConfigurationApi.md#viewconfiguration) | **GET** /api/v3/configuration | View configuration + + +# **viewConfiguration** +> ConfigurationModel viewConfiguration() + +View configuration + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ConfigurationApi(); + +try { + final result = api_instance.viewConfiguration(); + print(result); +} catch (e) { + print('Exception when calling ConfigurationApi->viewConfiguration: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ConfigurationModel**](ConfigurationModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/ConfigurationModel.md b/doc/ConfigurationModel.md new file mode 100644 index 0000000..c9cbdbe --- /dev/null +++ b/doc/ConfigurationModel.md @@ -0,0 +1,18 @@ +# openapi.model.ConfigurationModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**maximumAttachmentFileSize** | **int** | The maximum allowed size of an attachment in Bytes | [optional] [readonly] +**hostName** | **String** | The host name configured for the system | [optional] [readonly] +**perPageOptions** | **List** | | [optional] [default to const []] +**activeFeatureFlags** | **List** | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CreateViewsRequest.md b/doc/CreateViewsRequest.md new file mode 100644 index 0000000..b066ea9 --- /dev/null +++ b/doc/CreateViewsRequest.md @@ -0,0 +1,15 @@ +# openapi.model.CreateViewsRequest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**CreateViewsRequestLinks**](CreateViewsRequestLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CreateViewsRequestLinks.md b/doc/CreateViewsRequestLinks.md new file mode 100644 index 0000000..523f524 --- /dev/null +++ b/doc/CreateViewsRequestLinks.md @@ -0,0 +1,15 @@ +# openapi.model.CreateViewsRequestLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**query** | [**CreateViewsRequestLinksQuery**](CreateViewsRequestLinksQuery.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CreateViewsRequestLinksQuery.md b/doc/CreateViewsRequestLinksQuery.md new file mode 100644 index 0000000..fb18915 --- /dev/null +++ b/doc/CreateViewsRequestLinksQuery.md @@ -0,0 +1,15 @@ +# openapi.model.CreateViewsRequestLinksQuery + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CustomActionModel.md b/doc/CustomActionModel.md new file mode 100644 index 0000000..08c1dec --- /dev/null +++ b/doc/CustomActionModel.md @@ -0,0 +1,18 @@ +# openapi.model.CustomActionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**name** | **String** | The name of the custom action | [optional] +**description** | **String** | The description for the custom action | [optional] +**links** | [**CustomActionModelLinks**](CustomActionModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CustomActionModelLinks.md b/doc/CustomActionModelLinks.md new file mode 100644 index 0000000..50557ef --- /dev/null +++ b/doc/CustomActionModelLinks.md @@ -0,0 +1,16 @@ +# openapi.model.CustomActionModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**CustomActionModelLinksSelf**](CustomActionModelLinksSelf.md) | | +**executeImmediately** | [**CustomActionModelLinksExecuteImmediately**](CustomActionModelLinksExecuteImmediately.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CustomActionModelLinksExecuteImmediately.md b/doc/CustomActionModelLinksExecuteImmediately.md new file mode 100644 index 0000000..5a18817 --- /dev/null +++ b/doc/CustomActionModelLinksExecuteImmediately.md @@ -0,0 +1,20 @@ +# openapi.model.CustomActionModelLinksExecuteImmediately + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CustomActionModelLinksSelf.md b/doc/CustomActionModelLinksSelf.md new file mode 100644 index 0000000..63dd641 --- /dev/null +++ b/doc/CustomActionModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.CustomActionModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CustomActionsApi.md b/doc/CustomActionsApi.md new file mode 100644 index 0000000..912cf56 --- /dev/null +++ b/doc/CustomActionsApi.md @@ -0,0 +1,108 @@ +# openapi.api.CustomActionsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**executeCustomAction**](CustomActionsApi.md#executecustomaction) | **POST** /api/v3/custom_actions/{id}/execute | Execute custom action +[**getCustomAction**](CustomActionsApi.md#getcustomaction) | **GET** /api/v3/custom_actions/{id} | Get a custom action + + +# **executeCustomAction** +> executeCustomAction(id, executeCustomActionRequest) + +Execute custom action + +A POST to this end point executes the custom action on the work package provided in the payload. The altered work package will be returned. In order to avoid executing the custom action unbeknown to a change that has already taken place, the client has to provide the work package's current lockVersion. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = CustomActionsApi(); +final id = 1; // int | The id of the custom action to execute +final executeCustomActionRequest = ExecuteCustomActionRequest(); // ExecuteCustomActionRequest | + +try { + api_instance.executeCustomAction(id, executeCustomActionRequest); +} catch (e) { + print('Exception when calling CustomActionsApi->executeCustomAction: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| The id of the custom action to execute | + **executeCustomActionRequest** | [**ExecuteCustomActionRequest**](ExecuteCustomActionRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getCustomAction** +> CustomActionModel getCustomAction(id) + +Get a custom action + +Retrieves a custom action by id. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = CustomActionsApi(); +final id = 42; // int | The id of the custom action to fetch + +try { + final result = api_instance.getCustomAction(id); + print(result); +} catch (e) { + print('Exception when calling CustomActionsApi->getCustomAction: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| The id of the custom action to fetch | + +### Return type + +[**CustomActionModel**](CustomActionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/CustomOptionModel.md b/doc/CustomOptionModel.md new file mode 100644 index 0000000..3332ecd --- /dev/null +++ b/doc/CustomOptionModel.md @@ -0,0 +1,17 @@ +# openapi.model.CustomOptionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The identifier | [optional] [readonly] +**value** | **String** | The value defined for this custom option | [optional] [readonly] +**links** | [**CustomOptionModelLinks**](CustomOptionModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CustomOptionModelLinks.md b/doc/CustomOptionModelLinks.md new file mode 100644 index 0000000..165f9c1 --- /dev/null +++ b/doc/CustomOptionModelLinks.md @@ -0,0 +1,15 @@ +# openapi.model.CustomOptionModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**CustomOptionModelLinksSelf**](CustomOptionModelLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CustomOptionModelLinksSelf.md b/doc/CustomOptionModelLinksSelf.md new file mode 100644 index 0000000..87f6fe0 --- /dev/null +++ b/doc/CustomOptionModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.CustomOptionModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/CustomOptionsApi.md b/doc/CustomOptionsApi.md new file mode 100644 index 0000000..9d71b0e --- /dev/null +++ b/doc/CustomOptionsApi.md @@ -0,0 +1,60 @@ +# openapi.api.CustomOptionsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**viewCustomOption**](CustomOptionsApi.md#viewcustomoption) | **GET** /api/v3/custom_options/{id} | View Custom Option + + +# **viewCustomOption** +> CustomOptionModel viewCustomOption(id) + +View Custom Option + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = CustomOptionsApi(); +final id = 1; // int | The custom option's identifier + +try { + final result = api_instance.viewCustomOption(id); + print(result); +} catch (e) { + print('Exception when calling CustomOptionsApi->viewCustomOption: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| The custom option's identifier | + +### Return type + +[**CustomOptionModel**](CustomOptionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/DayCollectionModel.md b/doc/DayCollectionModel.md new file mode 100644 index 0000000..3f904ca --- /dev/null +++ b/doc/DayCollectionModel.md @@ -0,0 +1,19 @@ +# openapi.model.DayCollectionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**DayCollectionModelAllOfLinks**](DayCollectionModelAllOfLinks.md) | | +**embedded** | [**DayCollectionModelAllOfEmbedded**](DayCollectionModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/DayCollectionModelAllOfEmbedded.md b/doc/DayCollectionModelAllOfEmbedded.md new file mode 100644 index 0000000..8070a75 --- /dev/null +++ b/doc/DayCollectionModelAllOfEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.DayCollectionModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**List**](DayModel.md) | | [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/DayCollectionModelAllOfLinks.md b/doc/DayCollectionModelAllOfLinks.md new file mode 100644 index 0000000..f0a99da --- /dev/null +++ b/doc/DayCollectionModelAllOfLinks.md @@ -0,0 +1,15 @@ +# openapi.model.DayCollectionModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**DayCollectionModelAllOfLinksSelf**](DayCollectionModelAllOfLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/DayCollectionModelAllOfLinksSelf.md b/doc/DayCollectionModelAllOfLinksSelf.md new file mode 100644 index 0000000..66ad520 --- /dev/null +++ b/doc/DayCollectionModelAllOfLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.DayCollectionModelAllOfLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/DayModel.md b/doc/DayModel.md new file mode 100644 index 0000000..dd7b744 --- /dev/null +++ b/doc/DayModel.md @@ -0,0 +1,19 @@ +# openapi.model.DayModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**date** | [**DateTime**](DateTime.md) | Date of the day. | +**name** | **String** | Descriptive name for the day. | +**working** | **bool** | `true` for a working day, `false` otherwise. | +**links** | [**DayModelLinks**](DayModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/DayModelLinks.md b/doc/DayModelLinks.md new file mode 100644 index 0000000..265be8d --- /dev/null +++ b/doc/DayModelLinks.md @@ -0,0 +1,17 @@ +# openapi.model.DayModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**Link**](Link.md) | | +**nonWorkingReasons** | [**List**](Link.md) | | [optional] [default to const []] +**weekDay** | [**DayModelLinksWeekDay**](DayModelLinksWeekDay.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/DayModelLinksWeekDay.md b/doc/DayModelLinksWeekDay.md new file mode 100644 index 0000000..e1acd8e --- /dev/null +++ b/doc/DayModelLinksWeekDay.md @@ -0,0 +1,20 @@ +# openapi.model.DayModelLinksWeekDay + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/DocumentModel.md b/doc/DocumentModel.md new file mode 100644 index 0000000..1f81575 --- /dev/null +++ b/doc/DocumentModel.md @@ -0,0 +1,19 @@ +# openapi.model.DocumentModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Document's id | [optional] [readonly] +**title** | **String** | The title chosen for the collection of documents | [optional] [readonly] +**description** | **String** | A text describing the documents | [optional] [readonly] +**createdAt** | [**DateTime**](DateTime.md) | The time the document was created at | [optional] [readonly] +**links** | [**DocumentModelLinks**](DocumentModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/DocumentModelLinks.md b/doc/DocumentModelLinks.md new file mode 100644 index 0000000..57b41bc --- /dev/null +++ b/doc/DocumentModelLinks.md @@ -0,0 +1,17 @@ +# openapi.model.DocumentModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**DocumentModelLinksSelf**](DocumentModelLinksSelf.md) | | +**project** | [**DocumentModelLinksProject**](DocumentModelLinksProject.md) | | +**attachments** | [**DocumentModelLinksAttachments**](DocumentModelLinksAttachments.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/DocumentModelLinksAttachments.md b/doc/DocumentModelLinksAttachments.md new file mode 100644 index 0000000..9af3529 --- /dev/null +++ b/doc/DocumentModelLinksAttachments.md @@ -0,0 +1,20 @@ +# openapi.model.DocumentModelLinksAttachments + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/DocumentModelLinksProject.md b/doc/DocumentModelLinksProject.md new file mode 100644 index 0000000..bb05bbf --- /dev/null +++ b/doc/DocumentModelLinksProject.md @@ -0,0 +1,20 @@ +# openapi.model.DocumentModelLinksProject + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/DocumentModelLinksSelf.md b/doc/DocumentModelLinksSelf.md new file mode 100644 index 0000000..516c39e --- /dev/null +++ b/doc/DocumentModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.DocumentModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/DocumentsApi.md b/doc/DocumentsApi.md new file mode 100644 index 0000000..8350554 --- /dev/null +++ b/doc/DocumentsApi.md @@ -0,0 +1,111 @@ +# openapi.api.DocumentsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listDocuments**](DocumentsApi.md#listdocuments) | **GET** /api/v3/documents | List Documents +[**viewDocument**](DocumentsApi.md#viewdocument) | **GET** /api/v3/documents/{id} | View document + + +# **listDocuments** +> Object listDocuments(offset, pageSize, sortBy) + +List Documents + +The documents returned depend on the provided parameters and also on the requesting user's permissions. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = DocumentsApi(); +final offset = 25; // int | Page number inside the requested collection. +final pageSize = 25; // int | Number of elements to display per page. +final sortBy = [["created_at", "asc"]]; // String | JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + created_at: Sort by document creation datetime + +try { + final result = api_instance.listDocuments(offset, pageSize, sortBy); + print(result); +} catch (e) { + print('Exception when calling DocumentsApi->listDocuments: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **offset** | **int**| Page number inside the requested collection. | [optional] [default to 1] + **pageSize** | **int**| Number of elements to display per page. | [optional] + **sortBy** | **String**| JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + created_at: Sort by document creation datetime | [optional] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewDocument** +> DocumentModel viewDocument(id) + +View document + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = DocumentsApi(); +final id = 1; // int | Document id + +try { + final result = api_instance.viewDocument(id); + print(result); +} catch (e) { + print('Exception when calling DocumentsApi->viewDocument: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Document id | + +### Return type + +[**DocumentModel**](DocumentModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/ErrorResponse.md b/doc/ErrorResponse.md new file mode 100644 index 0000000..aefe2f5 --- /dev/null +++ b/doc/ErrorResponse.md @@ -0,0 +1,18 @@ +# openapi.model.ErrorResponse + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**embedded** | [**ErrorResponseEmbedded**](ErrorResponseEmbedded.md) | | [optional] +**type** | **String** | | +**errorIdentifier** | **String** | | +**message** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ErrorResponseEmbedded.md b/doc/ErrorResponseEmbedded.md new file mode 100644 index 0000000..72b1c0c --- /dev/null +++ b/doc/ErrorResponseEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.ErrorResponseEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**details** | [**ErrorResponseEmbeddedDetails**](ErrorResponseEmbeddedDetails.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ErrorResponseEmbeddedDetails.md b/doc/ErrorResponseEmbeddedDetails.md new file mode 100644 index 0000000..f9ccfed --- /dev/null +++ b/doc/ErrorResponseEmbeddedDetails.md @@ -0,0 +1,15 @@ +# openapi.model.ErrorResponseEmbeddedDetails + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ExecuteCustomActionRequest.md b/doc/ExecuteCustomActionRequest.md new file mode 100644 index 0000000..9609b25 --- /dev/null +++ b/doc/ExecuteCustomActionRequest.md @@ -0,0 +1,16 @@ +# openapi.model.ExecuteCustomActionRequest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**ExecuteCustomActionRequestLinks**](ExecuteCustomActionRequestLinks.md) | | [optional] +**lockVersion** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ExecuteCustomActionRequestLinks.md b/doc/ExecuteCustomActionRequestLinks.md new file mode 100644 index 0000000..fcc66e0 --- /dev/null +++ b/doc/ExecuteCustomActionRequestLinks.md @@ -0,0 +1,15 @@ +# openapi.model.ExecuteCustomActionRequestLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workPackage** | [**ExecuteCustomActionRequestLinksWorkPackage**](ExecuteCustomActionRequestLinksWorkPackage.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ExecuteCustomActionRequestLinksWorkPackage.md b/doc/ExecuteCustomActionRequestLinksWorkPackage.md new file mode 100644 index 0000000..cc5c78b --- /dev/null +++ b/doc/ExecuteCustomActionRequestLinksWorkPackage.md @@ -0,0 +1,15 @@ +# openapi.model.ExecuteCustomActionRequestLinksWorkPackage + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkCollectionReadModel.md b/doc/FileLinkCollectionReadModel.md new file mode 100644 index 0000000..7a2238d --- /dev/null +++ b/doc/FileLinkCollectionReadModel.md @@ -0,0 +1,19 @@ +# openapi.model.FileLinkCollectionReadModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**FileLinkCollectionReadModelAllOfLinks**](FileLinkCollectionReadModelAllOfLinks.md) | | +**embedded** | [**FileLinkCollectionReadModelAllOfEmbedded**](FileLinkCollectionReadModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkCollectionReadModelAllOfEmbedded.md b/doc/FileLinkCollectionReadModelAllOfEmbedded.md new file mode 100644 index 0000000..2bf5e03 --- /dev/null +++ b/doc/FileLinkCollectionReadModelAllOfEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.FileLinkCollectionReadModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**List**](FileLinkReadModel.md) | | [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkCollectionReadModelAllOfLinks.md b/doc/FileLinkCollectionReadModelAllOfLinks.md new file mode 100644 index 0000000..d45c297 --- /dev/null +++ b/doc/FileLinkCollectionReadModelAllOfLinks.md @@ -0,0 +1,15 @@ +# openapi.model.FileLinkCollectionReadModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**FileLinkCollectionReadModelAllOfLinksSelf**](FileLinkCollectionReadModelAllOfLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkCollectionReadModelAllOfLinksSelf.md b/doc/FileLinkCollectionReadModelAllOfLinksSelf.md new file mode 100644 index 0000000..e767d78 --- /dev/null +++ b/doc/FileLinkCollectionReadModelAllOfLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.FileLinkCollectionReadModelAllOfLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkCollectionWriteModel.md b/doc/FileLinkCollectionWriteModel.md new file mode 100644 index 0000000..735c8f4 --- /dev/null +++ b/doc/FileLinkCollectionWriteModel.md @@ -0,0 +1,19 @@ +# openapi.model.FileLinkCollectionWriteModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**CollectionModelLinks**](CollectionModelLinks.md) | | +**embedded** | [**FileLinkCollectionWriteModelAllOfEmbedded**](FileLinkCollectionWriteModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkCollectionWriteModelAllOfEmbedded.md b/doc/FileLinkCollectionWriteModelAllOfEmbedded.md new file mode 100644 index 0000000..8a8173d --- /dev/null +++ b/doc/FileLinkCollectionWriteModelAllOfEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.FileLinkCollectionWriteModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**List**](FileLinkWriteModel.md) | | [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkOriginDataModel.md b/doc/FileLinkOriginDataModel.md new file mode 100644 index 0000000..1073842 --- /dev/null +++ b/doc/FileLinkOriginDataModel.md @@ -0,0 +1,22 @@ +# openapi.model.FileLinkOriginDataModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Linked file's id on the origin | +**name** | **String** | Linked file's name on the origin | +**mimeType** | **String** | MIME type of the linked file. To link a folder entity, the custom MIME type `application/x-op-directory` MUST be provided. Otherwise it defaults back to an unknown MIME type. | [optional] +**size** | **int** | file size on origin in bytes | [optional] +**createdAt** | [**DateTime**](DateTime.md) | Timestamp of the creation datetime of the file on the origin | [optional] +**lastModifiedAt** | [**DateTime**](DateTime.md) | Timestamp of the datetime of the last modification of the file on the origin | [optional] +**createdByName** | **String** | Display name of the author that created the file on the origin | [optional] +**lastModifiedByName** | **String** | Display name of the author that modified the file on the origin last | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkReadModel.md b/doc/FileLinkReadModel.md new file mode 100644 index 0000000..3aed1b3 --- /dev/null +++ b/doc/FileLinkReadModel.md @@ -0,0 +1,21 @@ +# openapi.model.FileLinkReadModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | File link id | +**type** | **String** | | +**createdAt** | [**DateTime**](DateTime.md) | Time of creation | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | Time of the most recent change to the file link | [optional] +**originData** | [**FileLinkOriginDataModel**](FileLinkOriginDataModel.md) | | +**embedded** | [**FileLinkReadModelEmbedded**](FileLinkReadModelEmbedded.md) | | [optional] +**links** | [**FileLinkReadModelLinks**](FileLinkReadModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkReadModelEmbedded.md b/doc/FileLinkReadModelEmbedded.md new file mode 100644 index 0000000..4e61e48 --- /dev/null +++ b/doc/FileLinkReadModelEmbedded.md @@ -0,0 +1,16 @@ +# openapi.model.FileLinkReadModelEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**storage** | [**StorageReadModel**](StorageReadModel.md) | | +**container** | [**WorkPackageModel**](WorkPackageModel.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkReadModelLinks.md b/doc/FileLinkReadModelLinks.md new file mode 100644 index 0000000..bfb0722 --- /dev/null +++ b/doc/FileLinkReadModelLinks.md @@ -0,0 +1,25 @@ +# openapi.model.FileLinkReadModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**FileLinkReadModelLinksSelf**](FileLinkReadModelLinksSelf.md) | | +**storage** | [**FileLinkReadModelLinksStorage**](FileLinkReadModelLinksStorage.md) | | +**container** | [**FileLinkReadModelLinksContainer**](FileLinkReadModelLinksContainer.md) | | +**creator** | [**FileLinkReadModelLinksCreator**](FileLinkReadModelLinksCreator.md) | | +**delete** | [**FileLinkReadModelLinksDelete**](FileLinkReadModelLinksDelete.md) | | [optional] +**permission** | [**FileLinkReadModelLinksPermission**](FileLinkReadModelLinksPermission.md) | | +**originOpen** | [**FileLinkReadModelLinksOriginOpen**](FileLinkReadModelLinksOriginOpen.md) | | +**staticOriginOpen** | [**FileLinkReadModelLinksStaticOriginOpen**](FileLinkReadModelLinksStaticOriginOpen.md) | | +**originOpenLocation** | [**FileLinkReadModelLinksOriginOpenLocation**](FileLinkReadModelLinksOriginOpenLocation.md) | | +**staticOriginOpenLocation** | [**FileLinkReadModelLinksStaticOriginOpenLocation**](FileLinkReadModelLinksStaticOriginOpenLocation.md) | | +**staticOriginDownload** | [**FileLinkReadModelLinksStaticOriginDownload**](FileLinkReadModelLinksStaticOriginDownload.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkReadModelLinksContainer.md b/doc/FileLinkReadModelLinksContainer.md new file mode 100644 index 0000000..589c80a --- /dev/null +++ b/doc/FileLinkReadModelLinksContainer.md @@ -0,0 +1,20 @@ +# openapi.model.FileLinkReadModelLinksContainer + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkReadModelLinksCreator.md b/doc/FileLinkReadModelLinksCreator.md new file mode 100644 index 0000000..e42acce --- /dev/null +++ b/doc/FileLinkReadModelLinksCreator.md @@ -0,0 +1,20 @@ +# openapi.model.FileLinkReadModelLinksCreator + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkReadModelLinksDelete.md b/doc/FileLinkReadModelLinksDelete.md new file mode 100644 index 0000000..49cef5e --- /dev/null +++ b/doc/FileLinkReadModelLinksDelete.md @@ -0,0 +1,20 @@ +# openapi.model.FileLinkReadModelLinksDelete + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkReadModelLinksOriginOpen.md b/doc/FileLinkReadModelLinksOriginOpen.md new file mode 100644 index 0000000..0c232a8 --- /dev/null +++ b/doc/FileLinkReadModelLinksOriginOpen.md @@ -0,0 +1,20 @@ +# openapi.model.FileLinkReadModelLinksOriginOpen + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkReadModelLinksOriginOpenLocation.md b/doc/FileLinkReadModelLinksOriginOpenLocation.md new file mode 100644 index 0000000..b6313fe --- /dev/null +++ b/doc/FileLinkReadModelLinksOriginOpenLocation.md @@ -0,0 +1,20 @@ +# openapi.model.FileLinkReadModelLinksOriginOpenLocation + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkReadModelLinksPermission.md b/doc/FileLinkReadModelLinksPermission.md new file mode 100644 index 0000000..868b78f --- /dev/null +++ b/doc/FileLinkReadModelLinksPermission.md @@ -0,0 +1,20 @@ +# openapi.model.FileLinkReadModelLinksPermission + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkReadModelLinksSelf.md b/doc/FileLinkReadModelLinksSelf.md new file mode 100644 index 0000000..eafb468 --- /dev/null +++ b/doc/FileLinkReadModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.FileLinkReadModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkReadModelLinksStaticOriginDownload.md b/doc/FileLinkReadModelLinksStaticOriginDownload.md new file mode 100644 index 0000000..18ae84a --- /dev/null +++ b/doc/FileLinkReadModelLinksStaticOriginDownload.md @@ -0,0 +1,20 @@ +# openapi.model.FileLinkReadModelLinksStaticOriginDownload + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkReadModelLinksStaticOriginOpen.md b/doc/FileLinkReadModelLinksStaticOriginOpen.md new file mode 100644 index 0000000..a0c98e9 --- /dev/null +++ b/doc/FileLinkReadModelLinksStaticOriginOpen.md @@ -0,0 +1,20 @@ +# openapi.model.FileLinkReadModelLinksStaticOriginOpen + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkReadModelLinksStaticOriginOpenLocation.md b/doc/FileLinkReadModelLinksStaticOriginOpenLocation.md new file mode 100644 index 0000000..e88fdbc --- /dev/null +++ b/doc/FileLinkReadModelLinksStaticOriginOpenLocation.md @@ -0,0 +1,20 @@ +# openapi.model.FileLinkReadModelLinksStaticOriginOpenLocation + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkReadModelLinksStorage.md b/doc/FileLinkReadModelLinksStorage.md new file mode 100644 index 0000000..6bad412 --- /dev/null +++ b/doc/FileLinkReadModelLinksStorage.md @@ -0,0 +1,20 @@ +# openapi.model.FileLinkReadModelLinksStorage + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinkWriteModel.md b/doc/FileLinkWriteModel.md new file mode 100644 index 0000000..99e9f80 --- /dev/null +++ b/doc/FileLinkWriteModel.md @@ -0,0 +1,15 @@ +# openapi.model.FileLinkWriteModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**originData** | [**FileLinkOriginDataModel**](FileLinkOriginDataModel.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FileLinksApi.md b/doc/FileLinksApi.md new file mode 100644 index 0000000..bb0d929 --- /dev/null +++ b/doc/FileLinksApi.md @@ -0,0 +1,728 @@ +# openapi.api.FileLinksApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createStorage**](FileLinksApi.md#createstorage) | **POST** /api/v3/storages | Creates a storage. +[**createStorageOauthCredentials**](FileLinksApi.md#createstorageoauthcredentials) | **POST** /api/v3/storages/{id}/oauth_client_credentials | Creates an oauth client credentials object for a storage. +[**createWorkPackageFileLink**](FileLinksApi.md#createworkpackagefilelink) | **POST** /api/v3/work_packages/{id}/file_links | Creates file links. +[**deleteFileLink**](FileLinksApi.md#deletefilelink) | **DELETE** /api/v3/file_links/{id} | Removes a file link. +[**deleteStorage**](FileLinksApi.md#deletestorage) | **DELETE** /api/v3/storages/{id} | Delete a storage +[**downloadFileLink**](FileLinksApi.md#downloadfilelink) | **GET** /api/v3/file_links/{id}/download | Creates a download uri of the linked file. +[**getProjectStorage**](FileLinksApi.md#getprojectstorage) | **GET** /api/v3/project_storages/{id} | Gets a project storage +[**getStorage**](FileLinksApi.md#getstorage) | **GET** /api/v3/storages/{id} | Get a storage +[**getStorageFiles**](FileLinksApi.md#getstoragefiles) | **GET** /api/v3/storages/{id}/files | Gets files of a storage. +[**listProjectStorages**](FileLinksApi.md#listprojectstorages) | **GET** /api/v3/project_storages | Gets a list of project storages +[**listWorkPackageFileLinks**](FileLinksApi.md#listworkpackagefilelinks) | **GET** /api/v3/work_packages/{id}/file_links | Gets all file links of a work package +[**openFileLink**](FileLinksApi.md#openfilelink) | **GET** /api/v3/file_links/{id}/open | Creates an opening uri of the linked file. +[**prepareStorageFileUpload**](FileLinksApi.md#preparestoragefileupload) | **POST** /api/v3/storages/{id}/files/prepare_upload | Preparation of a direct upload of a file to the given storage. +[**updateStorage**](FileLinksApi.md#updatestorage) | **PATCH** /api/v3/storages/{id} | Update a storage +[**viewFileLink**](FileLinksApi.md#viewfilelink) | **GET** /api/v3/file_links/{id} | Gets a file link. + + +# **createStorage** +> StorageReadModel createStorage(storageWriteModel) + +Creates a storage. + +Creates a storage resource. When creating a storage, a confidential OAuth 2 provider application is created automatically. The oauth client id and secret of the created OAuth application are returned in the response. **IMPORTANT:** This is the only time, the oauth client secret is visible to the consumer. After that, the secret is hidden. To update the storage with OAuth client credentials, which enable the storage resource to behave as an OAuth 2 client against an external OAuth 2 provider application, another request must be made to create those, see `POST /api/v3/storages/{id}/oauth_client_credentials`. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final storageWriteModel = StorageWriteModel(); // StorageWriteModel | + +try { + final result = api_instance.createStorage(storageWriteModel); + print(result); +} catch (e) { + print('Exception when calling FileLinksApi->createStorage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **storageWriteModel** | [**StorageWriteModel**](StorageWriteModel.md)| | [optional] + +### Return type + +[**StorageReadModel**](StorageReadModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createStorageOauthCredentials** +> StorageReadModel createStorageOauthCredentials(id, oAuthClientCredentialsWriteModel) + +Creates an oauth client credentials object for a storage. + +Inserts the OAuth 2 credentials into the storage, to allow the storage to act as an OAuth 2 client. Calling this endpoint on a storage that already contains OAuth 2 client credentials will replace them. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final id = 1337; // int | Storage id +final oAuthClientCredentialsWriteModel = OAuthClientCredentialsWriteModel(); // OAuthClientCredentialsWriteModel | + +try { + final result = api_instance.createStorageOauthCredentials(id, oAuthClientCredentialsWriteModel); + print(result); +} catch (e) { + print('Exception when calling FileLinksApi->createStorageOauthCredentials: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Storage id | + **oAuthClientCredentialsWriteModel** | [**OAuthClientCredentialsWriteModel**](OAuthClientCredentialsWriteModel.md)| | [optional] + +### Return type + +[**StorageReadModel**](StorageReadModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createWorkPackageFileLink** +> FileLinkCollectionReadModel createWorkPackageFileLink(id, fileLinkCollectionWriteModel) + +Creates file links. + +Creates file links on a work package. The request is interpreted as a bulk insert, where every element of the collection is validated separately. Each element contains the origin meta data and a link to the storage, the file link is about to point to. The storage link can be provided as a resource link with id or as the host url. The file's id and name are considered mandatory information. The rest of the origin meta data SHOULD be provided by the client. The _mimeType_ SHOULD be a standard mime type. An empty mime type will be handled as unknown. To link a folder, the custom mime type `application/x-op-directory` MUST be used. Up to 20 file links can be submitted at once. If any element data is invalid, no file links will be created. If a file link with matching origin id, work package, and storage already exists, then it will not create an additional file link or update the meta data. Instead the information from the existing file link will be returned. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final id = 1337; // int | Work package id +final fileLinkCollectionWriteModel = FileLinkCollectionWriteModel(); // FileLinkCollectionWriteModel | + +try { + final result = api_instance.createWorkPackageFileLink(id, fileLinkCollectionWriteModel); + print(result); +} catch (e) { + print('Exception when calling FileLinksApi->createWorkPackageFileLink: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + **fileLinkCollectionWriteModel** | [**FileLinkCollectionWriteModel**](FileLinkCollectionWriteModel.md)| | [optional] + +### Return type + +[**FileLinkCollectionReadModel**](FileLinkCollectionReadModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteFileLink** +> deleteFileLink(id) + +Removes a file link. + +Removes a file link on a work package. The request contains only the file link identifier as a path parameter. No request body is needed. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final id = 42; // int | File link id + +try { + api_instance.deleteFileLink(id); +} catch (e) { + print('Exception when calling FileLinksApi->deleteFileLink: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| File link id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteStorage** +> deleteStorage(id) + +Delete a storage + +Deletes a storage resource. This also deletes all related records, like the created oauth application, client, and any file links created within this storage. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final id = 1337; // int | Storage id + +try { + api_instance.deleteStorage(id); +} catch (e) { + print('Exception when calling FileLinksApi->deleteStorage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Storage id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **downloadFileLink** +> downloadFileLink(id) + +Creates a download uri of the linked file. + +Creates a uri to download the origin file linked by the given file link. This uri depends on the storage type and is always located on the origin storage itself. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final id = 42; // int | File link id + +try { + api_instance.downloadFileLink(id); +} catch (e) { + print('Exception when calling FileLinksApi->downloadFileLink: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| File link id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getProjectStorage** +> ProjectStorageModel getProjectStorage(id) + +Gets a project storage + +Gets a project storage resource. This resource contains all data that is applicable on the relation between a storage and a project. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final id = 1337; // int | Project storage id + +try { + final result = api_instance.getProjectStorage(id); + print(result); +} catch (e) { + print('Exception when calling FileLinksApi->getProjectStorage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project storage id | + +### Return type + +[**ProjectStorageModel**](ProjectStorageModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStorage** +> StorageReadModel getStorage(id) + +Get a storage + +Gets a storage resource. As a side effect, a live connection to the storages origin is established to retrieve connection state data. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final id = 1337; // int | Storage id + +try { + final result = api_instance.getStorage(id); + print(result); +} catch (e) { + print('Exception when calling FileLinksApi->getStorage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Storage id | + +### Return type + +[**StorageReadModel**](StorageReadModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStorageFiles** +> StorageFilesModel getStorageFiles(id, parent) + +Gets files of a storage. + +Gets a collection of files from a storage. If no `parent` context is given, the result is the content of the document root. With `parent` context given, the result contains the collections of files/directories from within the given parent file id. If given `parent` context is no directory, `400 Bad Request` is returned. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final id = 1337; // int | Storage id +final parent = /my/data; // String | Parent file identification + +try { + final result = api_instance.getStorageFiles(id, parent); + print(result); +} catch (e) { + print('Exception when calling FileLinksApi->getStorageFiles: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Storage id | + **parent** | **String**| Parent file identification | [optional] + +### Return type + +[**StorageFilesModel**](StorageFilesModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listProjectStorages** +> ProjectStorageCollectionModel listProjectStorages(filters) + +Gets a list of project storages + +Gets a collection of all project storages that meet the provided filters and the user has permission to see them. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final filters = [{ "project_id": { "operator": "=", "values": ["42"] }}, { "storage_id": { "operator": "=", "values": ["1337"] }}]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: - project_id - storage_id + +try { + final result = api_instance.listProjectStorages(filters); + print(result); +} catch (e) { + print('Exception when calling FileLinksApi->listProjectStorages: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: - project_id - storage_id | [optional] [default to '[]'] + +### Return type + +[**ProjectStorageCollectionModel**](ProjectStorageCollectionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listWorkPackageFileLinks** +> FileLinkCollectionReadModel listWorkPackageFileLinks(id, filters) + +Gets all file links of a work package + +Gets all file links of a work package. As a side effect, for every file link a request is sent to the storage's origin to fetch live data and patch the file link's data before returning, as well as retrieving permissions of the user on this origin file. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final id = 1337; // int | Work package id +final filters = [{"storage":{"operator":"=","values":["42"]}}]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. The following filters are supported: - storage + +try { + final result = api_instance.listWorkPackageFileLinks(id, filters); + print(result); +} catch (e) { + print('Exception when calling FileLinksApi->listWorkPackageFileLinks: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. The following filters are supported: - storage | [optional] + +### Return type + +[**FileLinkCollectionReadModel**](FileLinkCollectionReadModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **openFileLink** +> openFileLink(id, location) + +Creates an opening uri of the linked file. + +Creates a uri to open the origin file linked by the given file link. This uri depends on the storage type and is always located on the origin storage itself. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final id = 42; // int | File link id +final location = true; // bool | Boolean flag indicating, if the file should be opened directly or rather the directory location. + +try { + api_instance.openFileLink(id, location); +} catch (e) { + print('Exception when calling FileLinksApi->openFileLink: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| File link id | + **location** | **bool**| Boolean flag indicating, if the file should be opened directly or rather the directory location. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **prepareStorageFileUpload** +> StorageFileUploadLinkModel prepareStorageFileUpload(id, storageFileUploadPreparationModel) + +Preparation of a direct upload of a file to the given storage. + +Executes a request that prepares a link for a direct upload to the storage. The background here is, that the client needs to make a direct request to the storage instance for file uploading, but should not get access to the credentials, which are stored in the backend. The response contains a link object, that enables the client to execute a file upload without the real credentials. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final id = 1337; // int | Storage id +final storageFileUploadPreparationModel = StorageFileUploadPreparationModel(); // StorageFileUploadPreparationModel | + +try { + final result = api_instance.prepareStorageFileUpload(id, storageFileUploadPreparationModel); + print(result); +} catch (e) { + print('Exception when calling FileLinksApi->prepareStorageFileUpload: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Storage id | + **storageFileUploadPreparationModel** | [**StorageFileUploadPreparationModel**](StorageFileUploadPreparationModel.md)| | [optional] + +### Return type + +[**StorageFileUploadLinkModel**](StorageFileUploadLinkModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateStorage** +> StorageReadModel updateStorage(id, storageWriteModel) + +Update a storage + +Updates a storage resource. Only data that is not generated by the server can be updated. This excludes the OAuth 2 application data. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final id = 1337; // int | Storage id +final storageWriteModel = StorageWriteModel(); // StorageWriteModel | + +try { + final result = api_instance.updateStorage(id, storageWriteModel); + print(result); +} catch (e) { + print('Exception when calling FileLinksApi->updateStorage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Storage id | + **storageWriteModel** | [**StorageWriteModel**](StorageWriteModel.md)| | [optional] + +### Return type + +[**StorageReadModel**](StorageReadModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewFileLink** +> FileLinkReadModel viewFileLink(id) + +Gets a file link. + +Gets a single file link resource of a work package. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FileLinksApi(); +final id = 42; // int | File link id + +try { + final result = api_instance.viewFileLink(id); + print(result); +} catch (e) { + print('Exception when calling FileLinksApi->viewFileLink: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| File link id | + +### Return type + +[**FileLinkReadModel**](FileLinkReadModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/Formattable.md b/doc/Formattable.md new file mode 100644 index 0000000..9b1b499 --- /dev/null +++ b/doc/Formattable.md @@ -0,0 +1,17 @@ +# openapi.model.Formattable + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**format** | **String** | Indicates the formatting language of the raw text | [readonly] +**raw** | **String** | The raw text, as entered by the user | [optional] +**html** | **String** | The text converted to HTML according to the format | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/FormsApi.md b/doc/FormsApi.md new file mode 100644 index 0000000..dc672b8 --- /dev/null +++ b/doc/FormsApi.md @@ -0,0 +1,60 @@ +# openapi.api.FormsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**showOrValidateForm**](FormsApi.md#showorvalidateform) | **POST** /api/v3/example/form | show or validate form + + +# **showOrValidateForm** +> Object showOrValidateForm(showOrValidateFormRequest) + +show or validate form + +This is an example of how a form might look like. Note that this endpoint does not exist in the actual implementation. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = FormsApi(); +final showOrValidateFormRequest = ShowOrValidateFormRequest(); // ShowOrValidateFormRequest | + +try { + final result = api_instance.showOrValidateForm(showOrValidateFormRequest); + print(result); +} catch (e) { + print('Exception when calling FormsApi->showOrValidateForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **showOrValidateFormRequest** | [**ShowOrValidateFormRequest**](ShowOrValidateFormRequest.md)| | [optional] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/GridCollectionModel.md b/doc/GridCollectionModel.md new file mode 100644 index 0000000..ce111ec --- /dev/null +++ b/doc/GridCollectionModel.md @@ -0,0 +1,21 @@ +# openapi.model.GridCollectionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**PaginatedCollectionModelAllOfLinks**](PaginatedCollectionModelAllOfLinks.md) | | +**pageSize** | **int** | Amount of elements that a response will hold. | +**offset** | **int** | The page number that is requested from paginated collection. | +**embedded** | [**GridCollectionModelAllOfEmbedded**](GridCollectionModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GridCollectionModelAllOfEmbedded.md b/doc/GridCollectionModelAllOfEmbedded.md new file mode 100644 index 0000000..8396125 --- /dev/null +++ b/doc/GridCollectionModelAllOfEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.GridCollectionModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**List**](GridReadModel.md) | | [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GridReadModel.md b/doc/GridReadModel.md new file mode 100644 index 0000000..b9cb469 --- /dev/null +++ b/doc/GridReadModel.md @@ -0,0 +1,22 @@ +# openapi.model.GridReadModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**id** | **int** | Grid's id | +**rowCount** | **int** | The number of rows the grid has | +**columnCount** | **int** | The number of columns the grid has | +**widgets** | [**List**](GridWidgetModel.md) | | [default to const []] +**createdAt** | [**DateTime**](DateTime.md) | The time the grid was created. | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | The time the grid was last updated. | [optional] +**links** | [**GridReadModelLinks**](GridReadModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GridReadModelLinks.md b/doc/GridReadModelLinks.md new file mode 100644 index 0000000..46c694b --- /dev/null +++ b/doc/GridReadModelLinks.md @@ -0,0 +1,21 @@ +# openapi.model.GridReadModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**GridReadModelLinksSelf**](GridReadModelLinksSelf.md) | | +**attachments** | [**GridReadModelLinksAttachments**](GridReadModelLinksAttachments.md) | | [optional] +**addAttachment** | [**GridReadModelLinksAddAttachment**](GridReadModelLinksAddAttachment.md) | | [optional] +**scope** | [**GridReadModelLinksScope**](GridReadModelLinksScope.md) | | +**updateImmediately** | [**GridReadModelLinksUpdateImmediately**](GridReadModelLinksUpdateImmediately.md) | | [optional] +**update** | [**GridReadModelLinksUpdate**](GridReadModelLinksUpdate.md) | | [optional] +**delete** | [**GridReadModelLinksDelete**](GridReadModelLinksDelete.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GridReadModelLinksAddAttachment.md b/doc/GridReadModelLinksAddAttachment.md new file mode 100644 index 0000000..2293740 --- /dev/null +++ b/doc/GridReadModelLinksAddAttachment.md @@ -0,0 +1,20 @@ +# openapi.model.GridReadModelLinksAddAttachment + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GridReadModelLinksAttachments.md b/doc/GridReadModelLinksAttachments.md new file mode 100644 index 0000000..cccea75 --- /dev/null +++ b/doc/GridReadModelLinksAttachments.md @@ -0,0 +1,20 @@ +# openapi.model.GridReadModelLinksAttachments + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GridReadModelLinksDelete.md b/doc/GridReadModelLinksDelete.md new file mode 100644 index 0000000..67bff40 --- /dev/null +++ b/doc/GridReadModelLinksDelete.md @@ -0,0 +1,20 @@ +# openapi.model.GridReadModelLinksDelete + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GridReadModelLinksScope.md b/doc/GridReadModelLinksScope.md new file mode 100644 index 0000000..dcfda39 --- /dev/null +++ b/doc/GridReadModelLinksScope.md @@ -0,0 +1,20 @@ +# openapi.model.GridReadModelLinksScope + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GridReadModelLinksSelf.md b/doc/GridReadModelLinksSelf.md new file mode 100644 index 0000000..917cb92 --- /dev/null +++ b/doc/GridReadModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.GridReadModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GridReadModelLinksUpdate.md b/doc/GridReadModelLinksUpdate.md new file mode 100644 index 0000000..247e5b8 --- /dev/null +++ b/doc/GridReadModelLinksUpdate.md @@ -0,0 +1,20 @@ +# openapi.model.GridReadModelLinksUpdate + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GridReadModelLinksUpdateImmediately.md b/doc/GridReadModelLinksUpdateImmediately.md new file mode 100644 index 0000000..6a7ee2b --- /dev/null +++ b/doc/GridReadModelLinksUpdateImmediately.md @@ -0,0 +1,20 @@ +# openapi.model.GridReadModelLinksUpdateImmediately + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GridWidgetModel.md b/doc/GridWidgetModel.md new file mode 100644 index 0000000..abc51db --- /dev/null +++ b/doc/GridWidgetModel.md @@ -0,0 +1,22 @@ +# openapi.model.GridWidgetModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**id** | **int** | The grid widget's unique identifier. Can be null, if a new widget is created within a grid. | +**identifier** | **String** | An alternative, human legible, and unique identifier. | +**startRow** | **int** | The index of the starting row of the widget. The row is inclusive. | +**endRow** | **int** | The index of the ending row of the widget. The row is exclusive. | +**startColumn** | **int** | The index of the starting column of the widget. The column is inclusive. | +**endColumn** | **int** | The index of the ending column of the widget. The column is exclusive. | +**options** | [**Object**](.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GridWriteModel.md b/doc/GridWriteModel.md new file mode 100644 index 0000000..b9036b1 --- /dev/null +++ b/doc/GridWriteModel.md @@ -0,0 +1,18 @@ +# openapi.model.GridWriteModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rowCount** | **int** | The number of rows the grid has | [optional] +**columnCount** | **int** | The number of columns the grid has | [optional] +**widgets** | [**List**](GridWidgetModel.md) | | [optional] [default to const []] +**links** | [**GridWriteModelLinks**](GridWriteModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GridWriteModelLinks.md b/doc/GridWriteModelLinks.md new file mode 100644 index 0000000..8693071 --- /dev/null +++ b/doc/GridWriteModelLinks.md @@ -0,0 +1,15 @@ +# openapi.model.GridWriteModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope** | [**GridReadModelLinksScope**](GridReadModelLinksScope.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GridsApi.md b/doc/GridsApi.md new file mode 100644 index 0000000..e8193d3 --- /dev/null +++ b/doc/GridsApi.md @@ -0,0 +1,296 @@ +# openapi.api.GridsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createGrid**](GridsApi.md#creategrid) | **POST** /api/v3/grids | Create a grid +[**getGrid**](GridsApi.md#getgrid) | **GET** /api/v3/grids/{id} | Get a grid +[**gridCreateForm**](GridsApi.md#gridcreateform) | **POST** /api/v3/grids/form | Grid Create Form +[**gridUpdateForm**](GridsApi.md#gridupdateform) | **POST** /api/v3/grids/{id}/form | Grid Update Form +[**listGrids**](GridsApi.md#listgrids) | **GET** /api/v3/grids | List grids +[**updateGrid**](GridsApi.md#updategrid) | **PATCH** /api/v3/grids/{id} | Update a grid + + +# **createGrid** +> GridReadModel createGrid(gridWriteModel) + +Create a grid + +Creates a new grid applying the attributes provided in the body. The constraints applied to the grid depend on the page the grid is placed in which is why the create form end point should be used to be guided when wanting to create a grid. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = GridsApi(); +final gridWriteModel = GridWriteModel(); // GridWriteModel | + +try { + final result = api_instance.createGrid(gridWriteModel); + print(result); +} catch (e) { + print('Exception when calling GridsApi->createGrid: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **gridWriteModel** | [**GridWriteModel**](GridWriteModel.md)| | [optional] + +### Return type + +[**GridReadModel**](GridReadModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getGrid** +> GridReadModel getGrid(id) + +Get a grid + +Fetches a single grid identified by its id. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = GridsApi(); +final id = 42; // int | Grid id + +try { + final result = api_instance.getGrid(id); + print(result); +} catch (e) { + print('Exception when calling GridsApi->getGrid: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Grid id | + +### Return type + +[**GridReadModel**](GridReadModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **gridCreateForm** +> gridCreateForm() + +Grid Create Form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = GridsApi(); + +try { + api_instance.gridCreateForm(); +} catch (e) { + print('Exception when calling GridsApi->gridCreateForm: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **gridUpdateForm** +> Object gridUpdateForm(id) + +Grid Update Form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = GridsApi(); +final id = 1; // int | ID of the grid being modified + +try { + final result = api_instance.gridUpdateForm(id); + print(result); +} catch (e) { + print('Exception when calling GridsApi->gridUpdateForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| ID of the grid being modified | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listGrids** +> GridCollectionModel listGrids(offset, pageSize, filters) + +List grids + +Lists all grids matching the provided filters and being part of the selected query page. The grids returned will also depend on the permissions of the requesting user. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = GridsApi(); +final offset = 25; // int | Page number inside the requested collection. +final pageSize = 25; // int | Number of elements to display per page. +final filters = [{ "page": { "operator": "=", "values": ["/my/page"] } }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: - page: Filter grid by work package + +try { + final result = api_instance.listGrids(offset, pageSize, filters); + print(result); +} catch (e) { + print('Exception when calling GridsApi->listGrids: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **offset** | **int**| Page number inside the requested collection. | [optional] [default to 1] + **pageSize** | **int**| Number of elements to display per page. | [optional] [default to 30] + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: - page: Filter grid by work package | [optional] + +### Return type + +[**GridCollectionModel**](GridCollectionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateGrid** +> GridReadModel updateGrid(id, gridWriteModel) + +Update a grid + +Updates the given grid by applying the attributes provided in the body. The constraints applied to the grid depend on the page the grid is placed in which is why the create form end point should be used to be guided when wanting to update a grid. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = GridsApi(); +final id = 1; // int | ID of the grid being modified +final gridWriteModel = GridWriteModel(); // GridWriteModel | + +try { + final result = api_instance.updateGrid(id, gridWriteModel); + print(result); +} catch (e) { + print('Exception when calling GridsApi->updateGrid: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| ID of the grid being modified | + **gridWriteModel** | [**GridWriteModel**](GridWriteModel.md)| | [optional] + +### Return type + +[**GridReadModel**](GridReadModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/GroupCollectionModel.md b/doc/GroupCollectionModel.md new file mode 100644 index 0000000..107ce1d --- /dev/null +++ b/doc/GroupCollectionModel.md @@ -0,0 +1,19 @@ +# openapi.model.GroupCollectionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**GroupCollectionModelAllOfLinks**](GroupCollectionModelAllOfLinks.md) | | +**embedded** | [**GroupCollectionModelAllOfEmbedded**](GroupCollectionModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GroupCollectionModelAllOfEmbedded.md b/doc/GroupCollectionModelAllOfEmbedded.md new file mode 100644 index 0000000..d34cffe --- /dev/null +++ b/doc/GroupCollectionModelAllOfEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.GroupCollectionModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**List**](GroupModel.md) | | [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GroupCollectionModelAllOfLinks.md b/doc/GroupCollectionModelAllOfLinks.md new file mode 100644 index 0000000..28666a1 --- /dev/null +++ b/doc/GroupCollectionModelAllOfLinks.md @@ -0,0 +1,15 @@ +# openapi.model.GroupCollectionModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**GroupCollectionModelAllOfLinksSelf**](GroupCollectionModelAllOfLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GroupCollectionModelAllOfLinksSelf.md b/doc/GroupCollectionModelAllOfLinksSelf.md new file mode 100644 index 0000000..ff239ce --- /dev/null +++ b/doc/GroupCollectionModelAllOfLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.GroupCollectionModelAllOfLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GroupModel.md b/doc/GroupModel.md new file mode 100644 index 0000000..5e5e192 --- /dev/null +++ b/doc/GroupModel.md @@ -0,0 +1,19 @@ +# openapi.model.GroupModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The group id | +**name** | **String** | Group's full name, formatting depends on instance settings # Conditions - admin | [optional] +**createdAt** | [**DateTime**](DateTime.md) | Time of creation # Conditions - admin | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | Time of the most recent change to the user | [optional] +**links** | [**GroupModelLinks**](GroupModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GroupModelLinks.md b/doc/GroupModelLinks.md new file mode 100644 index 0000000..eee3cfa --- /dev/null +++ b/doc/GroupModelLinks.md @@ -0,0 +1,19 @@ +# openapi.model.GroupModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**GroupModelLinksSelf**](GroupModelLinksSelf.md) | | +**delete** | [**GroupModelLinksDelete**](GroupModelLinksDelete.md) | | [optional] +**updateImmediately** | [**GroupModelLinksUpdateImmediately**](GroupModelLinksUpdateImmediately.md) | | [optional] +**memberships** | [**GroupModelLinksMemberships**](GroupModelLinksMemberships.md) | | [optional] +**members** | [**List**](GroupModelLinksMembersInner.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GroupModelLinksDelete.md b/doc/GroupModelLinksDelete.md new file mode 100644 index 0000000..75d9b1a --- /dev/null +++ b/doc/GroupModelLinksDelete.md @@ -0,0 +1,20 @@ +# openapi.model.GroupModelLinksDelete + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GroupModelLinksMembersInner.md b/doc/GroupModelLinksMembersInner.md new file mode 100644 index 0000000..da3b576 --- /dev/null +++ b/doc/GroupModelLinksMembersInner.md @@ -0,0 +1,20 @@ +# openapi.model.GroupModelLinksMembersInner + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GroupModelLinksMemberships.md b/doc/GroupModelLinksMemberships.md new file mode 100644 index 0000000..8ef6466 --- /dev/null +++ b/doc/GroupModelLinksMemberships.md @@ -0,0 +1,20 @@ +# openapi.model.GroupModelLinksMemberships + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GroupModelLinksSelf.md b/doc/GroupModelLinksSelf.md new file mode 100644 index 0000000..5fe57fc --- /dev/null +++ b/doc/GroupModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.GroupModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GroupModelLinksUpdateImmediately.md b/doc/GroupModelLinksUpdateImmediately.md new file mode 100644 index 0000000..668530a --- /dev/null +++ b/doc/GroupModelLinksUpdateImmediately.md @@ -0,0 +1,20 @@ +# openapi.model.GroupModelLinksUpdateImmediately + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GroupWriteModel.md b/doc/GroupWriteModel.md new file mode 100644 index 0000000..efd06ba --- /dev/null +++ b/doc/GroupWriteModel.md @@ -0,0 +1,16 @@ +# openapi.model.GroupWriteModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | The new group name. | [optional] +**links** | [**GroupWriteModelLinks**](GroupWriteModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GroupWriteModelLinks.md b/doc/GroupWriteModelLinks.md new file mode 100644 index 0000000..dc11d15 --- /dev/null +++ b/doc/GroupWriteModelLinks.md @@ -0,0 +1,15 @@ +# openapi.model.GroupWriteModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**members** | [**List**](GroupWriteModelLinksMembersInner.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GroupWriteModelLinksMembersInner.md b/doc/GroupWriteModelLinksMembersInner.md new file mode 100644 index 0000000..0a4110b --- /dev/null +++ b/doc/GroupWriteModelLinksMembersInner.md @@ -0,0 +1,20 @@ +# openapi.model.GroupWriteModelLinksMembersInner + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/GroupsApi.md b/doc/GroupsApi.md new file mode 100644 index 0000000..e8f9341 --- /dev/null +++ b/doc/GroupsApi.md @@ -0,0 +1,251 @@ +# openapi.api.GroupsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createGroup**](GroupsApi.md#creategroup) | **POST** /api/v3/groups | Create group +[**deleteGroup**](GroupsApi.md#deletegroup) | **DELETE** /api/v3/groups/{id} | Delete group +[**getGroup**](GroupsApi.md#getgroup) | **GET** /api/v3/groups/{id} | Get group +[**listGroups**](GroupsApi.md#listgroups) | **GET** /api/v3/groups | List groups +[**updateGroup**](GroupsApi.md#updategroup) | **PATCH** /api/v3/groups/{id} | Update group + + +# **createGroup** +> GroupModel createGroup(groupWriteModel) + +Create group + +Creates a new group applying the attributes provided in the body. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = GroupsApi(); +final groupWriteModel = GroupWriteModel(); // GroupWriteModel | + +try { + final result = api_instance.createGroup(groupWriteModel); + print(result); +} catch (e) { + print('Exception when calling GroupsApi->createGroup: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupWriteModel** | [**GroupWriteModel**](GroupWriteModel.md)| | [optional] + +### Return type + +[**GroupModel**](GroupModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteGroup** +> deleteGroup(id) + +Delete group + +Deletes the group. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = GroupsApi(); +final id = 1; // int | Group id + +try { + api_instance.deleteGroup(id); +} catch (e) { + print('Exception when calling GroupsApi->deleteGroup: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Group id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getGroup** +> GroupModel getGroup(id) + +Get group + +Fetches a group resource. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = GroupsApi(); +final id = 1; // int | Group id + +try { + final result = api_instance.getGroup(id); + print(result); +} catch (e) { + print('Exception when calling GroupsApi->getGroup: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Group id | + +### Return type + +[**GroupModel**](GroupModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listGroups** +> GroupCollectionModel listGroups(sortBy, select) + +List groups + +Returns a collection of groups. The client can choose to filter the groups similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain groups, for which the requesting client has sufficient permissions (*view_members*, *manage_members*). + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = GroupsApi(); +final sortBy = [["id", "asc"]]; // String | JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + created_at: Sort by group creation datetime + updated_at: Sort by the time the group was updated last +final select = total,elements/name,elements/self,self; // String | Comma separated list of properties to include. + +try { + final result = api_instance.listGroups(sortBy, select); + print(result); +} catch (e) { + print('Exception when calling GroupsApi->listGroups: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sortBy** | **String**| JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + created_at: Sort by group creation datetime + updated_at: Sort by the time the group was updated last | [optional] [default to '[["id", "asc"]]'] + **select** | **String**| Comma separated list of properties to include. | [optional] + +### Return type + +[**GroupCollectionModel**](GroupCollectionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateGroup** +> GroupModel updateGroup(id, groupWriteModel) + +Update group + +Updates the given group by applying the attributes provided in the body. Please note that the `members` array provided will override the existing set of members (similar to a PUT). A client thus has to provide the complete list of members the group is to have after the PATCH even if only one member is to be added. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = GroupsApi(); +final id = 1; // int | Group id +final groupWriteModel = GroupWriteModel(); // GroupWriteModel | + +try { + final result = api_instance.updateGroup(id, groupWriteModel); + print(result); +} catch (e) { + print('Exception when calling GroupsApi->updateGroup: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Group id | + **groupWriteModel** | [**GroupWriteModel**](GroupWriteModel.md)| | [optional] + +### Return type + +[**GroupModel**](GroupModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/HelpTextCollectionModel.md b/doc/HelpTextCollectionModel.md new file mode 100644 index 0000000..47f5424 --- /dev/null +++ b/doc/HelpTextCollectionModel.md @@ -0,0 +1,19 @@ +# openapi.model.HelpTextCollectionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**HelpTextCollectionModelAllOfLinks**](HelpTextCollectionModelAllOfLinks.md) | | +**embedded** | [**HelpTextCollectionModelAllOfEmbedded**](HelpTextCollectionModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/HelpTextCollectionModelAllOfEmbedded.md b/doc/HelpTextCollectionModelAllOfEmbedded.md new file mode 100644 index 0000000..650e921 --- /dev/null +++ b/doc/HelpTextCollectionModelAllOfEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.HelpTextCollectionModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**List**](HelpTextModel.md) | | [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/HelpTextCollectionModelAllOfLinks.md b/doc/HelpTextCollectionModelAllOfLinks.md new file mode 100644 index 0000000..396b945 --- /dev/null +++ b/doc/HelpTextCollectionModelAllOfLinks.md @@ -0,0 +1,15 @@ +# openapi.model.HelpTextCollectionModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**HelpTextCollectionModelAllOfLinksSelf**](HelpTextCollectionModelAllOfLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/HelpTextCollectionModelAllOfLinksSelf.md b/doc/HelpTextCollectionModelAllOfLinksSelf.md new file mode 100644 index 0000000..6ea1c94 --- /dev/null +++ b/doc/HelpTextCollectionModelAllOfLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.HelpTextCollectionModelAllOfLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/HelpTextModel.md b/doc/HelpTextModel.md new file mode 100644 index 0000000..686d7df --- /dev/null +++ b/doc/HelpTextModel.md @@ -0,0 +1,20 @@ +# openapi.model.HelpTextModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**id** | **int** | | +**attribute** | **String** | The attribute the help text is assigned to. | +**scope** | **String** | | +**helpText** | [**Formattable**](Formattable.md) | | +**links** | [**HelpTextModelLinks**](HelpTextModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/HelpTextModelLinks.md b/doc/HelpTextModelLinks.md new file mode 100644 index 0000000..923a79d --- /dev/null +++ b/doc/HelpTextModelLinks.md @@ -0,0 +1,18 @@ +# openapi.model.HelpTextModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**HelpTextModelLinksSelf**](HelpTextModelLinksSelf.md) | | +**editText** | [**HelpTextModelLinksEditText**](HelpTextModelLinksEditText.md) | | +**attachments** | [**HelpTextModelLinksAttachments**](HelpTextModelLinksAttachments.md) | | +**addAttachment** | [**HelpTextModelLinksAddAttachment**](HelpTextModelLinksAddAttachment.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/HelpTextModelLinksAddAttachment.md b/doc/HelpTextModelLinksAddAttachment.md new file mode 100644 index 0000000..65344f6 --- /dev/null +++ b/doc/HelpTextModelLinksAddAttachment.md @@ -0,0 +1,20 @@ +# openapi.model.HelpTextModelLinksAddAttachment + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/HelpTextModelLinksAttachments.md b/doc/HelpTextModelLinksAttachments.md new file mode 100644 index 0000000..76e507f --- /dev/null +++ b/doc/HelpTextModelLinksAttachments.md @@ -0,0 +1,20 @@ +# openapi.model.HelpTextModelLinksAttachments + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/HelpTextModelLinksEditText.md b/doc/HelpTextModelLinksEditText.md new file mode 100644 index 0000000..26b24a9 --- /dev/null +++ b/doc/HelpTextModelLinksEditText.md @@ -0,0 +1,20 @@ +# openapi.model.HelpTextModelLinksEditText + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/HelpTextModelLinksSelf.md b/doc/HelpTextModelLinksSelf.md new file mode 100644 index 0000000..3fddc8d --- /dev/null +++ b/doc/HelpTextModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.HelpTextModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/HelpTextsApi.md b/doc/HelpTextsApi.md new file mode 100644 index 0000000..af46bbc --- /dev/null +++ b/doc/HelpTextsApi.md @@ -0,0 +1,103 @@ +# openapi.api.HelpTextsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getHelpText**](HelpTextsApi.md#gethelptext) | **GET** /api/v3/help_texts/{id} | Get help text +[**listHelpTexts**](HelpTextsApi.md#listhelptexts) | **GET** /api/v3/help_texts | List help texts + + +# **getHelpText** +> HelpTextModel getHelpText(id) + +Get help text + +Fetches the help text from the given id. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = HelpTextsApi(); +final id = 1; // int | Help text id + +try { + final result = api_instance.getHelpText(id); + print(result); +} catch (e) { + print('Exception when calling HelpTextsApi->getHelpText: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Help text id | + +### Return type + +[**HelpTextModel**](HelpTextModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listHelpTexts** +> HelpTextCollectionModel listHelpTexts() + +List help texts + +List the complete collection of help texts. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = HelpTextsApi(); + +try { + final result = api_instance.listHelpTexts(); + print(result); +} catch (e) { + print('Exception when calling HelpTextsApi->listHelpTexts: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HelpTextCollectionModel**](HelpTextCollectionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/Link.md b/doc/Link.md new file mode 100644 index 0000000..b68c3b6 --- /dev/null +++ b/doc/Link.md @@ -0,0 +1,20 @@ +# openapi.model.Link + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/MembershipsApi.md b/doc/MembershipsApi.md new file mode 100644 index 0000000..d684181 --- /dev/null +++ b/doc/MembershipsApi.md @@ -0,0 +1,419 @@ +# openapi.api.MembershipsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**availableProjectsForMemberships**](MembershipsApi.md#availableprojectsformemberships) | **GET** /api/v3/memberships/available_projects | Available projects for memberships +[**createMembership**](MembershipsApi.md#createmembership) | **POST** /api/v3/memberships | Create membership +[**deleteMembership**](MembershipsApi.md#deletemembership) | **DELETE** /api/v3/memberships/{id} | Delete membership +[**listMemberships**](MembershipsApi.md#listmemberships) | **GET** /api/v3/memberships | List memberships +[**membershipCreateForm**](MembershipsApi.md#membershipcreateform) | **POST** /api/v3/memberships/form | Membership create form +[**membershipUpdateForm**](MembershipsApi.md#membershipupdateform) | **POST** /api/v3/memberships/{id}/form | Membership update form +[**updateMembership**](MembershipsApi.md#updatemembership) | **PATCH** /api/v3/memberships/{id} | Update membership +[**viewMembership**](MembershipsApi.md#viewmembership) | **GET** /api/v3/memberships/{id} | View membership +[**viewMembershipSchema**](MembershipsApi.md#viewmembershipschema) | **GET** /api/v3/memberships/schema | View membership schema + + +# **availableProjectsForMemberships** +> Object availableProjectsForMemberships() + +Available projects for memberships + +Gets a list of projects in which a membership can be created in. The list contains all projects in which the user issuing the request has the manage members permissions. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = MembershipsApi(); + +try { + final result = api_instance.availableProjectsForMemberships(); + print(result); +} catch (e) { + print('Exception when calling MembershipsApi->availableProjectsForMemberships: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createMembership** +> Object createMembership() + +Create membership + +Creates a new membership applying the attributes provided in the body. You can use the form and schema to retrieve the valid attribute values and by that be guided towards successful creation. By providing a `notificationMessage` within the `_meta` block of the payload, the client can include a customized message to the user of the newly created membership. In case of a group, the message will be sent to every user belonging to the group. By including `{ \"sendNotifications\": false }` within the `_meta` block of the payload, no notifications is send out at all. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = MembershipsApi(); + +try { + final result = api_instance.createMembership(); + print(result); +} catch (e) { + print('Exception when calling MembershipsApi->createMembership: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteMembership** +> deleteMembership(id) + +Delete membership + +Deletes the membership. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = MembershipsApi(); +final id = 1; // int | Membership id + +try { + api_instance.deleteMembership(id); +} catch (e) { + print('Exception when calling MembershipsApi->deleteMembership: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Membership id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listMemberships** +> Object listMemberships(filters, sortBy) + +List memberships + +Returns a collection of memberships. The client can choose to filter the memberships similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain memberships, for which the requesting client has sufficient permissions (*view_members*, *manage_members*). + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = MembershipsApi(); +final filters = [{ "name": { "operator": "=", "values": ["A User"] }" }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + any_name_attribute: filters memberships based on the name of the principal. All possible name variants (and also email and login) are searched. + blocked: reduces the result set to all memberships that are temporarily blocked or that are not blocked temporarily. + group: filters memberships based on the name of a group. The group however is not the principal used for filtering. Rather, the memberships of the group are used as the filter values. + name: filters memberships based on the name of the principal. Note that only the name is used which depends on a setting in the OpenProject instance. + principal: filters memberships based on the id of the principal. + project: filters memberships based on the id of the project. + role: filters memberships based on the id of any role assigned to the membership. + status: filters memberships based on the status of the principal. + created_at: filters memberships based on the time the membership was created. + updated_at: filters memberships based on the time the membership was updated last. +final sortBy = [["id", "asc"]]; // String | JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + name: Sort by the name of the principal. Note that this depends on the setting for how the name is to be displayed at least for users. + email: Sort by the email address of the principal. Groups and principal users, which do not have an email, are sorted last. + status: Sort by the status of the principal. Groups and principal users, which do not have a status, are sorted together with the active users. + created_at: Sort by membership creation datetime + updated_at: Sort by the time the membership was updated last + +try { + final result = api_instance.listMemberships(filters, sortBy); + print(result); +} catch (e) { + print('Exception when calling MembershipsApi->listMemberships: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + any_name_attribute: filters memberships based on the name of the principal. All possible name variants (and also email and login) are searched. + blocked: reduces the result set to all memberships that are temporarily blocked or that are not blocked temporarily. + group: filters memberships based on the name of a group. The group however is not the principal used for filtering. Rather, the memberships of the group are used as the filter values. + name: filters memberships based on the name of the principal. Note that only the name is used which depends on a setting in the OpenProject instance. + principal: filters memberships based on the id of the principal. + project: filters memberships based on the id of the project. + role: filters memberships based on the id of any role assigned to the membership. + status: filters memberships based on the status of the principal. + created_at: filters memberships based on the time the membership was created. + updated_at: filters memberships based on the time the membership was updated last. | [optional] + **sortBy** | **String**| JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + name: Sort by the name of the principal. Note that this depends on the setting for how the name is to be displayed at least for users. + email: Sort by the email address of the principal. Groups and principal users, which do not have an email, are sorted last. + status: Sort by the status of the principal. Groups and principal users, which do not have a status, are sorted together with the active users. + created_at: Sort by membership creation datetime + updated_at: Sort by the time the membership was updated last | [optional] [default to '[["id", "asc"]]'] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **membershipCreateForm** +> membershipCreateForm() + +Membership create form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = MembershipsApi(); + +try { + api_instance.membershipCreateForm(); +} catch (e) { + print('Exception when calling MembershipsApi->membershipCreateForm: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **membershipUpdateForm** +> membershipUpdateForm(id) + +Membership update form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = MembershipsApi(); +final id = 1; // int | Membership id + +try { + api_instance.membershipUpdateForm(id); +} catch (e) { + print('Exception when calling MembershipsApi->membershipUpdateForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Membership id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateMembership** +> Object updateMembership(id) + +Update membership + +Updates the given membership by applying the attributes provided in the body. By providing a `notificationMessage` within the `_meta` block of the payload, the client can include a customized message to the user of the updated membership. In case of a group, the message will be sent to every user belonging to the group. By including `{ \"sendNotifications\": false }` within the `_meta` block of the payload, no notifications is send out at all. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = MembershipsApi(); +final id = 1; // int | Membership id + +try { + final result = api_instance.updateMembership(id); + print(result); +} catch (e) { + print('Exception when calling MembershipsApi->updateMembership: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Membership id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewMembership** +> Object viewMembership(id) + +View membership + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = MembershipsApi(); +final id = 1; // int | Membership id + +try { + final result = api_instance.viewMembership(id); + print(result); +} catch (e) { + print('Exception when calling MembershipsApi->viewMembership: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Membership id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewMembershipSchema** +> Object viewMembershipSchema() + +View membership schema + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = MembershipsApi(); + +try { + final result = api_instance.viewMembershipSchema(); + print(result); +} catch (e) { + print('Exception when calling MembershipsApi->viewMembershipSchema: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/NewsApi.md b/doc/NewsApi.md new file mode 100644 index 0000000..de12b05 --- /dev/null +++ b/doc/NewsApi.md @@ -0,0 +1,113 @@ +# openapi.api.NewsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listNews**](NewsApi.md#listnews) | **GET** /api/v3/news | List News +[**viewNews**](NewsApi.md#viewnews) | **GET** /api/v3/news/{id} | View news + + +# **listNews** +> Object listNews(offset, pageSize, sortBy, filters) + +List News + +Lists news. The news returned depend on the provided parameters and also on the requesting user's permissions. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = NewsApi(); +final offset = 25; // int | Page number inside the requested collection. +final pageSize = 25; // int | Number of elements to display per page. +final sortBy = [["created_at", "asc"]]; // String | JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + created_at: Sort by news creation datetime +final filters = [{ "project_id": { "operator": "=", "values": ["1", "2"] } }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + project_id: Filter news by project + +try { + final result = api_instance.listNews(offset, pageSize, sortBy, filters); + print(result); +} catch (e) { + print('Exception when calling NewsApi->listNews: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **offset** | **int**| Page number inside the requested collection. | [optional] [default to 1] + **pageSize** | **int**| Number of elements to display per page. | [optional] + **sortBy** | **String**| JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + created_at: Sort by news creation datetime | [optional] + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + project_id: Filter news by project | [optional] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewNews** +> NewsModel viewNews(id) + +View news + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = NewsApi(); +final id = 1; // int | news id + +try { + final result = api_instance.viewNews(id); + print(result); +} catch (e) { + print('Exception when calling NewsApi->viewNews: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| news id | + +### Return type + +[**NewsModel**](NewsModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/NewsModel.md b/doc/NewsModel.md new file mode 100644 index 0000000..23482b7 --- /dev/null +++ b/doc/NewsModel.md @@ -0,0 +1,20 @@ +# openapi.model.NewsModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | News' id | [optional] [readonly] +**title** | **String** | The headline of the news | [optional] [readonly] +**summary** | **String** | A short summary | [optional] [readonly] +**description** | **String** | The main body of the news with all the details | [optional] [readonly] +**createdAt** | [**DateTime**](DateTime.md) | The time the news was created at | [optional] [readonly] +**links** | [**NewsModelLinks**](NewsModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NewsModelLinks.md b/doc/NewsModelLinks.md new file mode 100644 index 0000000..28d2eeb --- /dev/null +++ b/doc/NewsModelLinks.md @@ -0,0 +1,17 @@ +# openapi.model.NewsModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**NewsModelLinksSelf**](NewsModelLinksSelf.md) | | +**project** | [**NewsModelLinksProject**](NewsModelLinksProject.md) | | +**author** | [**NewsModelLinksAuthor**](NewsModelLinksAuthor.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NewsModelLinksAuthor.md b/doc/NewsModelLinksAuthor.md new file mode 100644 index 0000000..8bca9b2 --- /dev/null +++ b/doc/NewsModelLinksAuthor.md @@ -0,0 +1,20 @@ +# openapi.model.NewsModelLinksAuthor + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NewsModelLinksProject.md b/doc/NewsModelLinksProject.md new file mode 100644 index 0000000..0797329 --- /dev/null +++ b/doc/NewsModelLinksProject.md @@ -0,0 +1,20 @@ +# openapi.model.NewsModelLinksProject + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NewsModelLinksSelf.md b/doc/NewsModelLinksSelf.md new file mode 100644 index 0000000..6d5e00a --- /dev/null +++ b/doc/NewsModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.NewsModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NonWorkingDayCollectionModel.md b/doc/NonWorkingDayCollectionModel.md new file mode 100644 index 0000000..865cd46 --- /dev/null +++ b/doc/NonWorkingDayCollectionModel.md @@ -0,0 +1,19 @@ +# openapi.model.NonWorkingDayCollectionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**NonWorkingDayCollectionModelAllOfLinks**](NonWorkingDayCollectionModelAllOfLinks.md) | | +**embedded** | [**NonWorkingDayCollectionModelAllOfEmbedded**](NonWorkingDayCollectionModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NonWorkingDayCollectionModelAllOfEmbedded.md b/doc/NonWorkingDayCollectionModelAllOfEmbedded.md new file mode 100644 index 0000000..a3b7595 --- /dev/null +++ b/doc/NonWorkingDayCollectionModelAllOfEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.NonWorkingDayCollectionModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**List**](NonWorkingDayModel.md) | | [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NonWorkingDayCollectionModelAllOfLinks.md b/doc/NonWorkingDayCollectionModelAllOfLinks.md new file mode 100644 index 0000000..c0e970a --- /dev/null +++ b/doc/NonWorkingDayCollectionModelAllOfLinks.md @@ -0,0 +1,15 @@ +# openapi.model.NonWorkingDayCollectionModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**NonWorkingDayCollectionModelAllOfLinksSelf**](NonWorkingDayCollectionModelAllOfLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NonWorkingDayCollectionModelAllOfLinksSelf.md b/doc/NonWorkingDayCollectionModelAllOfLinksSelf.md new file mode 100644 index 0000000..124b3f9 --- /dev/null +++ b/doc/NonWorkingDayCollectionModelAllOfLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.NonWorkingDayCollectionModelAllOfLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NonWorkingDayModel.md b/doc/NonWorkingDayModel.md new file mode 100644 index 0000000..731f504 --- /dev/null +++ b/doc/NonWorkingDayModel.md @@ -0,0 +1,18 @@ +# openapi.model.NonWorkingDayModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**date** | [**DateTime**](DateTime.md) | Date of the non-working day. | +**name** | **String** | Descriptive name for the non-working day. | +**links** | [**NonWorkingDayModelLinks**](NonWorkingDayModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NonWorkingDayModelLinks.md b/doc/NonWorkingDayModelLinks.md new file mode 100644 index 0000000..468f76f --- /dev/null +++ b/doc/NonWorkingDayModelLinks.md @@ -0,0 +1,15 @@ +# openapi.model.NonWorkingDayModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**NonWorkingDayModelLinksSelf**](NonWorkingDayModelLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NonWorkingDayModelLinksSelf.md b/doc/NonWorkingDayModelLinksSelf.md new file mode 100644 index 0000000..d65bb79 --- /dev/null +++ b/doc/NonWorkingDayModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.NonWorkingDayModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationCollectionModel.md b/doc/NotificationCollectionModel.md new file mode 100644 index 0000000..77e86dd --- /dev/null +++ b/doc/NotificationCollectionModel.md @@ -0,0 +1,19 @@ +# openapi.model.NotificationCollectionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**NotificationCollectionModelAllOfLinks**](NotificationCollectionModelAllOfLinks.md) | | +**embedded** | [**NotificationCollectionModelAllOfEmbedded**](NotificationCollectionModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationCollectionModelAllOfEmbedded.md b/doc/NotificationCollectionModelAllOfEmbedded.md new file mode 100644 index 0000000..a2fb521 --- /dev/null +++ b/doc/NotificationCollectionModelAllOfEmbedded.md @@ -0,0 +1,16 @@ +# openapi.model.NotificationCollectionModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**List**](NotificationModel.md) | | [default to const []] +**detailsSchemas** | [**List**](SchemaModel.md) | | [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationCollectionModelAllOfLinks.md b/doc/NotificationCollectionModelAllOfLinks.md new file mode 100644 index 0000000..004eab3 --- /dev/null +++ b/doc/NotificationCollectionModelAllOfLinks.md @@ -0,0 +1,17 @@ +# openapi.model.NotificationCollectionModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**NotificationCollectionModelAllOfLinksSelf**](NotificationCollectionModelAllOfLinksSelf.md) | | +**jumpTo** | [**NotificationCollectionModelAllOfLinksJumpTo**](NotificationCollectionModelAllOfLinksJumpTo.md) | | [optional] +**changeSize** | [**NotificationCollectionModelAllOfLinksChangeSize**](NotificationCollectionModelAllOfLinksChangeSize.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationCollectionModelAllOfLinksChangeSize.md b/doc/NotificationCollectionModelAllOfLinksChangeSize.md new file mode 100644 index 0000000..cb38a51 --- /dev/null +++ b/doc/NotificationCollectionModelAllOfLinksChangeSize.md @@ -0,0 +1,20 @@ +# openapi.model.NotificationCollectionModelAllOfLinksChangeSize + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationCollectionModelAllOfLinksJumpTo.md b/doc/NotificationCollectionModelAllOfLinksJumpTo.md new file mode 100644 index 0000000..57f6567 --- /dev/null +++ b/doc/NotificationCollectionModelAllOfLinksJumpTo.md @@ -0,0 +1,20 @@ +# openapi.model.NotificationCollectionModelAllOfLinksJumpTo + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationCollectionModelAllOfLinksSelf.md b/doc/NotificationCollectionModelAllOfLinksSelf.md new file mode 100644 index 0000000..e831717 --- /dev/null +++ b/doc/NotificationCollectionModelAllOfLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.NotificationCollectionModelAllOfLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationModel.md b/doc/NotificationModel.md new file mode 100644 index 0000000..d36a740 --- /dev/null +++ b/doc/NotificationModel.md @@ -0,0 +1,23 @@ +# openapi.model.NotificationModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**id** | **int** | Notification id | [optional] +**reason** | **String** | The reason for the notification | [optional] +**readIAN** | **bool** | Whether the notification is marked as read | [optional] +**details** | [**List**](NotificationModelDetailsInner.md) | | [optional] [default to const []] +**createdAt** | [**DateTime**](DateTime.md) | The time the notification was created at | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | The time the notification was last updated | [optional] +**embedded** | [**NotificationModelEmbedded**](NotificationModelEmbedded.md) | | [optional] +**links** | [**NotificationModelLinks**](NotificationModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationModelDetailsInner.md b/doc/NotificationModelDetailsInner.md new file mode 100644 index 0000000..d2fab6e --- /dev/null +++ b/doc/NotificationModelDetailsInner.md @@ -0,0 +1,18 @@ +# openapi.model.NotificationModelDetailsInner + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**Object**](Object.md) | | +**property** | [**Object**](.md) | The key of the key - value pair represented by the Values::Property | +**value** | [**Object**](.md) | The value of the key - value pair represented by the Values::Property | +**links** | [**ValuesPropertyModelLinks**](ValuesPropertyModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationModelEmbedded.md b/doc/NotificationModelEmbedded.md new file mode 100644 index 0000000..fc10238 --- /dev/null +++ b/doc/NotificationModelEmbedded.md @@ -0,0 +1,18 @@ +# openapi.model.NotificationModelEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actor** | [**UserModel**](UserModel.md) | | [optional] +**project** | [**ProjectModel**](ProjectModel.md) | | +**activity** | [**ActivityModel**](ActivityModel.md) | | [optional] +**resource** | [**NotificationModelEmbeddedResource**](NotificationModelEmbeddedResource.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationModelEmbeddedResource.md b/doc/NotificationModelEmbeddedResource.md new file mode 100644 index 0000000..ebc2064 --- /dev/null +++ b/doc/NotificationModelEmbeddedResource.md @@ -0,0 +1,35 @@ +# openapi.model.NotificationModelEmbeddedResource + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**Object**](.md) | Work package id | [optional] [readonly] +**lockVersion** | [**Object**](.md) | The version of the item as used for optimistic locking | [optional] [readonly] +**subject** | [**Object**](.md) | Work package subject | +**type** | [**Object**](Object.md) | | [optional] [readonly] +**description** | [**WorkPackageModelDescription**](WorkPackageModelDescription.md) | | [optional] +**scheduleManually** | [**Object**](.md) | If false (default) schedule automatically. | [optional] +**readonly** | [**Object**](.md) | If true, the work package is in a readonly status so with the exception of the status, no other property can be altered. | [optional] +**startDate** | [**Object**](.md) | Scheduled beginning of a work package | [optional] +**dueDate** | [**Object**](.md) | Scheduled end of a work package | [optional] +**date** | [**Object**](.md) | Date on which a milestone is achieved | [optional] +**derivedStartDate** | [**Object**](.md) | Similar to start date but is not set by a client but rather deduced by the work packages' descendants. If manual scheduleManually is active, the two dates can deviate. | [optional] [readonly] +**derivedDueDate** | [**Object**](.md) | Similar to due date but is not set by a client but rather deduced by the work packages' descendants. If manual scheduleManually is active, the two dates can deviate. | [optional] [readonly] +**duration** | [**Object**](.md) | **(NOT IMPLEMENTED)** The amount of time in hours the work package needs to be completed. Not available for milestone type of work packages. | [optional] [readonly] +**estimatedTime** | [**Object**](.md) | Time a work package likely needs to be completed excluding its descendants | [optional] +**derivedEstimatedTime** | [**Object**](.md) | Time a work package likely needs to be completed including its descendants | [optional] [readonly] +**ignoreNonWorkingDays** | [**Object**](.md) | **(NOT IMPLEMENTED)** When scheduling, whether or not to ignore the non working days being defined. A work package with the flag set to true will be allowed to be scheduled to a non working day. | [optional] [readonly] +**spentTime** | [**Object**](.md) | The time booked for this work package by users working on it # Conditions **Permission** view time entries | [optional] [readonly] +**percentageDone** | [**Object**](.md) | Amount of total completion for a work package | [optional] +**createdAt** | [**Object**](.md) | Time of creation | [optional] [readonly] +**updatedAt** | [**Object**](.md) | Time of the most recent change to the work package | [optional] [readonly] +**links** | [**WorkPackageModelLinks**](WorkPackageModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationModelLinks.md b/doc/NotificationModelLinks.md new file mode 100644 index 0000000..fd3c02f --- /dev/null +++ b/doc/NotificationModelLinks.md @@ -0,0 +1,22 @@ +# openapi.model.NotificationModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**NotificationModelLinksSelf**](NotificationModelLinksSelf.md) | | +**readIAN** | [**NotificationModelLinksReadIAN**](NotificationModelLinksReadIAN.md) | | [optional] +**unreadIAN** | [**NotificationModelLinksUnreadIAN**](NotificationModelLinksUnreadIAN.md) | | [optional] +**project** | [**NotificationModelLinksProject**](NotificationModelLinksProject.md) | | +**actor** | [**NotificationModelLinksActor**](NotificationModelLinksActor.md) | | +**resource** | [**NotificationModelLinksResource**](NotificationModelLinksResource.md) | | +**activity** | [**NotificationModelLinksActivity**](NotificationModelLinksActivity.md) | | +**details** | [**List**](NotificationModelLinksDetailsInner.md) | | [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationModelLinksActivity.md b/doc/NotificationModelLinksActivity.md new file mode 100644 index 0000000..c699c8c --- /dev/null +++ b/doc/NotificationModelLinksActivity.md @@ -0,0 +1,20 @@ +# openapi.model.NotificationModelLinksActivity + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationModelLinksActor.md b/doc/NotificationModelLinksActor.md new file mode 100644 index 0000000..8053264 --- /dev/null +++ b/doc/NotificationModelLinksActor.md @@ -0,0 +1,20 @@ +# openapi.model.NotificationModelLinksActor + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationModelLinksDetailsInner.md b/doc/NotificationModelLinksDetailsInner.md new file mode 100644 index 0000000..ea21317 --- /dev/null +++ b/doc/NotificationModelLinksDetailsInner.md @@ -0,0 +1,20 @@ +# openapi.model.NotificationModelLinksDetailsInner + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationModelLinksProject.md b/doc/NotificationModelLinksProject.md new file mode 100644 index 0000000..6007df5 --- /dev/null +++ b/doc/NotificationModelLinksProject.md @@ -0,0 +1,20 @@ +# openapi.model.NotificationModelLinksProject + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationModelLinksReadIAN.md b/doc/NotificationModelLinksReadIAN.md new file mode 100644 index 0000000..552a671 --- /dev/null +++ b/doc/NotificationModelLinksReadIAN.md @@ -0,0 +1,20 @@ +# openapi.model.NotificationModelLinksReadIAN + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationModelLinksResource.md b/doc/NotificationModelLinksResource.md new file mode 100644 index 0000000..6903159 --- /dev/null +++ b/doc/NotificationModelLinksResource.md @@ -0,0 +1,20 @@ +# openapi.model.NotificationModelLinksResource + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationModelLinksSelf.md b/doc/NotificationModelLinksSelf.md new file mode 100644 index 0000000..2ddefe7 --- /dev/null +++ b/doc/NotificationModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.NotificationModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationModelLinksUnreadIAN.md b/doc/NotificationModelLinksUnreadIAN.md new file mode 100644 index 0000000..144d201 --- /dev/null +++ b/doc/NotificationModelLinksUnreadIAN.md @@ -0,0 +1,20 @@ +# openapi.model.NotificationModelLinksUnreadIAN + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/NotificationsApi.md b/doc/NotificationsApi.md new file mode 100644 index 0000000..3cd8161 --- /dev/null +++ b/doc/NotificationsApi.md @@ -0,0 +1,348 @@ +# openapi.api.NotificationsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listNotifications**](NotificationsApi.md#listnotifications) | **GET** /api/v3/notifications | Get notification collection +[**readNotification**](NotificationsApi.md#readnotification) | **POST** /api/v3/notifications/{id}/read_ian | Read notification +[**readNotifications**](NotificationsApi.md#readnotifications) | **POST** /api/v3/notifications/read_ian | Read all notifications +[**unreadNotification**](NotificationsApi.md#unreadnotification) | **POST** /api/v3/notifications/{id}/unread_ian | Unread notification +[**unreadNotifications**](NotificationsApi.md#unreadnotifications) | **POST** /api/v3/notifications/unread_ian | Unread all notifications +[**viewNotification**](NotificationsApi.md#viewnotification) | **GET** /api/v3/notifications/{id} | Get the notification +[**viewNotificationDetail**](NotificationsApi.md#viewnotificationdetail) | **GET** /api/v3/notifications/{notification_id}/details/{id} | Get a notification detail + + +# **listNotifications** +> NotificationCollectionModel listNotifications(offset, pageSize, sortBy, groupBy, filters) + +Get notification collection + +Returns the collection of available in-app notifications. The notifications returned depend on the provided parameters and also on the requesting user's permissions. Contrary to most collections, this one also links to and embeds schemas for the `details` properties of the notifications returned. This is an optimization. Clients will receive the information necessary to display the various types of details that a notification can carry. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = NotificationsApi(); +final offset = 25; // int | Page number inside the requested collection. +final pageSize = 25; // int | Number of elements to display per page. +final sortBy = [["reason", "asc"]]; // String | JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + reason: Sort by notification reason + readIAN: Sort by read status +final groupBy = reason; // String | string specifying group_by criteria. + reason: Group by notification reason + project: Sort by associated project +final filters = [{ "readIAN": { "operator": "=", "values": ["t"] } }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Filter by primary key + project: Filter by the project the notification was created in + readIAN: Filter by read status + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the `resourceType` filter. + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with the `resourceId` filter. + +try { + final result = api_instance.listNotifications(offset, pageSize, sortBy, groupBy, filters); + print(result); +} catch (e) { + print('Exception when calling NotificationsApi->listNotifications: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **offset** | **int**| Page number inside the requested collection. | [optional] [default to 1] + **pageSize** | **int**| Number of elements to display per page. | [optional] [default to 20] + **sortBy** | **String**| JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + reason: Sort by notification reason + readIAN: Sort by read status | [optional] + **groupBy** | **String**| string specifying group_by criteria. + reason: Group by notification reason + project: Sort by associated project | [optional] + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Filter by primary key + project: Filter by the project the notification was created in + readIAN: Filter by read status + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the `resourceType` filter. + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with the `resourceId` filter. | [optional] + +### Return type + +[**NotificationCollectionModel**](NotificationCollectionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **readNotification** +> readNotification(id) + +Read notification + +Marks the given notification as read. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = NotificationsApi(); +final id = 1; // int | notification id + +try { + api_instance.readNotification(id); +} catch (e) { + print('Exception when calling NotificationsApi->readNotification: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| notification id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **readNotifications** +> readNotifications(filters) + +Read all notifications + +Marks the whole notification collection as read. The collection contains only elements the authenticated user can see, and can be further reduced with filters. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = NotificationsApi(); +final filters = [{ "reason": { "operator": "=", "values": ["mentioned"] } }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Filter by primary key + project: Filter by the project the notification was created in + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the `resourceType` filter. + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with the `resourceId` filter. + +try { + api_instance.readNotifications(filters); +} catch (e) { + print('Exception when calling NotificationsApi->readNotifications: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Filter by primary key + project: Filter by the project the notification was created in + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the `resourceType` filter. + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with the `resourceId` filter. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **unreadNotification** +> unreadNotification(id) + +Unread notification + +Marks the given notification as unread. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = NotificationsApi(); +final id = 1; // int | notification id + +try { + api_instance.unreadNotification(id); +} catch (e) { + print('Exception when calling NotificationsApi->unreadNotification: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| notification id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **unreadNotifications** +> unreadNotifications(filters) + +Unread all notifications + +Marks the whole notification collection as unread. The collection contains only elements the authenticated user can see, and can be further reduced with filters. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = NotificationsApi(); +final filters = [{ "reason": { "operator": "=", "values": ["mentioned"] } }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Filter by primary key + project: Filter by the project the notification was created in + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the `resourceType` filter. + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with the `resourceId` filter. + +try { + api_instance.unreadNotifications(filters); +} catch (e) { + print('Exception when calling NotificationsApi->unreadNotifications: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Filter by primary key + project: Filter by the project the notification was created in + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the `resourceType` filter. + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with the `resourceId` filter. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewNotification** +> NotificationModel viewNotification(id) + +Get the notification + +Returns the notification identified by the notification id. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = NotificationsApi(); +final id = 1; // int | notification id + +try { + final result = api_instance.viewNotification(id); + print(result); +} catch (e) { + print('Exception when calling NotificationsApi->viewNotification: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| notification id | + +### Return type + +[**NotificationModel**](NotificationModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewNotificationDetail** +> ValuesPropertyModel viewNotificationDetail(notificationId, id) + +Get a notification detail + +Returns an individual detail of a notification identified by the notification id and the id of the detail. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = NotificationsApi(); +final notificationId = 1; // int | notification id +final id = 0; // int | detail id + +try { + final result = api_instance.viewNotificationDetail(notificationId, id); + print(result); +} catch (e) { + print('Exception when calling NotificationsApi->viewNotificationDetail: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **notificationId** | **int**| notification id | + **id** | **int**| detail id | + +### Return type + +[**ValuesPropertyModel**](ValuesPropertyModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/OAuth2Api.md b/doc/OAuth2Api.md new file mode 100644 index 0000000..22c1e7d --- /dev/null +++ b/doc/OAuth2Api.md @@ -0,0 +1,107 @@ +# openapi.api.OAuth2Api + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getOauthApplication**](OAuth2Api.md#getoauthapplication) | **GET** /api/v3/oauth_applications/{id} | Get the oauth application. +[**getOauthClientCredentials**](OAuth2Api.md#getoauthclientcredentials) | **GET** /api/v3/oauth_client_credentials/{id} | Get the oauth client credentials object. + + +# **getOauthApplication** +> OAuthApplicationReadModel getOauthApplication(id) + +Get the oauth application. + +Retrieves the OAuth 2 provider application for the given identifier. The secret will not be part of the response, instead a `confidential` flag is indicating, whether there is a secret or not. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = OAuth2Api(); +final id = 1337; // int | OAuth application id + +try { + final result = api_instance.getOauthApplication(id); + print(result); +} catch (e) { + print('Exception when calling OAuth2Api->getOauthApplication: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| OAuth application id | + +### Return type + +[**OAuthApplicationReadModel**](OAuthApplicationReadModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOauthClientCredentials** +> OAuthClientCredentialsReadModel getOauthClientCredentials(id) + +Get the oauth client credentials object. + +Retrieves the OAuth 2 client credentials for the given identifier. The secret will not be part of the response, instead a `confidential` flag is indicating, whether there is a secret or not. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = OAuth2Api(); +final id = 1337; // int | OAuth Client Credentials id + +try { + final result = api_instance.getOauthClientCredentials(id); + print(result); +} catch (e) { + print('Exception when calling OAuth2Api->getOauthClientCredentials: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| OAuth Client Credentials id | + +### Return type + +[**OAuthClientCredentialsReadModel**](OAuthClientCredentialsReadModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/OAuthApplicationReadModel.md b/doc/OAuthApplicationReadModel.md new file mode 100644 index 0000000..ab1edcc --- /dev/null +++ b/doc/OAuthApplicationReadModel.md @@ -0,0 +1,24 @@ +# openapi.model.OAuthApplicationReadModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**type** | **String** | | +**name** | **String** | The name of the OAuth 2 application | +**clientId** | **String** | OAuth 2 client id | +**clientSecret** | **String** | OAuth 2 client secret. This is only returned when creating a new OAuth application. | [optional] +**confidential** | **bool** | true, if OAuth 2 credentials are confidential, false, if no secret is stored | +**createdAt** | [**DateTime**](DateTime.md) | The time the OAuth 2 Application was created at | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | The time the OAuth 2 Application was last updated | [optional] +**scopes** | **List** | | [optional] [default to const []] +**links** | [**OAuthApplicationReadModelLinks**](OAuthApplicationReadModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OAuthApplicationReadModelLinks.md b/doc/OAuthApplicationReadModelLinks.md new file mode 100644 index 0000000..42bf29e --- /dev/null +++ b/doc/OAuthApplicationReadModelLinks.md @@ -0,0 +1,18 @@ +# openapi.model.OAuthApplicationReadModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**OAuthApplicationReadModelLinksSelf**](OAuthApplicationReadModelLinksSelf.md) | | +**owner** | [**OAuthApplicationReadModelLinksOwner**](OAuthApplicationReadModelLinksOwner.md) | | +**integration** | [**OAuthApplicationReadModelLinksIntegration**](OAuthApplicationReadModelLinksIntegration.md) | | [optional] +**redirectUri** | [**OAuthApplicationReadModelLinksRedirectUri**](OAuthApplicationReadModelLinksRedirectUri.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OAuthApplicationReadModelLinksIntegration.md b/doc/OAuthApplicationReadModelLinksIntegration.md new file mode 100644 index 0000000..deaa1b5 --- /dev/null +++ b/doc/OAuthApplicationReadModelLinksIntegration.md @@ -0,0 +1,20 @@ +# openapi.model.OAuthApplicationReadModelLinksIntegration + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OAuthApplicationReadModelLinksOwner.md b/doc/OAuthApplicationReadModelLinksOwner.md new file mode 100644 index 0000000..0c29185 --- /dev/null +++ b/doc/OAuthApplicationReadModelLinksOwner.md @@ -0,0 +1,20 @@ +# openapi.model.OAuthApplicationReadModelLinksOwner + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OAuthApplicationReadModelLinksRedirectUri.md b/doc/OAuthApplicationReadModelLinksRedirectUri.md new file mode 100644 index 0000000..dc385ae --- /dev/null +++ b/doc/OAuthApplicationReadModelLinksRedirectUri.md @@ -0,0 +1,20 @@ +# openapi.model.OAuthApplicationReadModelLinksRedirectUri + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OAuthApplicationReadModelLinksSelf.md b/doc/OAuthApplicationReadModelLinksSelf.md new file mode 100644 index 0000000..d4f3f2c --- /dev/null +++ b/doc/OAuthApplicationReadModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.OAuthApplicationReadModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OAuthClientCredentialsReadModel.md b/doc/OAuthClientCredentialsReadModel.md new file mode 100644 index 0000000..2a21f27 --- /dev/null +++ b/doc/OAuthClientCredentialsReadModel.md @@ -0,0 +1,21 @@ +# openapi.model.OAuthClientCredentialsReadModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**type** | **String** | | +**clientId** | **String** | OAuth 2 client id | +**confidential** | **bool** | true, if OAuth 2 credentials are confidential, false, if no secret is stored | +**createdAt** | [**DateTime**](DateTime.md) | The time the OAuth client credentials were created at | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | The time the OAuth client credentials were last updated | [optional] +**links** | [**OAuthClientCredentialsReadModelLinks**](OAuthClientCredentialsReadModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OAuthClientCredentialsReadModelLinks.md b/doc/OAuthClientCredentialsReadModelLinks.md new file mode 100644 index 0000000..c0b738e --- /dev/null +++ b/doc/OAuthClientCredentialsReadModelLinks.md @@ -0,0 +1,16 @@ +# openapi.model.OAuthClientCredentialsReadModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**OAuthClientCredentialsReadModelLinksSelf**](OAuthClientCredentialsReadModelLinksSelf.md) | | +**integration** | [**OAuthClientCredentialsReadModelLinksIntegration**](OAuthClientCredentialsReadModelLinksIntegration.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OAuthClientCredentialsReadModelLinksIntegration.md b/doc/OAuthClientCredentialsReadModelLinksIntegration.md new file mode 100644 index 0000000..8ced87f --- /dev/null +++ b/doc/OAuthClientCredentialsReadModelLinksIntegration.md @@ -0,0 +1,20 @@ +# openapi.model.OAuthClientCredentialsReadModelLinksIntegration + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OAuthClientCredentialsReadModelLinksSelf.md b/doc/OAuthClientCredentialsReadModelLinksSelf.md new file mode 100644 index 0000000..1a7a6dc --- /dev/null +++ b/doc/OAuthClientCredentialsReadModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.OAuthClientCredentialsReadModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OAuthClientCredentialsWriteModel.md b/doc/OAuthClientCredentialsWriteModel.md new file mode 100644 index 0000000..17601ee --- /dev/null +++ b/doc/OAuthClientCredentialsWriteModel.md @@ -0,0 +1,16 @@ +# openapi.model.OAuthClientCredentialsWriteModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**clientId** | **String** | OAuth 2 client id | +**clientSecret** | **String** | OAuth 2 client secret | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/PaginatedCollectionModel.md b/doc/PaginatedCollectionModel.md new file mode 100644 index 0000000..b97894a --- /dev/null +++ b/doc/PaginatedCollectionModel.md @@ -0,0 +1,20 @@ +# openapi.model.PaginatedCollectionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**PaginatedCollectionModelAllOfLinks**](PaginatedCollectionModelAllOfLinks.md) | | +**pageSize** | **int** | Amount of elements that a response will hold. | +**offset** | **int** | The page number that is requested from paginated collection. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/PaginatedCollectionModelAllOfLinks.md b/doc/PaginatedCollectionModelAllOfLinks.md new file mode 100644 index 0000000..7540421 --- /dev/null +++ b/doc/PaginatedCollectionModelAllOfLinks.md @@ -0,0 +1,16 @@ +# openapi.model.PaginatedCollectionModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**jumpTo** | [**PaginatedCollectionModelAllOfLinksJumpTo**](PaginatedCollectionModelAllOfLinksJumpTo.md) | | +**changeSize** | [**PaginatedCollectionModelAllOfLinksChangeSize**](PaginatedCollectionModelAllOfLinksChangeSize.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/PaginatedCollectionModelAllOfLinksChangeSize.md b/doc/PaginatedCollectionModelAllOfLinksChangeSize.md new file mode 100644 index 0000000..0b442c0 --- /dev/null +++ b/doc/PaginatedCollectionModelAllOfLinksChangeSize.md @@ -0,0 +1,20 @@ +# openapi.model.PaginatedCollectionModelAllOfLinksChangeSize + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/PaginatedCollectionModelAllOfLinksJumpTo.md b/doc/PaginatedCollectionModelAllOfLinksJumpTo.md new file mode 100644 index 0000000..e7a70e0 --- /dev/null +++ b/doc/PaginatedCollectionModelAllOfLinksJumpTo.md @@ -0,0 +1,20 @@ +# openapi.model.PaginatedCollectionModelAllOfLinksJumpTo + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/PostModel.md b/doc/PostModel.md new file mode 100644 index 0000000..180078d --- /dev/null +++ b/doc/PostModel.md @@ -0,0 +1,17 @@ +# openapi.model.PostModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Identifier of this post | [optional] [readonly] +**subject** | **String** | The post's subject | +**links** | [**PostModelLinks**](PostModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/PostModelLinks.md b/doc/PostModelLinks.md new file mode 100644 index 0000000..b95ce6f --- /dev/null +++ b/doc/PostModelLinks.md @@ -0,0 +1,15 @@ +# openapi.model.PostModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**addAttachment** | [**PostModelLinksAddAttachment**](PostModelLinksAddAttachment.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/PostModelLinksAddAttachment.md b/doc/PostModelLinksAddAttachment.md new file mode 100644 index 0000000..9ae9a31 --- /dev/null +++ b/doc/PostModelLinksAddAttachment.md @@ -0,0 +1,20 @@ +# openapi.model.PostModelLinksAddAttachment + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/PostsApi.md b/doc/PostsApi.md new file mode 100644 index 0000000..ad9fd6d --- /dev/null +++ b/doc/PostsApi.md @@ -0,0 +1,60 @@ +# openapi.api.PostsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**viewPost**](PostsApi.md#viewpost) | **GET** /api/v3/posts/{id} | View Post + + +# **viewPost** +> PostModel viewPost(id) + +View Post + +Retrieve an individual post as identified by the id parameter + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = PostsApi(); +final id = 1; // int | Post's identifier + +try { + final result = api_instance.viewPost(id); + print(result); +} catch (e) { + print('Exception when calling PostsApi->viewPost: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Post's identifier | + +### Return type + +[**PostModel**](PostModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/PreviewingApi.md b/doc/PreviewingApi.md new file mode 100644 index 0000000..c058d64 --- /dev/null +++ b/doc/PreviewingApi.md @@ -0,0 +1,103 @@ +# openapi.api.PreviewingApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**previewMarkdownDocument**](PreviewingApi.md#previewmarkdowndocument) | **POST** /api/v3/render/markdown | Preview Markdown document +[**previewPlainDocument**](PreviewingApi.md#previewplaindocument) | **POST** /api/v3/render/plain | Preview plain document + + +# **previewMarkdownDocument** +> String previewMarkdownDocument(context) + +Preview Markdown document + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = PreviewingApi(); +final context = /api/v3/work_packages/42; // String | API-Link to the context in which the rendering occurs, for example a specific work package. If left out only context-agnostic rendering takes place. Please note that OpenProject features markdown-extensions on top of the extensions GitHub Flavored Markdown (gfm) already provides that can only work given a context (e.g. display attached images). **Supported contexts:** * `/api/v3/work_packages/{id}` - an existing work package + +try { + final result = api_instance.previewMarkdownDocument(context); + print(result); +} catch (e) { + print('Exception when calling PreviewingApi->previewMarkdownDocument: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **context** | **String**| API-Link to the context in which the rendering occurs, for example a specific work package. If left out only context-agnostic rendering takes place. Please note that OpenProject features markdown-extensions on top of the extensions GitHub Flavored Markdown (gfm) already provides that can only work given a context (e.g. display attached images). **Supported contexts:** * `/api/v3/work_packages/{id}` - an existing work package | [optional] + +### Return type + +**String** + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/html, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **previewPlainDocument** +> String previewPlainDocument() + +Preview plain document + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = PreviewingApi(); + +try { + final result = api_instance.previewPlainDocument(); + print(result); +} catch (e) { + print('Exception when calling PreviewingApi->previewPlainDocument: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/html, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/PrincipalsApi.md b/doc/PrincipalsApi.md new file mode 100644 index 0000000..0e17cbe --- /dev/null +++ b/doc/PrincipalsApi.md @@ -0,0 +1,62 @@ +# openapi.api.PrincipalsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listPrincipals**](PrincipalsApi.md#listprincipals) | **GET** /api/v3/principals | List principals + + +# **listPrincipals** +> Object listPrincipals(filters, select) + +List principals + +List all principals. The client can choose to filter the principals similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain principals who are members in projects the client is allowed to see. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = PrincipalsApi(); +final filters = [{ "type": { "operator": "=", "values": ["User"] } }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + type: filters principals by their type (*User*, *Group*, *PlaceholderUser*). + member: filters principals by the projects they are members in. + name: filters principals by the user or group name. + any_name_attribute: filters principals by the user or group first- and last name, email or login. + status: filters principals by their status number (active = *1*, registered = *2*, locked = *3*, invited = *4*) +final select = total,elements/name,elements/self,self; // String | Comma separated list of properties to include. + +try { + final result = api_instance.listPrincipals(filters, select); + print(result); +} catch (e) { + print('Exception when calling PrincipalsApi->listPrincipals: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + type: filters principals by their type (*User*, *Group*, *PlaceholderUser*). + member: filters principals by the projects they are members in. + name: filters principals by the user or group name. + any_name_attribute: filters principals by the user or group first- and last name, email or login. + status: filters principals by their status number (active = *1*, registered = *2*, locked = *3*, invited = *4*) | [optional] + **select** | **String**| Comma separated list of properties to include. | [optional] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/PrioritiesApi.md b/doc/PrioritiesApi.md new file mode 100644 index 0000000..3f5c877 --- /dev/null +++ b/doc/PrioritiesApi.md @@ -0,0 +1,103 @@ +# openapi.api.PrioritiesApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listAllPriorities**](PrioritiesApi.md#listallpriorities) | **GET** /api/v3/priorities | List all Priorities +[**viewPriority**](PrioritiesApi.md#viewpriority) | **GET** /api/v3/priorities/{id} | View Priority + + +# **listAllPriorities** +> Object listAllPriorities() + +List all Priorities + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = PrioritiesApi(); + +try { + final result = api_instance.listAllPriorities(); + print(result); +} catch (e) { + print('Exception when calling PrioritiesApi->listAllPriorities: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewPriority** +> PriorityModel viewPriority(id) + +View Priority + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = PrioritiesApi(); +final id = 1; // int | Priority id + +try { + final result = api_instance.viewPriority(id); + print(result); +} catch (e) { + print('Exception when calling PrioritiesApi->viewPriority: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Priority id | + +### Return type + +[**PriorityModel**](PriorityModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/PriorityModel.md b/doc/PriorityModel.md new file mode 100644 index 0000000..2dba5a5 --- /dev/null +++ b/doc/PriorityModel.md @@ -0,0 +1,20 @@ +# openapi.model.PriorityModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Priority id | [optional] [readonly] +**name** | **String** | Priority name | [optional] [readonly] +**position** | **int** | Sort index of the priority | [optional] [readonly] +**isDefault** | **bool** | Indicates whether this is the default value | [optional] [readonly] +**isActive** | **bool** | Indicates whether the priority is available | [optional] +**links** | [**PriorityModelLinks**](PriorityModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/PriorityModelLinks.md b/doc/PriorityModelLinks.md new file mode 100644 index 0000000..148e1c1 --- /dev/null +++ b/doc/PriorityModelLinks.md @@ -0,0 +1,15 @@ +# openapi.model.PriorityModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**PriorityModelLinksSelf**](PriorityModelLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/PriorityModelLinksSelf.md b/doc/PriorityModelLinksSelf.md new file mode 100644 index 0000000..e8e9680 --- /dev/null +++ b/doc/PriorityModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.PriorityModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModel.md b/doc/ProjectModel.md new file mode 100644 index 0000000..2c85dfc --- /dev/null +++ b/doc/ProjectModel.md @@ -0,0 +1,25 @@ +# openapi.model.ProjectModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**id** | **int** | Projects' id | [optional] +**identifier** | **String** | | [optional] +**name** | **String** | | [optional] +**active** | **bool** | Indicates whether the project is currently active or already archived | [optional] +**statusExplanation** | [**ProjectModelStatusExplanation**](ProjectModelStatusExplanation.md) | | [optional] +**public** | **bool** | Indicates whether the project is accessible for everybody | [optional] +**description** | [**Formattable**](Formattable.md) | | [optional] +**createdAt** | [**DateTime**](DateTime.md) | Time of creation | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | Time of the most recent change to the project | [optional] +**links** | [**ProjectModelLinks**](ProjectModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinks.md b/doc/ProjectModelLinks.md new file mode 100644 index 0000000..2bd2fb6 --- /dev/null +++ b/doc/ProjectModelLinks.md @@ -0,0 +1,28 @@ +# openapi.model.ProjectModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**update** | [**ProjectModelLinksUpdate**](ProjectModelLinksUpdate.md) | | [optional] +**updateImmediately** | [**ProjectModelLinksUpdateImmediately**](ProjectModelLinksUpdateImmediately.md) | | [optional] +**delete** | [**ProjectModelLinksDelete**](ProjectModelLinksDelete.md) | | [optional] +**createWorkPackage** | [**ProjectModelLinksCreateWorkPackage**](ProjectModelLinksCreateWorkPackage.md) | | [optional] +**createWorkPackageImmediately** | [**ProjectModelLinksCreateWorkPackageImmediately**](ProjectModelLinksCreateWorkPackageImmediately.md) | | [optional] +**self** | [**ProjectModelLinksSelf**](ProjectModelLinksSelf.md) | | +**categories** | [**ProjectModelLinksCategories**](ProjectModelLinksCategories.md) | | +**types** | [**ProjectModelLinksTypes**](ProjectModelLinksTypes.md) | | +**versions** | [**ProjectModelLinksVersions**](ProjectModelLinksVersions.md) | | +**memberships** | [**ProjectModelLinksMemberships**](ProjectModelLinksMemberships.md) | | +**workPackages** | [**ProjectModelLinksWorkPackages**](ProjectModelLinksWorkPackages.md) | | +**parent** | [**ProjectModelLinksParent**](ProjectModelLinksParent.md) | | [optional] +**status** | [**ProjectModelLinksStatus**](ProjectModelLinksStatus.md) | | [optional] +**storages** | [**List**](ProjectModelLinksStoragesInner.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinksCategories.md b/doc/ProjectModelLinksCategories.md new file mode 100644 index 0000000..026dcc0 --- /dev/null +++ b/doc/ProjectModelLinksCategories.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectModelLinksCategories + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinksCreateWorkPackage.md b/doc/ProjectModelLinksCreateWorkPackage.md new file mode 100644 index 0000000..12aa69f --- /dev/null +++ b/doc/ProjectModelLinksCreateWorkPackage.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectModelLinksCreateWorkPackage + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinksCreateWorkPackageImmediately.md b/doc/ProjectModelLinksCreateWorkPackageImmediately.md new file mode 100644 index 0000000..e66a457 --- /dev/null +++ b/doc/ProjectModelLinksCreateWorkPackageImmediately.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectModelLinksCreateWorkPackageImmediately + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinksDelete.md b/doc/ProjectModelLinksDelete.md new file mode 100644 index 0000000..15bb124 --- /dev/null +++ b/doc/ProjectModelLinksDelete.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectModelLinksDelete + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinksMemberships.md b/doc/ProjectModelLinksMemberships.md new file mode 100644 index 0000000..a62df6a --- /dev/null +++ b/doc/ProjectModelLinksMemberships.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectModelLinksMemberships + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinksParent.md b/doc/ProjectModelLinksParent.md new file mode 100644 index 0000000..186a4e5 --- /dev/null +++ b/doc/ProjectModelLinksParent.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectModelLinksParent + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinksSelf.md b/doc/ProjectModelLinksSelf.md new file mode 100644 index 0000000..7a0182d --- /dev/null +++ b/doc/ProjectModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinksStatus.md b/doc/ProjectModelLinksStatus.md new file mode 100644 index 0000000..f1f0ab6 --- /dev/null +++ b/doc/ProjectModelLinksStatus.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectModelLinksStatus + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinksStoragesInner.md b/doc/ProjectModelLinksStoragesInner.md new file mode 100644 index 0000000..923c861 --- /dev/null +++ b/doc/ProjectModelLinksStoragesInner.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectModelLinksStoragesInner + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinksTypes.md b/doc/ProjectModelLinksTypes.md new file mode 100644 index 0000000..9d0db1b --- /dev/null +++ b/doc/ProjectModelLinksTypes.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectModelLinksTypes + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinksUpdate.md b/doc/ProjectModelLinksUpdate.md new file mode 100644 index 0000000..a10976f --- /dev/null +++ b/doc/ProjectModelLinksUpdate.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectModelLinksUpdate + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinksUpdateImmediately.md b/doc/ProjectModelLinksUpdateImmediately.md new file mode 100644 index 0000000..e1531c5 --- /dev/null +++ b/doc/ProjectModelLinksUpdateImmediately.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectModelLinksUpdateImmediately + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinksVersions.md b/doc/ProjectModelLinksVersions.md new file mode 100644 index 0000000..d9ef2b7 --- /dev/null +++ b/doc/ProjectModelLinksVersions.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectModelLinksVersions + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelLinksWorkPackages.md b/doc/ProjectModelLinksWorkPackages.md new file mode 100644 index 0000000..7203763 --- /dev/null +++ b/doc/ProjectModelLinksWorkPackages.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectModelLinksWorkPackages + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectModelStatusExplanation.md b/doc/ProjectModelStatusExplanation.md new file mode 100644 index 0000000..15def9b --- /dev/null +++ b/doc/ProjectModelStatusExplanation.md @@ -0,0 +1,17 @@ +# openapi.model.ProjectModelStatusExplanation + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**format** | **String** | Indicates the formatting language of the raw text | [readonly] +**raw** | **String** | The raw text, as entered by the user | [optional] +**html** | **String** | The text converted to HTML according to the format | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectStorageCollectionModel.md b/doc/ProjectStorageCollectionModel.md new file mode 100644 index 0000000..51e06cb --- /dev/null +++ b/doc/ProjectStorageCollectionModel.md @@ -0,0 +1,19 @@ +# openapi.model.ProjectStorageCollectionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**ProjectStorageCollectionModelAllOfLinks**](ProjectStorageCollectionModelAllOfLinks.md) | | +**embedded** | [**ProjectStorageCollectionModelAllOfEmbedded**](ProjectStorageCollectionModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectStorageCollectionModelAllOfEmbedded.md b/doc/ProjectStorageCollectionModelAllOfEmbedded.md new file mode 100644 index 0000000..93221e5 --- /dev/null +++ b/doc/ProjectStorageCollectionModelAllOfEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.ProjectStorageCollectionModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**List**](ProjectStorageModel.md) | | [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectStorageCollectionModelAllOfLinks.md b/doc/ProjectStorageCollectionModelAllOfLinks.md new file mode 100644 index 0000000..371ea8e --- /dev/null +++ b/doc/ProjectStorageCollectionModelAllOfLinks.md @@ -0,0 +1,15 @@ +# openapi.model.ProjectStorageCollectionModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**ProjectStorageCollectionModelAllOfLinksSelf**](ProjectStorageCollectionModelAllOfLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectStorageCollectionModelAllOfLinksSelf.md b/doc/ProjectStorageCollectionModelAllOfLinksSelf.md new file mode 100644 index 0000000..393eb4c --- /dev/null +++ b/doc/ProjectStorageCollectionModelAllOfLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectStorageCollectionModelAllOfLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectStorageModel.md b/doc/ProjectStorageModel.md new file mode 100644 index 0000000..ef5b58b --- /dev/null +++ b/doc/ProjectStorageModel.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectStorageModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**id** | **int** | The project storage's id | +**projectFolderMode** | **String** | | +**createdAt** | [**DateTime**](DateTime.md) | Time of creation | +**updatedAt** | [**DateTime**](DateTime.md) | Time of the most recent change to the project storage | +**links** | [**ProjectStorageModelLinks**](ProjectStorageModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectStorageModelLinks.md b/doc/ProjectStorageModelLinks.md new file mode 100644 index 0000000..d6f576d --- /dev/null +++ b/doc/ProjectStorageModelLinks.md @@ -0,0 +1,19 @@ +# openapi.model.ProjectStorageModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**ProjectStorageModelLinksSelf**](ProjectStorageModelLinksSelf.md) | | +**creator** | [**ProjectStorageModelLinksCreator**](ProjectStorageModelLinksCreator.md) | | +**storage** | [**ProjectStorageModelLinksStorage**](ProjectStorageModelLinksStorage.md) | | +**project** | [**ProjectStorageModelLinksProject**](ProjectStorageModelLinksProject.md) | | +**projectFolder** | [**ProjectStorageModelLinksProjectFolder**](ProjectStorageModelLinksProjectFolder.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectStorageModelLinksCreator.md b/doc/ProjectStorageModelLinksCreator.md new file mode 100644 index 0000000..3ffa6a7 --- /dev/null +++ b/doc/ProjectStorageModelLinksCreator.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectStorageModelLinksCreator + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectStorageModelLinksProject.md b/doc/ProjectStorageModelLinksProject.md new file mode 100644 index 0000000..7eed5fc --- /dev/null +++ b/doc/ProjectStorageModelLinksProject.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectStorageModelLinksProject + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectStorageModelLinksProjectFolder.md b/doc/ProjectStorageModelLinksProjectFolder.md new file mode 100644 index 0000000..66b967d --- /dev/null +++ b/doc/ProjectStorageModelLinksProjectFolder.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectStorageModelLinksProjectFolder + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectStorageModelLinksSelf.md b/doc/ProjectStorageModelLinksSelf.md new file mode 100644 index 0000000..ac4b84d --- /dev/null +++ b/doc/ProjectStorageModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectStorageModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectStorageModelLinksStorage.md b/doc/ProjectStorageModelLinksStorage.md new file mode 100644 index 0000000..0c98fe5 --- /dev/null +++ b/doc/ProjectStorageModelLinksStorage.md @@ -0,0 +1,20 @@ +# openapi.model.ProjectStorageModelLinksStorage + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ProjectsApi.md b/doc/ProjectsApi.md new file mode 100644 index 0000000..c0c02e2 --- /dev/null +++ b/doc/ProjectsApi.md @@ -0,0 +1,628 @@ +# openapi.api.ProjectsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createProject**](ProjectsApi.md#createproject) | **POST** /api/v3/projects | Create project +[**createProjectCopy**](ProjectsApi.md#createprojectcopy) | **POST** /api/v3/projects/{id}/copy | Create project copy +[**deleteProject**](ProjectsApi.md#deleteproject) | **DELETE** /api/v3/projects/{id} | Delete Project +[**listAvailableParentProjectCandidates**](ProjectsApi.md#listavailableparentprojectcandidates) | **GET** /api/v3/projects/available_parent_projects | List available parent project candidates +[**listProjects**](ProjectsApi.md#listprojects) | **GET** /api/v3/projects | List projects +[**listProjectsWithVersion**](ProjectsApi.md#listprojectswithversion) | **GET** /api/v3/versions/{id}/projects | List projects having version +[**projectCopyForm**](ProjectsApi.md#projectcopyform) | **POST** /api/v3/projects/{id}/copy/form | Project copy form +[**projectCreateForm**](ProjectsApi.md#projectcreateform) | **POST** /api/v3/projects/form | Project create form +[**projectUpdateForm**](ProjectsApi.md#projectupdateform) | **POST** /api/v3/projects/{id}/form | Project update form +[**updateProject**](ProjectsApi.md#updateproject) | **PATCH** /api/v3/projects/{id} | Update Project +[**viewProject**](ProjectsApi.md#viewproject) | **GET** /api/v3/projects/{id} | View project +[**viewProjectSchema**](ProjectsApi.md#viewprojectschema) | **GET** /api/v3/projects/schema | View project schema +[**viewProjectStatus**](ProjectsApi.md#viewprojectstatus) | **GET** /api/v3/project_statuses/{id} | View project status + + +# **createProject** +> ProjectModel createProject(body) + +Create project + +Creates a new project, applying the attributes provided in the body. You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ProjectsApi(); +final body = Object(); // Object | + +try { + final result = api_instance.createProject(body); + print(result); +} catch (e) { + print('Exception when calling ProjectsApi->createProject: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Object**| | [optional] + +### Return type + +[**ProjectModel**](ProjectModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createProjectCopy** +> createProjectCopy(id) + +Create project copy + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ProjectsApi(); +final id = 1; // int | Project id + +try { + api_instance.createProjectCopy(id); +} catch (e) { + print('Exception when calling ProjectsApi->createProjectCopy: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteProject** +> deleteProject(id) + +Delete Project + +Deletes the project permanently. As this is a lengthy process, the actual deletion is carried out asynchronously. So the project might exist well after the request has returned successfully. To prevent unwanted changes to the project scheduled for deletion, it is archived at once. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ProjectsApi(); +final id = 1; // int | Project id + +try { + api_instance.deleteProject(id); +} catch (e) { + print('Exception when calling ProjectsApi->deleteProject: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listAvailableParentProjectCandidates** +> Object listAvailableParentProjectCandidates(filters, of_, sortBy) + +List available parent project candidates + +Lists projects which can become parent to another project. Only sound candidates are returned. For instance a project cannot become parent of itself or it's children. To specify the project for which a parent is queried for, the `of` parameter can be provided. If no `of` parameter is provided, a new project is assumed. Then, the check for the hierarchy is omitted as a new project cannot be part of a hierarchy yet. Candidates can be filtered. Most commonly one will want to filter by name or identifier. You can do this through the `filters` parameter which works just like the work package index. For instance to find all parent candidates with \"rollout\" in their name: ``` ?filters=[{\"name_and_identifier\":{\"operator\":\"~\",\"values\":[\"rollout\"]}}] ``` + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ProjectsApi(); +final filters = [{ "ancestor": { "operator": "=", "values": ['1'] }" }]; // String | JSON specifying filter conditions. +final of_ = 123; // String | The id or identifier of the project the parent candidate is determined for +final sortBy = [["id", "asc"]]; // String | JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint and allows all the filters and sortBy supported by the project list end point. + +try { + final result = api_instance.listAvailableParentProjectCandidates(filters, of_, sortBy); + print(result); +} catch (e) { + print('Exception when calling ProjectsApi->listAvailableParentProjectCandidates: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. | [optional] + **of_** | **String**| The id or identifier of the project the parent candidate is determined for | [optional] + **sortBy** | **String**| JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint and allows all the filters and sortBy supported by the project list end point. | [optional] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listProjects** +> Object listProjects(filters, sortBy, select) + +List projects + +Returns a collection of projects. The collection can be filtered via query parameters similar to how work packages are filtered. In addition to the provided filter, the result set is always limited to only contain projects the client is allowed to see. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ProjectsApi(); +final filters = [{ "ancestor": { "operator": "=", "values": ['1'] }" }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + active: based on the active property of the project + ancestor: filters projects by their ancestor. A project is not considered to be it's own ancestor. + created_at: based on the time the project was created + latest_activity_at: based on the time the last activity was registered on a project. + name_and_identifier: based on both the name and the identifier. + parent_id: filters projects by their parent. + principal: based on members of the project. + type_id: based on the types active in a project. + user_action: based on the actions the current user has in the project. + id: based on projects' id. + visible: based on the visibility for the user (id) provided as the filter value. This filter is useful for admins to identify the projects visible to a user. There might also be additional filters based on the custom fields that have been configured. +final sortBy = [["id", "asc"]]; // String | JSON specifying sort criteria. Currently supported orders are: + id + name + typeahead (sorting by hierarchy and name) + created_at + public + latest_activity_at + required_disk_space There might also be additional orders based on the custom fields that have been configured. +final select = total,elements/identifier,elements/name; // String | Comma separated list of properties to include. + +try { + final result = api_instance.listProjects(filters, sortBy, select); + print(result); +} catch (e) { + print('Exception when calling ProjectsApi->listProjects: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + active: based on the active property of the project + ancestor: filters projects by their ancestor. A project is not considered to be it's own ancestor. + created_at: based on the time the project was created + latest_activity_at: based on the time the last activity was registered on a project. + name_and_identifier: based on both the name and the identifier. + parent_id: filters projects by their parent. + principal: based on members of the project. + type_id: based on the types active in a project. + user_action: based on the actions the current user has in the project. + id: based on projects' id. + visible: based on the visibility for the user (id) provided as the filter value. This filter is useful for admins to identify the projects visible to a user. There might also be additional filters based on the custom fields that have been configured. | [optional] + **sortBy** | **String**| JSON specifying sort criteria. Currently supported orders are: + id + name + typeahead (sorting by hierarchy and name) + created_at + public + latest_activity_at + required_disk_space There might also be additional orders based on the custom fields that have been configured. | [optional] + **select** | **String**| Comma separated list of properties to include. | [optional] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listProjectsWithVersion** +> Object listProjectsWithVersion(id) + +List projects having version + +This endpoint lists the projects where the given version is available. The projects returned depend on the sharing settings of the given version, but are also limited to the projects that the current user is allowed to see. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ProjectsApi(); +final id = 1; // int | Version id + +try { + final result = api_instance.listProjectsWithVersion(id); + print(result); +} catch (e) { + print('Exception when calling ProjectsApi->listProjectsWithVersion: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Version id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **projectCopyForm** +> projectCopyForm(id) + +Project copy form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ProjectsApi(); +final id = 1; // int | Project id + +try { + api_instance.projectCopyForm(id); +} catch (e) { + print('Exception when calling ProjectsApi->projectCopyForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **projectCreateForm** +> Object projectCreateForm(body) + +Project create form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ProjectsApi(); +final body = Object(); // Object | + +try { + final result = api_instance.projectCreateForm(body); + print(result); +} catch (e) { + print('Exception when calling ProjectsApi->projectCreateForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Object**| | [optional] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **projectUpdateForm** +> projectUpdateForm(id, body) + +Project update form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ProjectsApi(); +final id = 1; // int | Project id +final body = Object(); // Object | + +try { + api_instance.projectUpdateForm(id, body); +} catch (e) { + print('Exception when calling ProjectsApi->projectUpdateForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + **body** | **Object**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateProject** +> ProjectModel updateProject(id, body) + +Update Project + +Updates the given project by applying the attributes provided in the body. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ProjectsApi(); +final id = 1; // int | Project id +final body = Object(); // Object | + +try { + final result = api_instance.updateProject(id, body); + print(result); +} catch (e) { + print('Exception when calling ProjectsApi->updateProject: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + **body** | **Object**| | [optional] + +### Return type + +[**ProjectModel**](ProjectModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewProject** +> ProjectModel viewProject(id) + +View project + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ProjectsApi(); +final id = 1; // int | Project id + +try { + final result = api_instance.viewProject(id); + print(result); +} catch (e) { + print('Exception when calling ProjectsApi->viewProject: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + +### Return type + +[**ProjectModel**](ProjectModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewProjectSchema** +> Object viewProjectSchema() + +View project schema + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ProjectsApi(); + +try { + final result = api_instance.viewProjectSchema(); + print(result); +} catch (e) { + print('Exception when calling ProjectsApi->viewProjectSchema: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewProjectStatus** +> Object viewProjectStatus(id) + +View project status + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ProjectsApi(); +final id = on_track; // String | Project status id + +try { + final result = api_instance.viewProjectStatus(id); + print(result); +} catch (e) { + print('Exception when calling ProjectsApi->viewProjectStatus: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Project status id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/QueriesApi.md b/doc/QueriesApi.md new file mode 100644 index 0000000..147f30f --- /dev/null +++ b/doc/QueriesApi.md @@ -0,0 +1,726 @@ +# openapi.api.QueriesApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**availableProjectsForQuery**](QueriesApi.md#availableprojectsforquery) | **GET** /api/v3/queries/available_projects | Available projects for query +[**createQuery**](QueriesApi.md#createquery) | **POST** /api/v3/queries | Create query +[**deleteQuery**](QueriesApi.md#deletequery) | **DELETE** /api/v3/queries/{id} | Delete query +[**editQuery**](QueriesApi.md#editquery) | **PATCH** /api/v3/queries/{id} | Edit Query +[**listQueries**](QueriesApi.md#listqueries) | **GET** /api/v3/queries | List queries +[**queryCreateForm**](QueriesApi.md#querycreateform) | **POST** /api/v3/queries/form | Query Create Form +[**queryUpdateForm**](QueriesApi.md#queryupdateform) | **POST** /api/v3/queries/{id}/form | Query Update Form +[**starQuery**](QueriesApi.md#starquery) | **PATCH** /api/v3/queries/{id}/star | Star query +[**unstarQuery**](QueriesApi.md#unstarquery) | **PATCH** /api/v3/queries/{id}/unstar | Unstar query +[**viewDefaultQuery**](QueriesApi.md#viewdefaultquery) | **GET** /api/v3/queries/default | View default query +[**viewDefaultQueryForProject**](QueriesApi.md#viewdefaultqueryforproject) | **GET** /api/v3/projects/{id}/queries/default | View default query for project +[**viewQuery**](QueriesApi.md#viewquery) | **GET** /api/v3/queries/{id} | View query +[**viewSchemaForGlobalQueries**](QueriesApi.md#viewschemaforglobalqueries) | **GET** /api/v3/queries/schema | View schema for global queries +[**viewSchemaForProjectQueries**](QueriesApi.md#viewschemaforprojectqueries) | **GET** /api/v3/projects/{id}/queries/schema | View schema for project queries + + +# **availableProjectsForQuery** +> Object availableProjectsForQuery() + +Available projects for query + +Gets a list of projects that are available as projects a query can be assigned to. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueriesApi(); + +try { + final result = api_instance.availableProjectsForQuery(); + print(result); +} catch (e) { + print('Exception when calling QueriesApi->availableProjectsForQuery: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createQuery** +> QueryModel createQuery(queryCreateForm) + +Create query + +When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a Query can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueriesApi(); +final queryCreateForm = QueryCreateForm(); // QueryCreateForm | + +try { + final result = api_instance.createQuery(queryCreateForm); + print(result); +} catch (e) { + print('Exception when calling QueriesApi->createQuery: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **queryCreateForm** | [**QueryCreateForm**](QueryCreateForm.md)| | [optional] + +### Return type + +[**QueryModel**](QueryModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteQuery** +> deleteQuery(id) + +Delete query + +Delete the query identified by the id parameter + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueriesApi(); +final id = 1; // int | Query id + +try { + api_instance.deleteQuery(id); +} catch (e) { + print('Exception when calling QueriesApi->deleteQuery: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Query id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **editQuery** +> QueryModel editQuery(id, queryUpdateForm) + +Edit Query + +When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body. Note that it is only allowed to provide properties or links supporting the **write** operation. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueriesApi(); +final id = 1; // int | Query id +final queryUpdateForm = QueryUpdateForm(); // QueryUpdateForm | + +try { + final result = api_instance.editQuery(id, queryUpdateForm); + print(result); +} catch (e) { + print('Exception when calling QueriesApi->editQuery: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Query id | + **queryUpdateForm** | [**QueryUpdateForm**](QueryUpdateForm.md)| | [optional] + +### Return type + +[**QueryModel**](QueryModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listQueries** +> Object listQueries(filters) + +List queries + +Returns a collection of queries. The collection can be filtered via query parameters similar to how work packages are filtered. Please note however, that the filters are applied to the queries and not to the work packages the queries in turn might return. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueriesApi(); +final filters = [{ "project_id": { "operator": "!*", "values": null }" }]; // String | JSON specifying filter conditions. Currently supported filters are: + project: filters queries by the project they are assigned to. If the project filter is passed with the `!*` (not any) operator, global queries are returned. + id: filters queries based on their id + updated_at: filters queries based on the last time they where updated + +try { + final result = api_instance.listQueries(filters); + print(result); +} catch (e) { + print('Exception when calling QueriesApi->listQueries: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Currently supported filters are: + project: filters queries by the project they are assigned to. If the project filter is passed with the `!*` (not any) operator, global queries are returned. + id: filters queries based on their id + updated_at: filters queries based on the last time they where updated | [optional] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **queryCreateForm** +> queryCreateForm(queryCreateForm) + +Query Create Form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueriesApi(); +final queryCreateForm = QueryCreateForm(); // QueryCreateForm | + +try { + api_instance.queryCreateForm(queryCreateForm); +} catch (e) { + print('Exception when calling QueriesApi->queryCreateForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **queryCreateForm** | [**QueryCreateForm**](QueryCreateForm.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **queryUpdateForm** +> queryUpdateForm(id, queryUpdateForm) + +Query Update Form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueriesApi(); +final id = 1; // int | Query id +final queryUpdateForm = QueryUpdateForm(); // QueryUpdateForm | + +try { + api_instance.queryUpdateForm(id, queryUpdateForm); +} catch (e) { + print('Exception when calling QueriesApi->queryUpdateForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Query id | + **queryUpdateForm** | [**QueryUpdateForm**](QueryUpdateForm.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **starQuery** +> Object starQuery(id) + +Star query + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueriesApi(); +final id = 1; // int | Query id + +try { + final result = api_instance.starQuery(id); + print(result); +} catch (e) { + print('Exception when calling QueriesApi->starQuery: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Query id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **unstarQuery** +> Object unstarQuery(id) + +Unstar query + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueriesApi(); +final id = 1; // int | Query id + +try { + final result = api_instance.unstarQuery(id); + print(result); +} catch (e) { + print('Exception when calling QueriesApi->unstarQuery: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Query id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewDefaultQuery** +> Object viewDefaultQuery(filters, offset, pageSize, sortBy, groupBy, showSums, timestamps, timelineVisible, timelineZoomLevel, showHierarchies) + +View default query + +Same as [viewing an existing, persisted Query](https://www.openproject.org/docs/api/endpoints/queries/#list-queries) in its response, this resource returns an unpersisted query and by that allows to get the default query configuration. The client may also provide additional parameters which will modify the default query. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueriesApi(); +final filters = [{ "assignee": { "operator": "=", "values": ["1", "5"] }" }]; // String | JSON specifying filter conditions. The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). +final offset = 25; // int | Page number inside the queries' result collection of work packages. +final pageSize = 25; // int | Number of elements to display per page for the queries' result collection of work packages. +final sortBy = [["status", "asc"]]; // String | JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria. +final groupBy = status; // String | The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria. +final showSums = true; // bool | Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property. +final timestamps = 2023-01-01,P-1Y,PT0S,lastWorkingDay@12:00; // String | Indicates the timestamps to filter by when showing changed attributes on work packages. Values can be either ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Values older than 1 day are accepted only with valid Enterprise Token available. +final timelineVisible = true; // bool | Indicates whether the timeline should be shown. +final timelineZoomLevel = days; // String | Indicates in what zoom level the timeline should be shown. Valid values are `days`, `weeks`, `months`, `quarters`, and `years`. +final showHierarchies = true; // bool | Indicates whether the hierarchy mode should be enabled. + +try { + final result = api_instance.viewDefaultQuery(filters, offset, pageSize, sortBy, groupBy, showSums, timestamps, timelineVisible, timelineZoomLevel, showHierarchies); + print(result); +} catch (e) { + print('Exception when calling QueriesApi->viewDefaultQuery: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). | [optional] [default to '[{ "status_id": { "operator": "o", "values": null }}]'] + **offset** | **int**| Page number inside the queries' result collection of work packages. | [optional] [default to 1] + **pageSize** | **int**| Number of elements to display per page for the queries' result collection of work packages. | [optional] + **sortBy** | **String**| JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria. | [optional] [default to '[["id", "asc"]]'] + **groupBy** | **String**| The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria. | [optional] + **showSums** | **bool**| Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property. | [optional] [default to false] + **timestamps** | **String**| Indicates the timestamps to filter by when showing changed attributes on work packages. Values can be either ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Values older than 1 day are accepted only with valid Enterprise Token available. | [optional] [default to 'PT0S'] + **timelineVisible** | **bool**| Indicates whether the timeline should be shown. | [optional] [default to false] + **timelineZoomLevel** | **String**| Indicates in what zoom level the timeline should be shown. Valid values are `days`, `weeks`, `months`, `quarters`, and `years`. | [optional] [default to 'days'] + **showHierarchies** | **bool**| Indicates whether the hierarchy mode should be enabled. | [optional] [default to true] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewDefaultQueryForProject** +> Object viewDefaultQueryForProject(id, filters, offset, pageSize, sortBy, groupBy, showSums, timestamps, timelineVisible, showHierarchies) + +View default query for project + +Same as [viewing an existing, persisted Query](https://www.openproject.org/docs/api/endpoints/queries/#list-queries) in its response, this resource returns an unpersisted query and by that allows to get the default query configuration. The client may also provide additional parameters which will modify the default query. The query will already be scoped for the project. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueriesApi(); +final id = 1; // int | Id of the project the default query is requested for +final filters = [{ "assignee": { "operator": "=", "values": ["1", "5"] }" }]; // String | JSON specifying filter conditions. The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). +final offset = 25; // int | Page number inside the queries' result collection of work packages. +final pageSize = 25; // int | Number of elements to display per page for the queries' result collection of work packages. +final sortBy = [["status", "asc"]]; // String | JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria. +final groupBy = status; // String | The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria. +final showSums = true; // bool | Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property. +final timestamps = 2023-01-01,P-1Y,PT0S,lastWorkingDay@12:00; // String | Indicates the timestamps to filter by when showing changed attributes on work packages. Values can be either ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time. Values older than 1 day are accepted only with valid Enterprise Token available. +final timelineVisible = true; // bool | Indicates whether the timeline should be shown. +final showHierarchies = true; // bool | Indicates whether the hierarchy mode should be enabled. + +try { + final result = api_instance.viewDefaultQueryForProject(id, filters, offset, pageSize, sortBy, groupBy, showSums, timestamps, timelineVisible, showHierarchies); + print(result); +} catch (e) { + print('Exception when calling QueriesApi->viewDefaultQueryForProject: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Id of the project the default query is requested for | + **filters** | **String**| JSON specifying filter conditions. The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). | [optional] [default to '[{ "status_id": { "operator": "o", "values": null }}]'] + **offset** | **int**| Page number inside the queries' result collection of work packages. | [optional] [default to 1] + **pageSize** | **int**| Number of elements to display per page for the queries' result collection of work packages. | [optional] + **sortBy** | **String**| JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria. | [optional] [default to '[["id", "asc"]]'] + **groupBy** | **String**| The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria. | [optional] + **showSums** | **bool**| Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property. | [optional] [default to false] + **timestamps** | **String**| Indicates the timestamps to filter by when showing changed attributes on work packages. Values can be either ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time. Values older than 1 day are accepted only with valid Enterprise Token available. | [optional] [default to 'PT0S'] + **timelineVisible** | **bool**| Indicates whether the timeline should be shown. | [optional] [default to false] + **showHierarchies** | **bool**| Indicates whether the hierarchy mode should be enabled. | [optional] [default to true] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewQuery** +> QueryModel viewQuery(id, filters, offset, pageSize, columns, sortBy, groupBy, showSums, timestamps, timelineVisible, timelineLabels, highlightingMode, highlightedAttributes, showHierarchies) + +View query + +Retrieve an individual query as identified by the id parameter. Then end point accepts a number of parameters that can be used to override the resources' persisted parameters. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueriesApi(); +final id = 1; // int | Query id +final filters = [{ "assignee": { "operator": "=", "values": ["1", "5"] }" }]; // String | JSON specifying filter conditions. The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). +final offset = 25; // int | Page number inside the queries' result collection of work packages. +final pageSize = 25; // int | Number of elements to display per page for the queries' result collection of work packages. +final columns = []; // String | Selected columns for the table view. +final sortBy = [["status", "asc"]]; // String | JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria. +final groupBy = status; // String | The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria. +final showSums = true; // bool | Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property. +final timestamps = 2023-01-01,P-1Y,PT0S,lastWorkingDay@12:00; // String | Indicates the timestamps to filter by when showing changed attributes on work packages. Values can be either ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Values older than 1 day are accepted only with valid Enterprise Token available. +final timelineVisible = true; // bool | Indicates whether the timeline should be shown. +final timelineLabels = {}; // String | Overridden labels in the timeline view +final highlightingMode = inline; // String | Highlighting mode for the table view. +final highlightedAttributes = []; // String | Highlighted attributes mode for the table view when `highlightingMode` is `inline`. When set to `[]` all highlightable attributes will be returned as `highlightedAttributes`. +final showHierarchies = true; // bool | Indicates whether the hierarchy mode should be enabled. + +try { + final result = api_instance.viewQuery(id, filters, offset, pageSize, columns, sortBy, groupBy, showSums, timestamps, timelineVisible, timelineLabels, highlightingMode, highlightedAttributes, showHierarchies); + print(result); +} catch (e) { + print('Exception when calling QueriesApi->viewQuery: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Query id | + **filters** | **String**| JSON specifying filter conditions. The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). | [optional] [default to '[{ "status_id": { "operator": "o", "values": null }}]'] + **offset** | **int**| Page number inside the queries' result collection of work packages. | [optional] [default to 1] + **pageSize** | **int**| Number of elements to display per page for the queries' result collection of work packages. | [optional] + **columns** | **String**| Selected columns for the table view. | [optional] [default to '[\'type\', \'priority\']'] + **sortBy** | **String**| JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria. | [optional] [default to '[["id", "asc"]]'] + **groupBy** | **String**| The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria. | [optional] + **showSums** | **bool**| Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property. | [optional] [default to false] + **timestamps** | **String**| Indicates the timestamps to filter by when showing changed attributes on work packages. Values can be either ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Values older than 1 day are accepted only with valid Enterprise Token available. | [optional] [default to 'PT0S'] + **timelineVisible** | **bool**| Indicates whether the timeline should be shown. | [optional] [default to false] + **timelineLabels** | **String**| Overridden labels in the timeline view | [optional] [default to '{}'] + **highlightingMode** | **String**| Highlighting mode for the table view. | [optional] [default to 'inline'] + **highlightedAttributes** | **String**| Highlighted attributes mode for the table view when `highlightingMode` is `inline`. When set to `[]` all highlightable attributes will be returned as `highlightedAttributes`. | [optional] [default to '[\'type\', \'priority\']'] + **showHierarchies** | **bool**| Indicates whether the hierarchy mode should be enabled. | [optional] [default to true] + +### Return type + +[**QueryModel**](QueryModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewSchemaForGlobalQueries** +> Object viewSchemaForGlobalQueries() + +View schema for global queries + +Retrieve the schema for global queries, those, that are not assigned to a project. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueriesApi(); + +try { + final result = api_instance.viewSchemaForGlobalQueries(); + print(result); +} catch (e) { + print('Exception when calling QueriesApi->viewSchemaForGlobalQueries: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewSchemaForProjectQueries** +> Object viewSchemaForProjectQueries(id) + +View schema for project queries + +Retrieve the schema for project queries. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueriesApi(); +final id = 1; // int | Project id + +try { + final result = api_instance.viewSchemaForProjectQueries(id); + print(result); +} catch (e) { + print('Exception when calling QueriesApi->viewSchemaForProjectQueries: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/QueryColumnModel.md b/doc/QueryColumnModel.md new file mode 100644 index 0000000..8e2c869 --- /dev/null +++ b/doc/QueryColumnModel.md @@ -0,0 +1,16 @@ +# openapi.model.QueryColumnModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**Object**](.md) | Query column id | [readonly] +**name** | [**Object**](.md) | Query column name | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QueryColumnsApi.md b/doc/QueryColumnsApi.md new file mode 100644 index 0000000..d5e4d76 --- /dev/null +++ b/doc/QueryColumnsApi.md @@ -0,0 +1,60 @@ +# openapi.api.QueryColumnsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**viewQueryColumn**](QueryColumnsApi.md#viewquerycolumn) | **GET** /api/v3/queries/columns/{id} | View Query Column + + +# **viewQueryColumn** +> QueryColumnModel viewQueryColumn(id) + +View Query Column + +Retrieve an individual QueryColumn as identified by the `id` parameter. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueryColumnsApi(); +final id = priority; // String | QueryColumn id + +try { + final result = api_instance.viewQueryColumn(id); + print(result); +} catch (e) { + print('Exception when calling QueryColumnsApi->viewQueryColumn: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| QueryColumn id | + +### Return type + +[**QueryColumnModel**](QueryColumnModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/QueryCreateForm.md b/doc/QueryCreateForm.md new file mode 100644 index 0000000..a247e43 --- /dev/null +++ b/doc/QueryCreateForm.md @@ -0,0 +1,15 @@ +# openapi.model.QueryCreateForm + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | [**Object**](.md) | Query name. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QueryFilterInstanceSchemaApi.md b/doc/QueryFilterInstanceSchemaApi.md new file mode 100644 index 0000000..c752372 --- /dev/null +++ b/doc/QueryFilterInstanceSchemaApi.md @@ -0,0 +1,150 @@ +# openapi.api.QueryFilterInstanceSchemaApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listQueryFilterInstanceSchemas**](QueryFilterInstanceSchemaApi.md#listqueryfilterinstanceschemas) | **GET** /api/v3/queries/filter_instance_schemas | List Query Filter Instance Schemas +[**listQueryFilterInstanceSchemasForProject**](QueryFilterInstanceSchemaApi.md#listqueryfilterinstanceschemasforproject) | **GET** /api/v3/projects/{id}/queries/filter_instance_schemas | List Query Filter Instance Schemas for Project +[**viewQueryFilterInstanceSchema**](QueryFilterInstanceSchemaApi.md#viewqueryfilterinstanceschema) | **GET** /api/v3/queries/filter_instance_schemas/{id} | View Query Filter Instance Schema + + +# **listQueryFilterInstanceSchemas** +> Object listQueryFilterInstanceSchemas() + +List Query Filter Instance Schemas + +Returns the list of QueryFilterInstanceSchemas defined for a global query. That is a query not assigned to a project. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueryFilterInstanceSchemaApi(); + +try { + final result = api_instance.listQueryFilterInstanceSchemas(); + print(result); +} catch (e) { + print('Exception when calling QueryFilterInstanceSchemaApi->listQueryFilterInstanceSchemas: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listQueryFilterInstanceSchemasForProject** +> Object listQueryFilterInstanceSchemasForProject(id) + +List Query Filter Instance Schemas for Project + +Returns the list of QueryFilterInstanceSchemas defined for a query of the specified project. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueryFilterInstanceSchemaApi(); +final id = 1; // int | Project id + +try { + final result = api_instance.listQueryFilterInstanceSchemasForProject(id); + print(result); +} catch (e) { + print('Exception when calling QueryFilterInstanceSchemaApi->listQueryFilterInstanceSchemasForProject: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewQueryFilterInstanceSchema** +> QueryFilterInstanceSchemaModel viewQueryFilterInstanceSchema(id) + +View Query Filter Instance Schema + +Retrieve an individual QueryFilterInstanceSchema as identified by the id parameter. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueryFilterInstanceSchemaApi(); +final id = author; // String | QueryFilterInstanceSchema identifier. The identifier is the filter identifier. + +try { + final result = api_instance.viewQueryFilterInstanceSchema(id); + print(result); +} catch (e) { + print('Exception when calling QueryFilterInstanceSchemaApi->viewQueryFilterInstanceSchema: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| QueryFilterInstanceSchema identifier. The identifier is the filter identifier. | + +### Return type + +[**QueryFilterInstanceSchemaModel**](QueryFilterInstanceSchemaModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/QueryFilterInstanceSchemaModel.md b/doc/QueryFilterInstanceSchemaModel.md new file mode 100644 index 0000000..ec4a793 --- /dev/null +++ b/doc/QueryFilterInstanceSchemaModel.md @@ -0,0 +1,17 @@ +# openapi.model.QueryFilterInstanceSchemaModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | [**Object**](.md) | Describes the name attribute | [readonly] +**filter** | [**Object**](.md) | QuerySortBy name | +**links** | [**QueryFilterInstanceSchemaModelLinks**](QueryFilterInstanceSchemaModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QueryFilterInstanceSchemaModelLinks.md b/doc/QueryFilterInstanceSchemaModelLinks.md new file mode 100644 index 0000000..7789399 --- /dev/null +++ b/doc/QueryFilterInstanceSchemaModelLinks.md @@ -0,0 +1,16 @@ +# openapi.model.QueryFilterInstanceSchemaModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**QueryFilterInstanceSchemaModelLinksSelf**](QueryFilterInstanceSchemaModelLinksSelf.md) | | +**filter** | [**QueryFilterInstanceSchemaModelLinksFilter**](QueryFilterInstanceSchemaModelLinksFilter.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QueryFilterInstanceSchemaModelLinksFilter.md b/doc/QueryFilterInstanceSchemaModelLinksFilter.md new file mode 100644 index 0000000..8cdd3b6 --- /dev/null +++ b/doc/QueryFilterInstanceSchemaModelLinksFilter.md @@ -0,0 +1,20 @@ +# openapi.model.QueryFilterInstanceSchemaModelLinksFilter + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QueryFilterInstanceSchemaModelLinksSelf.md b/doc/QueryFilterInstanceSchemaModelLinksSelf.md new file mode 100644 index 0000000..7d000b4 --- /dev/null +++ b/doc/QueryFilterInstanceSchemaModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.QueryFilterInstanceSchemaModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QueryFilterModel.md b/doc/QueryFilterModel.md new file mode 100644 index 0000000..fcd82d2 --- /dev/null +++ b/doc/QueryFilterModel.md @@ -0,0 +1,15 @@ +# openapi.model.QueryFilterModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**Object**](.md) | QueryFilter id | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QueryFiltersApi.md b/doc/QueryFiltersApi.md new file mode 100644 index 0000000..d813f5d --- /dev/null +++ b/doc/QueryFiltersApi.md @@ -0,0 +1,60 @@ +# openapi.api.QueryFiltersApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**viewQueryFilter**](QueryFiltersApi.md#viewqueryfilter) | **GET** /api/v3/queries/filters/{id} | View Query Filter + + +# **viewQueryFilter** +> QueryFilterModel viewQueryFilter(id) + +View Query Filter + +Retrieve an individual QueryFilter as identified by the id parameter. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueryFiltersApi(); +final id = status; // String | QueryFilter identifier + +try { + final result = api_instance.viewQueryFilter(id); + print(result); +} catch (e) { + print('Exception when calling QueryFiltersApi->viewQueryFilter: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| QueryFilter identifier | + +### Return type + +[**QueryFilterModel**](QueryFilterModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/QueryModel.md b/doc/QueryModel.md new file mode 100644 index 0000000..4196909 --- /dev/null +++ b/doc/QueryModel.md @@ -0,0 +1,30 @@ +# openapi.model.QueryModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Query id | [optional] [readonly] +**name** | **String** | Query name | [optional] [readonly] +**filters** | [**List**](QueryFilterInstanceSchemaModel.md) | | [optional] [default to const []] +**sums** | **bool** | Should sums (of supported properties) be shown? | [optional] [readonly] +**timelineVisible** | **bool** | Should the timeline mode be shown? | [optional] [readonly] +**timelineLabels** | **List** | | [optional] [default to const []] +**timelineZoomLevel** | **String** | Which zoom level should the timeline be rendered in? | [optional] [readonly] +**timestamps** | [**Object**](.md) | Timestamps to filter by when showing changed attributes on work packages. | [optional] +**highlightingMode** | [**Object**](.md) | Which highlighting mode should the table have? | [optional] [readonly] +**showHierarchies** | [**Object**](.md) | Should the hierarchy mode be enabled? | [optional] [readonly] +**hidden** | [**Object**](.md) | Should the query be hidden from the query list? | [optional] [readonly] +**public** | [**Object**](.md) | Can users besides the owner see the query? | [optional] [readonly] +**starred** | [**Object**](.md) | Should the query be highlighted to the user? | [optional] [readonly] +**createdAt** | [**Object**](.md) | Time of creation | [readonly] +**updatedAt** | [**Object**](.md) | Time of the most recent change to the query | [readonly] +**links** | [**QueryModelLinks**](QueryModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QueryModelLinks.md b/doc/QueryModelLinks.md new file mode 100644 index 0000000..8b7dd76 --- /dev/null +++ b/doc/QueryModelLinks.md @@ -0,0 +1,18 @@ +# openapi.model.QueryModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**star** | [**QueryModelLinksStar**](QueryModelLinksStar.md) | | [optional] +**unstar** | [**QueryModelLinksUnstar**](QueryModelLinksUnstar.md) | | [optional] +**update** | [**QueryModelLinksUpdate**](QueryModelLinksUpdate.md) | | [optional] +**updateImmediately** | [**QueryModelLinksUpdateImmediately**](QueryModelLinksUpdateImmediately.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QueryModelLinksStar.md b/doc/QueryModelLinksStar.md new file mode 100644 index 0000000..c2151b0 --- /dev/null +++ b/doc/QueryModelLinksStar.md @@ -0,0 +1,20 @@ +# openapi.model.QueryModelLinksStar + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QueryModelLinksUnstar.md b/doc/QueryModelLinksUnstar.md new file mode 100644 index 0000000..e9adfc6 --- /dev/null +++ b/doc/QueryModelLinksUnstar.md @@ -0,0 +1,20 @@ +# openapi.model.QueryModelLinksUnstar + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QueryModelLinksUpdate.md b/doc/QueryModelLinksUpdate.md new file mode 100644 index 0000000..a6234ac --- /dev/null +++ b/doc/QueryModelLinksUpdate.md @@ -0,0 +1,20 @@ +# openapi.model.QueryModelLinksUpdate + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QueryModelLinksUpdateImmediately.md b/doc/QueryModelLinksUpdateImmediately.md new file mode 100644 index 0000000..b0f64fb --- /dev/null +++ b/doc/QueryModelLinksUpdateImmediately.md @@ -0,0 +1,20 @@ +# openapi.model.QueryModelLinksUpdateImmediately + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QueryOperatorModel.md b/doc/QueryOperatorModel.md new file mode 100644 index 0000000..08d3a84 --- /dev/null +++ b/doc/QueryOperatorModel.md @@ -0,0 +1,16 @@ +# openapi.model.QueryOperatorModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**Object**](.md) | Query operator id | [readonly] +**name** | [**Object**](.md) | Query operator name | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QueryOperatorsApi.md b/doc/QueryOperatorsApi.md new file mode 100644 index 0000000..248a187 --- /dev/null +++ b/doc/QueryOperatorsApi.md @@ -0,0 +1,60 @@ +# openapi.api.QueryOperatorsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**viewQueryOperator**](QueryOperatorsApi.md#viewqueryoperator) | **GET** /api/v3/queries/operators/{id} | View Query Operator + + +# **viewQueryOperator** +> QueryOperatorModel viewQueryOperator(id) + +View Query Operator + +Retrieve an individual QueryOperator as identified by the `id` parameter. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QueryOperatorsApi(); +final id = !; // String | QueryOperator id + +try { + final result = api_instance.viewQueryOperator(id); + print(result); +} catch (e) { + print('Exception when calling QueryOperatorsApi->viewQueryOperator: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| QueryOperator id | + +### Return type + +[**QueryOperatorModel**](QueryOperatorModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/QuerySortByModel.md b/doc/QuerySortByModel.md new file mode 100644 index 0000000..475fe1f --- /dev/null +++ b/doc/QuerySortByModel.md @@ -0,0 +1,16 @@ +# openapi.model.QuerySortByModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**Object**](.md) | QuerySortBy id | [readonly] +**name** | [**Object**](.md) | QuerySortBy name | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/QuerySortBysApi.md b/doc/QuerySortBysApi.md new file mode 100644 index 0000000..020908e --- /dev/null +++ b/doc/QuerySortBysApi.md @@ -0,0 +1,60 @@ +# openapi.api.QuerySortBysApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**viewQuerySortBy**](QuerySortBysApi.md#viewquerysortby) | **GET** /api/v3/queries/sort_bys/{id} | View Query Sort By + + +# **viewQuerySortBy** +> QuerySortByModel viewQuerySortBy(id) + +View Query Sort By + +Retrieve an individual QuerySortBy as identified by the id parameter. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = QuerySortBysApi(); +final id = status-asc; // String | QuerySortBy identifier. The identifier is a combination of the column identifier and the direction. + +try { + final result = api_instance.viewQuerySortBy(id); + print(result); +} catch (e) { + print('Exception when calling QuerySortBysApi->viewQuerySortBy: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| QuerySortBy identifier. The identifier is a combination of the column identifier and the direction. | + +### Return type + +[**QuerySortByModel**](QuerySortByModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/QueryUpdateForm.md b/doc/QueryUpdateForm.md new file mode 100644 index 0000000..1756a53 --- /dev/null +++ b/doc/QueryUpdateForm.md @@ -0,0 +1,15 @@ +# openapi.model.QueryUpdateForm + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | [**Object**](.md) | Query name. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RelationModel.md b/doc/RelationModel.md new file mode 100644 index 0000000..4bd978e --- /dev/null +++ b/doc/RelationModel.md @@ -0,0 +1,21 @@ +# openapi.model.RelationModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**Object**](.md) | Relation ID | [optional] [readonly] +**name** | [**Object**](.md) | The internationalized name of this kind of relation | [optional] +**type** | [**Object**](.md) | Which kind of relation (blocks, precedes, etc.) | [optional] +**reverseType** | [**Object**](.md) | The kind of relation from the other WP's perspective | [optional] [readonly] +**description** | [**Object**](.md) | Short text further describing the relation | [optional] +**delayStar** | [**Object**](.md) | The delay in days between closing of `from` and start of `to` | [optional] +**links** | [**RelationModelLinks**](RelationModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RelationModelLinks.md b/doc/RelationModelLinks.md new file mode 100644 index 0000000..bcd091e --- /dev/null +++ b/doc/RelationModelLinks.md @@ -0,0 +1,21 @@ +# openapi.model.RelationModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**update** | [**RelationModelLinksUpdate**](RelationModelLinksUpdate.md) | | [optional] +**updateImmediately** | [**RelationModelLinksUpdateImmediately**](RelationModelLinksUpdateImmediately.md) | | [optional] +**delete** | [**RelationModelLinksDelete**](RelationModelLinksDelete.md) | | [optional] +**self** | [**RelationModelLinksSelf**](RelationModelLinksSelf.md) | | +**schema** | [**RelationModelLinksSchema**](RelationModelLinksSchema.md) | | +**from** | [**RelationModelLinksFrom**](RelationModelLinksFrom.md) | | +**to** | [**RelationModelLinksTo**](RelationModelLinksTo.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RelationModelLinksDelete.md b/doc/RelationModelLinksDelete.md new file mode 100644 index 0000000..9eccaae --- /dev/null +++ b/doc/RelationModelLinksDelete.md @@ -0,0 +1,20 @@ +# openapi.model.RelationModelLinksDelete + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RelationModelLinksFrom.md b/doc/RelationModelLinksFrom.md new file mode 100644 index 0000000..6ef0784 --- /dev/null +++ b/doc/RelationModelLinksFrom.md @@ -0,0 +1,20 @@ +# openapi.model.RelationModelLinksFrom + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RelationModelLinksSchema.md b/doc/RelationModelLinksSchema.md new file mode 100644 index 0000000..a4d568d --- /dev/null +++ b/doc/RelationModelLinksSchema.md @@ -0,0 +1,20 @@ +# openapi.model.RelationModelLinksSchema + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RelationModelLinksSelf.md b/doc/RelationModelLinksSelf.md new file mode 100644 index 0000000..9b6e2c1 --- /dev/null +++ b/doc/RelationModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.RelationModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RelationModelLinksTo.md b/doc/RelationModelLinksTo.md new file mode 100644 index 0000000..d27db3c --- /dev/null +++ b/doc/RelationModelLinksTo.md @@ -0,0 +1,20 @@ +# openapi.model.RelationModelLinksTo + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RelationModelLinksUpdate.md b/doc/RelationModelLinksUpdate.md new file mode 100644 index 0000000..67f3146 --- /dev/null +++ b/doc/RelationModelLinksUpdate.md @@ -0,0 +1,20 @@ +# openapi.model.RelationModelLinksUpdate + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RelationModelLinksUpdateImmediately.md b/doc/RelationModelLinksUpdateImmediately.md new file mode 100644 index 0000000..cbe006e --- /dev/null +++ b/doc/RelationModelLinksUpdateImmediately.md @@ -0,0 +1,20 @@ +# openapi.model.RelationModelLinksUpdateImmediately + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RelationsApi.md b/doc/RelationsApi.md new file mode 100644 index 0000000..ec32417 --- /dev/null +++ b/doc/RelationsApi.md @@ -0,0 +1,339 @@ +# openapi.api.RelationsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteRelation**](RelationsApi.md#deleterelation) | **DELETE** /api/v3/relations/{id} | Delete Relation +[**editRelation**](RelationsApi.md#editrelation) | **PATCH** /api/v3/relations/{id} | Edit Relation +[**listRelations**](RelationsApi.md#listrelations) | **GET** /api/v3/relations | List Relations +[**relationEditForm**](RelationsApi.md#relationeditform) | **POST** /api/v3/relations/{id}/form | Relation edit form +[**viewRelation**](RelationsApi.md#viewrelation) | **GET** /api/v3/relations/{id} | View Relation +[**viewRelationSchema**](RelationsApi.md#viewrelationschema) | **GET** /api/v3/relations/schema | View relation schema +[**viewRelationSchemaForType**](RelationsApi.md#viewrelationschemafortype) | **GET** /api/v3/relations/schema/{type} | View relation schema for type + + +# **deleteRelation** +> deleteRelation(id) + +Delete Relation + +Deletes the relation. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = RelationsApi(); +final id = 1; // int | Relation ID + +try { + api_instance.deleteRelation(id); +} catch (e) { + print('Exception when calling RelationsApi->deleteRelation: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Relation ID | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **editRelation** +> RelationModel editRelation(id) + +Edit Relation + +When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body. It is only allowed to provide properties or links supporting the **write** operation. Note that changing the `type` of a relation invariably also changes the respective `reverseType` as well as the \"name\" of it. The returned Relation object will reflect that change. For instance if you change a Relation's `type` to \"follows\" then the `reverseType` will be changed to `precedes`. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = RelationsApi(); +final id = 1; // int | Relation ID + +try { + final result = api_instance.editRelation(id); + print(result); +} catch (e) { + print('Exception when calling RelationsApi->editRelation: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Relation ID | + +### Return type + +[**RelationModel**](RelationModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listRelations** +> Object listRelations(filters, sortBy) + +List Relations + +Lists all relations according to the given (optional, logically conjunctive) filters and ordered by ID. The response only includes relations between work packages which the user is allowed to see. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = RelationsApi(); +final filters = [{ "from": { "operator": "=", "values": 42 }" }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Valid fields to filter by are: + id - ID of relation + from - ID of work package from which the filtered relations emanates. + to - ID of work package to which this related points. + involved - ID of either the `from` or the `to` work package. + type - The type of relation to filter by, e.g. \"follows\". +final sortBy = [["type", "asc"]]; // String | JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + +try { + final result = api_instance.listRelations(filters, sortBy); + print(result); +} catch (e) { + print('Exception when calling RelationsApi->listRelations: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Valid fields to filter by are: + id - ID of relation + from - ID of work package from which the filtered relations emanates. + to - ID of work package to which this related points. + involved - ID of either the `from` or the `to` work package. + type - The type of relation to filter by, e.g. \"follows\". | [optional] + **sortBy** | **String**| JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. | [optional] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **relationEditForm** +> Object relationEditForm(id) + +Relation edit form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = RelationsApi(); +final id = 1; // int | ID of the relation being modified + +try { + final result = api_instance.relationEditForm(id); + print(result); +} catch (e) { + print('Exception when calling RelationsApi->relationEditForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| ID of the relation being modified | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewRelation** +> RelationModel viewRelation(id) + +View Relation + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = RelationsApi(); +final id = 1; // int | Relation id + +try { + final result = api_instance.viewRelation(id); + print(result); +} catch (e) { + print('Exception when calling RelationsApi->viewRelation: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Relation id | + +### Return type + +[**RelationModel**](RelationModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewRelationSchema** +> Object viewRelationSchema() + +View relation schema + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = RelationsApi(); + +try { + final result = api_instance.viewRelationSchema(); + print(result); +} catch (e) { + print('Exception when calling RelationsApi->viewRelationSchema: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewRelationSchemaForType** +> Object viewRelationSchemaForType(type) + +View relation schema for type + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = RelationsApi(); +final type = follows; // String | Type of the schema + +try { + final result = api_instance.viewRelationSchemaForType(type); + print(result); +} catch (e) { + print('Exception when calling RelationsApi->viewRelationSchemaForType: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **String**| Type of the schema | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/RevisionModel.md b/doc/RevisionModel.md new file mode 100644 index 0000000..786e568 --- /dev/null +++ b/doc/RevisionModel.md @@ -0,0 +1,21 @@ +# openapi.model.RevisionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**Object**](.md) | Revision's id, assigned by OpenProject | [optional] [readonly] +**identifier** | [**Object**](.md) | The raw SCM identifier of the revision (e.g. full SHA hash) | [readonly] +**formattedIdentifier** | [**Object**](.md) | The SCM identifier of the revision, formatted (e.g. shortened unambiguous SHA hash). May be identical to identifier in many cases | [readonly] +**authorName** | [**Object**](.md) | The name of the author that committed this revision. Note that this name is retrieved from the repository and does not identify a user in OpenProject. | [readonly] +**message** | [**RevisionModelMessage**](RevisionModelMessage.md) | | +**createdAt** | [**Object**](.md) | The time this revision was committed to the repository | +**links** | [**RevisionModelLinks**](RevisionModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RevisionModelLinks.md b/doc/RevisionModelLinks.md new file mode 100644 index 0000000..bb4021c --- /dev/null +++ b/doc/RevisionModelLinks.md @@ -0,0 +1,18 @@ +# openapi.model.RevisionModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**RevisionModelLinksSelf**](RevisionModelLinksSelf.md) | | +**project** | [**RevisionModelLinksProject**](RevisionModelLinksProject.md) | | +**author** | [**RevisionModelLinksAuthor**](RevisionModelLinksAuthor.md) | | [optional] +**showRevision** | [**RevisionModelLinksShowRevision**](RevisionModelLinksShowRevision.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RevisionModelLinksAuthor.md b/doc/RevisionModelLinksAuthor.md new file mode 100644 index 0000000..0d04051 --- /dev/null +++ b/doc/RevisionModelLinksAuthor.md @@ -0,0 +1,20 @@ +# openapi.model.RevisionModelLinksAuthor + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RevisionModelLinksProject.md b/doc/RevisionModelLinksProject.md new file mode 100644 index 0000000..acdf7ed --- /dev/null +++ b/doc/RevisionModelLinksProject.md @@ -0,0 +1,20 @@ +# openapi.model.RevisionModelLinksProject + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RevisionModelLinksSelf.md b/doc/RevisionModelLinksSelf.md new file mode 100644 index 0000000..9614c48 --- /dev/null +++ b/doc/RevisionModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.RevisionModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RevisionModelLinksShowRevision.md b/doc/RevisionModelLinksShowRevision.md new file mode 100644 index 0000000..a0835d4 --- /dev/null +++ b/doc/RevisionModelLinksShowRevision.md @@ -0,0 +1,20 @@ +# openapi.model.RevisionModelLinksShowRevision + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RevisionModelMessage.md b/doc/RevisionModelMessage.md new file mode 100644 index 0000000..5f38b5c --- /dev/null +++ b/doc/RevisionModelMessage.md @@ -0,0 +1,17 @@ +# openapi.model.RevisionModelMessage + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**format** | **String** | Indicates the formatting language of the raw text | [readonly] +**raw** | **String** | The raw text, as entered by the user | [optional] +**html** | **String** | The text converted to HTML according to the format | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RevisionsApi.md b/doc/RevisionsApi.md new file mode 100644 index 0000000..3673c61 --- /dev/null +++ b/doc/RevisionsApi.md @@ -0,0 +1,60 @@ +# openapi.api.RevisionsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**viewRevision**](RevisionsApi.md#viewrevision) | **GET** /api/v3/revisions/{id} | View revision + + +# **viewRevision** +> RevisionModel viewRevision(id) + +View revision + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = RevisionsApi(); +final id = 1; // int | Revision id + +try { + final result = api_instance.viewRevision(id); + print(result); +} catch (e) { + print('Exception when calling RevisionsApi->viewRevision: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Revision id | + +### Return type + +[**RevisionModel**](RevisionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/RoleModel.md b/doc/RoleModel.md new file mode 100644 index 0000000..27481b2 --- /dev/null +++ b/doc/RoleModel.md @@ -0,0 +1,18 @@ +# openapi.model.RoleModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**Object**](Object.md) | | [optional] +**id** | [**Object**](.md) | Role id | [optional] [readonly] +**name** | [**Object**](.md) | Role name | +**links** | [**RoleModelLinks**](RoleModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RoleModelLinks.md b/doc/RoleModelLinks.md new file mode 100644 index 0000000..3f77d37 --- /dev/null +++ b/doc/RoleModelLinks.md @@ -0,0 +1,15 @@ +# openapi.model.RoleModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**RoleModelLinksSelf**](RoleModelLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RoleModelLinksSelf.md b/doc/RoleModelLinksSelf.md new file mode 100644 index 0000000..cc996f2 --- /dev/null +++ b/doc/RoleModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.RoleModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RolesApi.md b/doc/RolesApi.md new file mode 100644 index 0000000..401ce43 --- /dev/null +++ b/doc/RolesApi.md @@ -0,0 +1,107 @@ +# openapi.api.RolesApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listRoles**](RolesApi.md#listroles) | **GET** /api/v3/roles | List roles +[**viewRole**](RolesApi.md#viewrole) | **GET** /api/v3/roles/{id} | View role + + +# **listRoles** +> Object listRoles(filters) + +List roles + +List all defined roles. This includes built in roles like 'Anonymous' and 'Non member'. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = RolesApi(); +final filters = [{ "unit": { "operator": "=", "values": ["system"] }" }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + grantable: filters roles based on whether they are selectable for a membership + unit: filters roles based on the unit ('project' or 'system') for which they are selectable for a membership + +try { + final result = api_instance.listRoles(filters); + print(result); +} catch (e) { + print('Exception when calling RolesApi->listRoles: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + grantable: filters roles based on whether they are selectable for a membership + unit: filters roles based on the unit ('project' or 'system') for which they are selectable for a membership | [optional] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewRole** +> RoleModel viewRole(id) + +View role + +Fetch an individual role. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = RolesApi(); +final id = 1; // int | Role id + +try { + final result = api_instance.viewRole(id); + print(result); +} catch (e) { + print('Exception when calling RolesApi->viewRole: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Role id | + +### Return type + +[**RoleModel**](RoleModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/RootApi.md b/doc/RootApi.md new file mode 100644 index 0000000..515fbe9 --- /dev/null +++ b/doc/RootApi.md @@ -0,0 +1,56 @@ +# openapi.api.RootApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**viewRoot**](RootApi.md#viewroot) | **GET** /api/v3 | View root + + +# **viewRoot** +> RootModel viewRoot() + +View root + +Returns the root resource, containing basic information about the server instance and a collection of useful links. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = RootApi(); + +try { + final result = api_instance.viewRoot(); + print(result); +} catch (e) { + print('Exception when calling RootApi->viewRoot: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**RootModel**](RootModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/RootModel.md b/doc/RootModel.md new file mode 100644 index 0000000..437194b --- /dev/null +++ b/doc/RootModel.md @@ -0,0 +1,18 @@ +# openapi.model.RootModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**Object**](Object.md) | | +**instanceName** | [**Object**](.md) | The name of the OpenProject instance | +**coreVersion** | [**Object**](.md) | The OpenProject core version number for the instance # Conditions **Permission** requires admin privileges | [optional] +**links** | [**RootModelLinks**](RootModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RootModelLinks.md b/doc/RootModelLinks.md new file mode 100644 index 0000000..3208106 --- /dev/null +++ b/doc/RootModelLinks.md @@ -0,0 +1,25 @@ +# openapi.model.RootModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**RootModelLinksSelf**](RootModelLinksSelf.md) | | +**configuration** | [**RootModelLinksConfiguration**](RootModelLinksConfiguration.md) | | +**memberships** | [**RootModelLinksMemberships**](RootModelLinksMemberships.md) | | +**priorities** | [**RootModelLinksPriorities**](RootModelLinksPriorities.md) | | +**relations** | [**RootModelLinksRelations**](RootModelLinksRelations.md) | | +**statuses** | [**RootModelLinksStatuses**](RootModelLinksStatuses.md) | | +**timeEntries** | [**RootModelLinksTimeEntries**](RootModelLinksTimeEntries.md) | | +**types** | [**RootModelLinksTypes**](RootModelLinksTypes.md) | | +**user** | [**RootModelLinksUser**](RootModelLinksUser.md) | | +**userPreferences** | [**RootModelLinksUserPreferences**](RootModelLinksUserPreferences.md) | | +**workPackages** | [**RootModelLinksWorkPackages**](RootModelLinksWorkPackages.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RootModelLinksConfiguration.md b/doc/RootModelLinksConfiguration.md new file mode 100644 index 0000000..fe5da3c --- /dev/null +++ b/doc/RootModelLinksConfiguration.md @@ -0,0 +1,20 @@ +# openapi.model.RootModelLinksConfiguration + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RootModelLinksMemberships.md b/doc/RootModelLinksMemberships.md new file mode 100644 index 0000000..1cd734b --- /dev/null +++ b/doc/RootModelLinksMemberships.md @@ -0,0 +1,20 @@ +# openapi.model.RootModelLinksMemberships + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RootModelLinksPriorities.md b/doc/RootModelLinksPriorities.md new file mode 100644 index 0000000..9831910 --- /dev/null +++ b/doc/RootModelLinksPriorities.md @@ -0,0 +1,20 @@ +# openapi.model.RootModelLinksPriorities + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RootModelLinksRelations.md b/doc/RootModelLinksRelations.md new file mode 100644 index 0000000..4190dbb --- /dev/null +++ b/doc/RootModelLinksRelations.md @@ -0,0 +1,20 @@ +# openapi.model.RootModelLinksRelations + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RootModelLinksSelf.md b/doc/RootModelLinksSelf.md new file mode 100644 index 0000000..3e17aa0 --- /dev/null +++ b/doc/RootModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.RootModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RootModelLinksStatuses.md b/doc/RootModelLinksStatuses.md new file mode 100644 index 0000000..4633e84 --- /dev/null +++ b/doc/RootModelLinksStatuses.md @@ -0,0 +1,20 @@ +# openapi.model.RootModelLinksStatuses + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RootModelLinksTimeEntries.md b/doc/RootModelLinksTimeEntries.md new file mode 100644 index 0000000..7b62196 --- /dev/null +++ b/doc/RootModelLinksTimeEntries.md @@ -0,0 +1,20 @@ +# openapi.model.RootModelLinksTimeEntries + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RootModelLinksTypes.md b/doc/RootModelLinksTypes.md new file mode 100644 index 0000000..648873c --- /dev/null +++ b/doc/RootModelLinksTypes.md @@ -0,0 +1,20 @@ +# openapi.model.RootModelLinksTypes + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RootModelLinksUser.md b/doc/RootModelLinksUser.md new file mode 100644 index 0000000..71ac2a5 --- /dev/null +++ b/doc/RootModelLinksUser.md @@ -0,0 +1,20 @@ +# openapi.model.RootModelLinksUser + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RootModelLinksUserPreferences.md b/doc/RootModelLinksUserPreferences.md new file mode 100644 index 0000000..ad6d399 --- /dev/null +++ b/doc/RootModelLinksUserPreferences.md @@ -0,0 +1,20 @@ +# openapi.model.RootModelLinksUserPreferences + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/RootModelLinksWorkPackages.md b/doc/RootModelLinksWorkPackages.md new file mode 100644 index 0000000..580e64f --- /dev/null +++ b/doc/RootModelLinksWorkPackages.md @@ -0,0 +1,20 @@ +# openapi.model.RootModelLinksWorkPackages + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/SchemaModel.md b/doc/SchemaModel.md new file mode 100644 index 0000000..c5f4a4f --- /dev/null +++ b/doc/SchemaModel.md @@ -0,0 +1,17 @@ +# openapi.model.SchemaModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**Object**](Object.md) | | +**dependencies** | [**Object**](.md) | A list of dependencies between one property's value and another property | [optional] +**links** | [**SchemaModelLinks**](SchemaModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/SchemaModelLinks.md b/doc/SchemaModelLinks.md new file mode 100644 index 0000000..67940ad --- /dev/null +++ b/doc/SchemaModelLinks.md @@ -0,0 +1,15 @@ +# openapi.model.SchemaModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**SchemaModelLinksSelf**](SchemaModelLinksSelf.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/SchemaModelLinksSelf.md b/doc/SchemaModelLinksSelf.md new file mode 100644 index 0000000..816abe0 --- /dev/null +++ b/doc/SchemaModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.SchemaModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/SchemasApi.md b/doc/SchemasApi.md new file mode 100644 index 0000000..d80f8e9 --- /dev/null +++ b/doc/SchemasApi.md @@ -0,0 +1,56 @@ +# openapi.api.SchemasApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**viewTheSchema**](SchemasApi.md#viewtheschema) | **GET** /api/v3/example/schema | view the schema + + +# **viewTheSchema** +> Object viewTheSchema() + +view the schema + +This is an example of how a schema might look like. Note that this endpoint does not exist in the actual implementation. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = SchemasApi(); + +try { + final result = api_instance.viewTheSchema(); + print(result); +} catch (e) { + print('Exception when calling SchemasApi->viewTheSchema: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/ShowOrValidateFormRequest.md b/doc/ShowOrValidateFormRequest.md new file mode 100644 index 0000000..de9b0cb --- /dev/null +++ b/doc/ShowOrValidateFormRequest.md @@ -0,0 +1,17 @@ +# openapi.model.ShowOrValidateFormRequest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**lockVersion** | **num** | | [optional] +**subject** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StatusModel.md b/doc/StatusModel.md new file mode 100644 index 0000000..a484b74 --- /dev/null +++ b/doc/StatusModel.md @@ -0,0 +1,23 @@ +# openapi.model.StatusModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**Object**](Object.md) | | [optional] +**id** | [**Object**](.md) | Status id | [optional] [readonly] +**name** | [**Object**](.md) | Status name | [optional] [readonly] +**position** | [**Object**](.md) | Sort index of the status | [optional] [readonly] +**isDefault** | [**Object**](.md) | | [optional] [readonly] +**isClosed** | [**Object**](.md) | are tickets of this status considered closed? | [optional] [readonly] +**isReadonly** | [**Object**](.md) | are tickets of this status read only? | [optional] [readonly] +**defaultDoneRatio** | [**Object**](.md) | The percentageDone being applied when changing to this status | [optional] +**links** | [**StatusModelLinks**](StatusModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StatusModelLinks.md b/doc/StatusModelLinks.md new file mode 100644 index 0000000..3b9fe20 --- /dev/null +++ b/doc/StatusModelLinks.md @@ -0,0 +1,15 @@ +# openapi.model.StatusModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**StatusModelLinksSelf**](StatusModelLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StatusModelLinksSelf.md b/doc/StatusModelLinksSelf.md new file mode 100644 index 0000000..a2a8ee2 --- /dev/null +++ b/doc/StatusModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.StatusModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StatusesApi.md b/doc/StatusesApi.md new file mode 100644 index 0000000..8ac3cb0 --- /dev/null +++ b/doc/StatusesApi.md @@ -0,0 +1,103 @@ +# openapi.api.StatusesApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listAllStatuses**](StatusesApi.md#listallstatuses) | **GET** /api/v3/statuses | List all Statuses +[**viewStatus**](StatusesApi.md#viewstatus) | **GET** /api/v3/statuses/{id} | View Status + + +# **listAllStatuses** +> Object listAllStatuses() + +List all Statuses + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = StatusesApi(); + +try { + final result = api_instance.listAllStatuses(); + print(result); +} catch (e) { + print('Exception when calling StatusesApi->listAllStatuses: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewStatus** +> StatusModel viewStatus(id) + +View Status + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = StatusesApi(); +final id = 1; // int | Status id + +try { + final result = api_instance.viewStatus(id); + print(result); +} catch (e) { + print('Exception when calling StatusesApi->viewStatus: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Status id | + +### Return type + +[**StatusModel**](StatusModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/StorageFileModel.md b/doc/StorageFileModel.md new file mode 100644 index 0000000..d02802a --- /dev/null +++ b/doc/StorageFileModel.md @@ -0,0 +1,25 @@ +# openapi.model.StorageFileModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Linked file's id on the origin | +**name** | **String** | Linked file's name on the origin | +**mimeType** | **String** | MIME type of the linked file. To link a folder entity, the custom MIME type `application/x-op-directory` MUST be provided. Otherwise it defaults back to an unknown MIME type. | [optional] +**size** | **int** | file size on origin in bytes | [optional] +**createdAt** | [**DateTime**](DateTime.md) | Timestamp of the creation datetime of the file on the origin | [optional] +**lastModifiedAt** | [**DateTime**](DateTime.md) | Timestamp of the datetime of the last modification of the file on the origin | [optional] +**createdByName** | **String** | Display name of the author that created the file on the origin | [optional] +**lastModifiedByName** | **String** | Display name of the author that modified the file on the origin last | [optional] +**type** | [**Object**](Object.md) | | +**location** | [**Object**](.md) | Location identification for file in storage | +**links** | [**StorageFileModelAllOfLinks**](StorageFileModelAllOfLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageFileModelAllOfLinks.md b/doc/StorageFileModelAllOfLinks.md new file mode 100644 index 0000000..8b0454a --- /dev/null +++ b/doc/StorageFileModelAllOfLinks.md @@ -0,0 +1,15 @@ +# openapi.model.StorageFileModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**StorageFileModelAllOfLinksSelf**](StorageFileModelAllOfLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageFileModelAllOfLinksSelf.md b/doc/StorageFileModelAllOfLinksSelf.md new file mode 100644 index 0000000..f7fbcaf --- /dev/null +++ b/doc/StorageFileModelAllOfLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.StorageFileModelAllOfLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageFileUploadLinkModel.md b/doc/StorageFileUploadLinkModel.md new file mode 100644 index 0000000..9002bae --- /dev/null +++ b/doc/StorageFileUploadLinkModel.md @@ -0,0 +1,16 @@ +# openapi.model.StorageFileUploadLinkModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**Object**](Object.md) | | +**links** | [**StorageFileUploadLinkModelLinks**](StorageFileUploadLinkModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageFileUploadLinkModelLinks.md b/doc/StorageFileUploadLinkModelLinks.md new file mode 100644 index 0000000..0cf2b38 --- /dev/null +++ b/doc/StorageFileUploadLinkModelLinks.md @@ -0,0 +1,16 @@ +# openapi.model.StorageFileUploadLinkModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**StorageFileUploadLinkModelLinksSelf**](StorageFileUploadLinkModelLinksSelf.md) | | +**destination** | [**StorageFileUploadLinkModelLinksDestination**](StorageFileUploadLinkModelLinksDestination.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageFileUploadLinkModelLinksDestination.md b/doc/StorageFileUploadLinkModelLinksDestination.md new file mode 100644 index 0000000..bfee535 --- /dev/null +++ b/doc/StorageFileUploadLinkModelLinksDestination.md @@ -0,0 +1,20 @@ +# openapi.model.StorageFileUploadLinkModelLinksDestination + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageFileUploadLinkModelLinksSelf.md b/doc/StorageFileUploadLinkModelLinksSelf.md new file mode 100644 index 0000000..d875339 --- /dev/null +++ b/doc/StorageFileUploadLinkModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.StorageFileUploadLinkModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageFileUploadPreparationModel.md b/doc/StorageFileUploadPreparationModel.md new file mode 100644 index 0000000..6e48d07 --- /dev/null +++ b/doc/StorageFileUploadPreparationModel.md @@ -0,0 +1,17 @@ +# openapi.model.StorageFileUploadPreparationModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**projectId** | [**Object**](.md) | The project identifier, from where a user starts uploading a file. | +**fileName** | [**Object**](.md) | The file name. | +**parent** | [**Object**](.md) | The directory to which the file is to be uploaded. For root directories, the value `/` must be provided. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageFilesModel.md b/doc/StorageFilesModel.md new file mode 100644 index 0000000..cf980d9 --- /dev/null +++ b/doc/StorageFilesModel.md @@ -0,0 +1,19 @@ +# openapi.model.StorageFilesModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**Object**](Object.md) | | +**files** | [**Object**](.md) | List of files provided by the selected storage. | +**parent** | [**StorageFilesModelParent**](StorageFilesModelParent.md) | | +**ancestors** | [**Object**](.md) | List of ancestors of the parent directory. Can be empty, if parent directory was root directory. | +**links** | [**StorageFileModelAllOfLinks**](StorageFileModelAllOfLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageFilesModelParent.md b/doc/StorageFilesModelParent.md new file mode 100644 index 0000000..fedd5fe --- /dev/null +++ b/doc/StorageFilesModelParent.md @@ -0,0 +1,25 @@ +# openapi.model.StorageFilesModelParent + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | Linked file's id on the origin | +**name** | **String** | Linked file's name on the origin | +**mimeType** | **String** | MIME type of the linked file. To link a folder entity, the custom MIME type `application/x-op-directory` MUST be provided. Otherwise it defaults back to an unknown MIME type. | [optional] +**size** | **int** | file size on origin in bytes | [optional] +**createdAt** | [**DateTime**](DateTime.md) | Timestamp of the creation datetime of the file on the origin | [optional] +**lastModifiedAt** | [**DateTime**](DateTime.md) | Timestamp of the datetime of the last modification of the file on the origin | [optional] +**createdByName** | **String** | Display name of the author that created the file on the origin | [optional] +**lastModifiedByName** | **String** | Display name of the author that modified the file on the origin last | [optional] +**type** | [**Object**](Object.md) | | +**location** | [**Object**](.md) | Location identification for file in storage | +**links** | [**StorageFileModelAllOfLinks**](StorageFileModelAllOfLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageReadModel.md b/doc/StorageReadModel.md new file mode 100644 index 0000000..72148a4 --- /dev/null +++ b/doc/StorageReadModel.md @@ -0,0 +1,22 @@ +# openapi.model.StorageReadModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**Object**](.md) | Storage id | +**type** | [**Object**](Object.md) | | +**name** | [**Object**](.md) | Storage name | +**hasApplicationPassword** | [**Object**](.md) | Whether the storage has the application password to use for the Nextcloud storage. Ignored if the provider type is not Nextcloud | [optional] +**createdAt** | [**Object**](.md) | Time of creation | [optional] +**updatedAt** | [**Object**](.md) | Time of the most recent change to the storage | [optional] +**embedded** | [**StorageReadModelEmbedded**](StorageReadModelEmbedded.md) | | [optional] +**links** | [**StorageReadModelLinks**](StorageReadModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageReadModelEmbedded.md b/doc/StorageReadModelEmbedded.md new file mode 100644 index 0000000..5dfeee8 --- /dev/null +++ b/doc/StorageReadModelEmbedded.md @@ -0,0 +1,16 @@ +# openapi.model.StorageReadModelEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**oauthApplication** | [**OAuthApplicationReadModel**](OAuthApplicationReadModel.md) | | +**oauthClientCredentials** | [**OAuthClientCredentialsReadModel**](OAuthClientCredentialsReadModel.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageReadModelLinks.md b/doc/StorageReadModelLinks.md new file mode 100644 index 0000000..fd9adec --- /dev/null +++ b/doc/StorageReadModelLinks.md @@ -0,0 +1,22 @@ +# openapi.model.StorageReadModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**StorageReadModelLinksSelf**](StorageReadModelLinksSelf.md) | | +**type** | [**StorageReadModelLinksType**](StorageReadModelLinksType.md) | | +**origin** | [**StorageReadModelLinksOrigin**](StorageReadModelLinksOrigin.md) | | +**open** | [**StorageReadModelLinksOpen**](StorageReadModelLinksOpen.md) | | +**authorizationState** | [**StorageReadModelLinksAuthorizationState**](StorageReadModelLinksAuthorizationState.md) | | +**authorize** | [**StorageReadModelLinksAuthorize**](StorageReadModelLinksAuthorize.md) | | [optional] +**oauthApplication** | [**StorageReadModelLinksOauthApplication**](StorageReadModelLinksOauthApplication.md) | | [optional] +**oauthClientCredentials** | [**StorageReadModelLinksOauthClientCredentials**](StorageReadModelLinksOauthClientCredentials.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageReadModelLinksAuthorizationState.md b/doc/StorageReadModelLinksAuthorizationState.md new file mode 100644 index 0000000..7221de5 --- /dev/null +++ b/doc/StorageReadModelLinksAuthorizationState.md @@ -0,0 +1,20 @@ +# openapi.model.StorageReadModelLinksAuthorizationState + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageReadModelLinksAuthorize.md b/doc/StorageReadModelLinksAuthorize.md new file mode 100644 index 0000000..fb59cf5 --- /dev/null +++ b/doc/StorageReadModelLinksAuthorize.md @@ -0,0 +1,20 @@ +# openapi.model.StorageReadModelLinksAuthorize + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageReadModelLinksOauthApplication.md b/doc/StorageReadModelLinksOauthApplication.md new file mode 100644 index 0000000..679acb4 --- /dev/null +++ b/doc/StorageReadModelLinksOauthApplication.md @@ -0,0 +1,20 @@ +# openapi.model.StorageReadModelLinksOauthApplication + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageReadModelLinksOauthClientCredentials.md b/doc/StorageReadModelLinksOauthClientCredentials.md new file mode 100644 index 0000000..c6aabc7 --- /dev/null +++ b/doc/StorageReadModelLinksOauthClientCredentials.md @@ -0,0 +1,20 @@ +# openapi.model.StorageReadModelLinksOauthClientCredentials + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageReadModelLinksOpen.md b/doc/StorageReadModelLinksOpen.md new file mode 100644 index 0000000..147684d --- /dev/null +++ b/doc/StorageReadModelLinksOpen.md @@ -0,0 +1,20 @@ +# openapi.model.StorageReadModelLinksOpen + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageReadModelLinksOrigin.md b/doc/StorageReadModelLinksOrigin.md new file mode 100644 index 0000000..dcaa781 --- /dev/null +++ b/doc/StorageReadModelLinksOrigin.md @@ -0,0 +1,20 @@ +# openapi.model.StorageReadModelLinksOrigin + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageReadModelLinksSelf.md b/doc/StorageReadModelLinksSelf.md new file mode 100644 index 0000000..f1783b2 --- /dev/null +++ b/doc/StorageReadModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.StorageReadModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageReadModelLinksType.md b/doc/StorageReadModelLinksType.md new file mode 100644 index 0000000..97c2047 --- /dev/null +++ b/doc/StorageReadModelLinksType.md @@ -0,0 +1,20 @@ +# openapi.model.StorageReadModelLinksType + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageWriteModel.md b/doc/StorageWriteModel.md new file mode 100644 index 0000000..b347325 --- /dev/null +++ b/doc/StorageWriteModel.md @@ -0,0 +1,17 @@ +# openapi.model.StorageWriteModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | [**Object**](.md) | Storage name, if not provided, falls back to a default. | [optional] +**applicationPassword** | [**Object**](.md) | The application password to use for the Nextcloud storage. Ignored if the provider type is not Nextcloud. If a string is provided, the password is set and automatic management is enabled for the storage. If null is provided, the password is unset and automatic management is disabled for the storage. | [optional] +**links** | [**StorageWriteModelLinks**](StorageWriteModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageWriteModelLinks.md b/doc/StorageWriteModelLinks.md new file mode 100644 index 0000000..294f1ab --- /dev/null +++ b/doc/StorageWriteModelLinks.md @@ -0,0 +1,16 @@ +# openapi.model.StorageWriteModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**origin** | [**StorageWriteModelLinksOrigin**](StorageWriteModelLinksOrigin.md) | | +**type** | [**StorageWriteModelLinksType**](StorageWriteModelLinksType.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageWriteModelLinksOrigin.md b/doc/StorageWriteModelLinksOrigin.md new file mode 100644 index 0000000..75ddfbf --- /dev/null +++ b/doc/StorageWriteModelLinksOrigin.md @@ -0,0 +1,20 @@ +# openapi.model.StorageWriteModelLinksOrigin + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/StorageWriteModelLinksType.md b/doc/StorageWriteModelLinksType.md new file mode 100644 index 0000000..7e5847d --- /dev/null +++ b/doc/StorageWriteModelLinksType.md @@ -0,0 +1,20 @@ +# openapi.model.StorageWriteModelLinksType + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntriesApi.md b/doc/TimeEntriesApi.md new file mode 100644 index 0000000..d509853 --- /dev/null +++ b/doc/TimeEntriesApi.md @@ -0,0 +1,425 @@ +# openapi.api.TimeEntriesApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**availableProjectsForTimeEntries**](TimeEntriesApi.md#availableprojectsfortimeentries) | **GET** /api/v3/time_entries/available_projects | Available projects for time entries +[**createTimeEntry**](TimeEntriesApi.md#createtimeentry) | **POST** /api/v3/time_entries | Create time entry +[**deleteTimeEntry**](TimeEntriesApi.md#deletetimeentry) | **DELETE** /api/v3/time_entries/{id} | Delete time entry +[**getTimeEntry**](TimeEntriesApi.md#gettimeentry) | **GET** /api/v3/time_entries/{id} | Get time entry +[**listTimeEntries**](TimeEntriesApi.md#listtimeentries) | **GET** /api/v3/time_entries | List time entries +[**timeEntryCreateForm**](TimeEntriesApi.md#timeentrycreateform) | **POST** /api/v3/time_entries/form | Time entry create form +[**timeEntryUpdateForm**](TimeEntriesApi.md#timeentryupdateform) | **POST** /api/v3/time_entries/{id}/form | Time entry update form +[**updateTimeEntry**](TimeEntriesApi.md#updatetimeentry) | **PATCH** /api/v3/time_entries/{id} | update time entry +[**viewTimeEntrySchema**](TimeEntriesApi.md#viewtimeentryschema) | **GET** /api/v3/time_entries/schema | View time entry schema + + +# **availableProjectsForTimeEntries** +> Object availableProjectsForTimeEntries() + +Available projects for time entries + +Gets a list of projects in which a time entry can be created in or be assigned to on update. The list contains all projects in which the user issuing the request has the necessary permissions. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = TimeEntriesApi(); + +try { + final result = api_instance.availableProjectsForTimeEntries(); + print(result); +} catch (e) { + print('Exception when calling TimeEntriesApi->availableProjectsForTimeEntries: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createTimeEntry** +> TimeEntryModel createTimeEntry() + +Create time entry + +Creates a new time entry applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a time entries' attributes and are accepted by the endpoint. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = TimeEntriesApi(); + +try { + final result = api_instance.createTimeEntry(); + print(result); +} catch (e) { + print('Exception when calling TimeEntriesApi->createTimeEntry: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TimeEntryModel**](TimeEntryModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteTimeEntry** +> deleteTimeEntry(id) + +Delete time entry + +Permanently deletes the specified time entry. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = TimeEntriesApi(); +final id = 1; // int | Time entry id + +try { + api_instance.deleteTimeEntry(id); +} catch (e) { + print('Exception when calling TimeEntriesApi->deleteTimeEntry: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Time entry id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getTimeEntry** +> TimeEntryModel getTimeEntry(id) + +Get time entry + +Retrieves a single time entry identified by the given id. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = TimeEntriesApi(); +final id = 1; // int | time entry id + +try { + final result = api_instance.getTimeEntry(id); + print(result); +} catch (e) { + print('Exception when calling TimeEntriesApi->getTimeEntry: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| time entry id | + +### Return type + +[**TimeEntryModel**](TimeEntryModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listTimeEntries** +> TimeEntryCollectionModel listTimeEntries(offset, pageSize, sortBy, filters) + +List time entries + +Lists time entries. The time entries returned depend on the filters provided and also on the permission of the requesting user. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = TimeEntriesApi(); +final offset = 25; // int | Page number inside the requested collection. +final pageSize = 25; // int | Number of elements to display per page. +final sortBy = [["spent_on", "asc"]]; // String | JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + hours: Sort by logged hours + spent_on: Sort by spent on date + created_at: Sort by time entry creation datetime + updated_at: Sort by the time the time entry was updated last +final filters = [{ "work_package": { "operator": "=", "values": ["1", "2"] } }, { "project": { "operator": "=", "values": ["1"] } }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + work_package: Filter time entries by work package + project: Filter time entries by project + user: Filter time entries by users + ongoing: Filter for your ongoing timers + spent_on: Filter time entries by spent on date + created_at: Filter time entries by creation datetime + updated_at: Filter time entries by the last time they where updated + activity: Filter time entries by time entry activity + +try { + final result = api_instance.listTimeEntries(offset, pageSize, sortBy, filters); + print(result); +} catch (e) { + print('Exception when calling TimeEntriesApi->listTimeEntries: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **offset** | **int**| Page number inside the requested collection. | [optional] [default to 1] + **pageSize** | **int**| Number of elements to display per page. | [optional] + **sortBy** | **String**| JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + hours: Sort by logged hours + spent_on: Sort by spent on date + created_at: Sort by time entry creation datetime + updated_at: Sort by the time the time entry was updated last | [optional] [default to '["spent_on", "asc"]'] + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + work_package: Filter time entries by work package + project: Filter time entries by project + user: Filter time entries by users + ongoing: Filter for your ongoing timers + spent_on: Filter time entries by spent on date + created_at: Filter time entries by creation datetime + updated_at: Filter time entries by the last time they where updated + activity: Filter time entries by time entry activity | [optional] + +### Return type + +[**TimeEntryCollectionModel**](TimeEntryCollectionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **timeEntryCreateForm** +> timeEntryCreateForm() + +Time entry create form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = TimeEntriesApi(); + +try { + api_instance.timeEntryCreateForm(); +} catch (e) { + print('Exception when calling TimeEntriesApi->timeEntryCreateForm: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **timeEntryUpdateForm** +> timeEntryUpdateForm(id, body) + +Time entry update form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = TimeEntriesApi(); +final id = 1; // int | Time entries activity id +final body = int(); // int | Time entries activity id + +try { + api_instance.timeEntryUpdateForm(id, body); +} catch (e) { + print('Exception when calling TimeEntriesApi->timeEntryUpdateForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Time entries activity id | + **body** | **int**| Time entries activity id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateTimeEntry** +> TimeEntryModel updateTimeEntry(id) + +update time entry + +Updates the given time entry by applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a time entries' attributes and are accepted by the endpoint. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = TimeEntriesApi(); +final id = 1; // int | Time entry id + +try { + final result = api_instance.updateTimeEntry(id); + print(result); +} catch (e) { + print('Exception when calling TimeEntriesApi->updateTimeEntry: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Time entry id | + +### Return type + +[**TimeEntryModel**](TimeEntryModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewTimeEntrySchema** +> Object viewTimeEntrySchema() + +View time entry schema + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = TimeEntriesApi(); + +try { + final result = api_instance.viewTimeEntrySchema(); + print(result); +} catch (e) { + print('Exception when calling TimeEntriesApi->viewTimeEntrySchema: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/TimeEntryActivitiesApi.md b/doc/TimeEntryActivitiesApi.md new file mode 100644 index 0000000..efe3aba --- /dev/null +++ b/doc/TimeEntryActivitiesApi.md @@ -0,0 +1,60 @@ +# openapi.api.TimeEntryActivitiesApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getTimeEntriesActivity**](TimeEntryActivitiesApi.md#gettimeentriesactivity) | **GET** /api/v3/time_entries/activity/{id} | View time entries activity + + +# **getTimeEntriesActivity** +> TimeEntryActivityModel getTimeEntriesActivity(id) + +View time entries activity + +Fetches the time entry activity resource by the given id. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = TimeEntryActivitiesApi(); +final id = 1; // int | Time entries activity id + +try { + final result = api_instance.getTimeEntriesActivity(id); + print(result); +} catch (e) { + print('Exception when calling TimeEntryActivitiesApi->getTimeEntriesActivity: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Time entries activity id | + +### Return type + +[**TimeEntryActivityModel**](TimeEntryActivityModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/TimeEntryActivityModel.md b/doc/TimeEntryActivityModel.md new file mode 100644 index 0000000..f401253 --- /dev/null +++ b/doc/TimeEntryActivityModel.md @@ -0,0 +1,21 @@ +# openapi.model.TimeEntryActivityModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**Object**](Object.md) | | +**id** | [**Object**](.md) | Time entry id | +**name** | [**Object**](.md) | The human readable name chosen for this activity | +**position** | [**Object**](.md) | The rank the activity has in a list of activities | +**default_** | [**Object**](.md) | Flag to signal whether this activity is the default activity | +**embedded** | [**TimeEntryActivityModelEmbedded**](TimeEntryActivityModelEmbedded.md) | | +**links** | [**TimeEntryActivityModelLinks**](TimeEntryActivityModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryActivityModelEmbedded.md b/doc/TimeEntryActivityModelEmbedded.md new file mode 100644 index 0000000..413cf78 --- /dev/null +++ b/doc/TimeEntryActivityModelEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.TimeEntryActivityModelEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**projects** | [**Object**](.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryActivityModelLinks.md b/doc/TimeEntryActivityModelLinks.md new file mode 100644 index 0000000..526554d --- /dev/null +++ b/doc/TimeEntryActivityModelLinks.md @@ -0,0 +1,16 @@ +# openapi.model.TimeEntryActivityModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**TimeEntryActivityModelLinksSelf**](TimeEntryActivityModelLinksSelf.md) | | +**projects** | [**Object**](.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryActivityModelLinksSelf.md b/doc/TimeEntryActivityModelLinksSelf.md new file mode 100644 index 0000000..a4c2299 --- /dev/null +++ b/doc/TimeEntryActivityModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.TimeEntryActivityModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryCollectionModel.md b/doc/TimeEntryCollectionModel.md new file mode 100644 index 0000000..a84632c --- /dev/null +++ b/doc/TimeEntryCollectionModel.md @@ -0,0 +1,19 @@ +# openapi.model.TimeEntryCollectionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**TimeEntryCollectionModelAllOfLinks**](TimeEntryCollectionModelAllOfLinks.md) | | +**embedded** | [**TimeEntryCollectionModelAllOfEmbedded**](TimeEntryCollectionModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryCollectionModelAllOfEmbedded.md b/doc/TimeEntryCollectionModelAllOfEmbedded.md new file mode 100644 index 0000000..1948a36 --- /dev/null +++ b/doc/TimeEntryCollectionModelAllOfEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.TimeEntryCollectionModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**Object**](.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryCollectionModelAllOfLinks.md b/doc/TimeEntryCollectionModelAllOfLinks.md new file mode 100644 index 0000000..b29ba0b --- /dev/null +++ b/doc/TimeEntryCollectionModelAllOfLinks.md @@ -0,0 +1,15 @@ +# openapi.model.TimeEntryCollectionModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**TimeEntryCollectionModelAllOfLinksSelf**](TimeEntryCollectionModelAllOfLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryCollectionModelAllOfLinksSelf.md b/doc/TimeEntryCollectionModelAllOfLinksSelf.md new file mode 100644 index 0000000..4d8edb3 --- /dev/null +++ b/doc/TimeEntryCollectionModelAllOfLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.TimeEntryCollectionModelAllOfLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryModel.md b/doc/TimeEntryModel.md new file mode 100644 index 0000000..c007081 --- /dev/null +++ b/doc/TimeEntryModel.md @@ -0,0 +1,22 @@ +# openapi.model.TimeEntryModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**Object**](.md) | The id of the time entry | [optional] +**comment** | [**TimeEntryModelComment**](TimeEntryModelComment.md) | | [optional] +**spentOn** | [**Object**](.md) | The date the expenditure is booked for | [optional] +**hours** | [**Object**](.md) | The time quantifying the expenditure | [optional] +**ongoing** | [**Object**](.md) | Whether the time entry is actively tracking time | [optional] +**createdAt** | [**Object**](.md) | The time the time entry was created | [optional] +**updatedAt** | [**Object**](.md) | The time the time entry was last updated | [optional] +**links** | [**TimeEntryModelLinks**](TimeEntryModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryModelComment.md b/doc/TimeEntryModelComment.md new file mode 100644 index 0000000..7f5a727 --- /dev/null +++ b/doc/TimeEntryModelComment.md @@ -0,0 +1,17 @@ +# openapi.model.TimeEntryModelComment + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**format** | **String** | Indicates the formatting language of the raw text | [readonly] +**raw** | **String** | The raw text, as entered by the user | [optional] +**html** | **String** | The text converted to HTML according to the format | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryModelLinks.md b/doc/TimeEntryModelLinks.md new file mode 100644 index 0000000..8cd4c75 --- /dev/null +++ b/doc/TimeEntryModelLinks.md @@ -0,0 +1,23 @@ +# openapi.model.TimeEntryModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**TimeEntryModelLinksSelf**](TimeEntryModelLinksSelf.md) | | +**updateImmediately** | [**TimeEntryModelLinksUpdateImmediately**](TimeEntryModelLinksUpdateImmediately.md) | | [optional] +**update** | [**TimeEntryModelLinksUpdate**](TimeEntryModelLinksUpdate.md) | | [optional] +**delete** | [**TimeEntryModelLinksDelete**](TimeEntryModelLinksDelete.md) | | [optional] +**schema** | [**TimeEntryModelLinksSchema**](TimeEntryModelLinksSchema.md) | | [optional] +**project** | [**TimeEntryModelLinksProject**](TimeEntryModelLinksProject.md) | | +**workPackage** | [**TimeEntryModelLinksWorkPackage**](TimeEntryModelLinksWorkPackage.md) | | [optional] +**user** | [**TimeEntryModelLinksUser**](TimeEntryModelLinksUser.md) | | +**activity** | [**TimeEntryModelLinksActivity**](TimeEntryModelLinksActivity.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryModelLinksActivity.md b/doc/TimeEntryModelLinksActivity.md new file mode 100644 index 0000000..fd266fd --- /dev/null +++ b/doc/TimeEntryModelLinksActivity.md @@ -0,0 +1,20 @@ +# openapi.model.TimeEntryModelLinksActivity + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryModelLinksDelete.md b/doc/TimeEntryModelLinksDelete.md new file mode 100644 index 0000000..ae75052 --- /dev/null +++ b/doc/TimeEntryModelLinksDelete.md @@ -0,0 +1,20 @@ +# openapi.model.TimeEntryModelLinksDelete + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryModelLinksProject.md b/doc/TimeEntryModelLinksProject.md new file mode 100644 index 0000000..58fc167 --- /dev/null +++ b/doc/TimeEntryModelLinksProject.md @@ -0,0 +1,20 @@ +# openapi.model.TimeEntryModelLinksProject + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryModelLinksSchema.md b/doc/TimeEntryModelLinksSchema.md new file mode 100644 index 0000000..27d5275 --- /dev/null +++ b/doc/TimeEntryModelLinksSchema.md @@ -0,0 +1,20 @@ +# openapi.model.TimeEntryModelLinksSchema + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryModelLinksSelf.md b/doc/TimeEntryModelLinksSelf.md new file mode 100644 index 0000000..efa23f9 --- /dev/null +++ b/doc/TimeEntryModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.TimeEntryModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryModelLinksUpdate.md b/doc/TimeEntryModelLinksUpdate.md new file mode 100644 index 0000000..798608b --- /dev/null +++ b/doc/TimeEntryModelLinksUpdate.md @@ -0,0 +1,20 @@ +# openapi.model.TimeEntryModelLinksUpdate + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryModelLinksUpdateImmediately.md b/doc/TimeEntryModelLinksUpdateImmediately.md new file mode 100644 index 0000000..81bece3 --- /dev/null +++ b/doc/TimeEntryModelLinksUpdateImmediately.md @@ -0,0 +1,20 @@ +# openapi.model.TimeEntryModelLinksUpdateImmediately + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryModelLinksUser.md b/doc/TimeEntryModelLinksUser.md new file mode 100644 index 0000000..394eae9 --- /dev/null +++ b/doc/TimeEntryModelLinksUser.md @@ -0,0 +1,20 @@ +# openapi.model.TimeEntryModelLinksUser + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TimeEntryModelLinksWorkPackage.md b/doc/TimeEntryModelLinksWorkPackage.md new file mode 100644 index 0000000..4fb0fde --- /dev/null +++ b/doc/TimeEntryModelLinksWorkPackage.md @@ -0,0 +1,20 @@ +# openapi.model.TimeEntryModelLinksWorkPackage + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TypeModel.md b/doc/TypeModel.md new file mode 100644 index 0000000..21578cb --- /dev/null +++ b/doc/TypeModel.md @@ -0,0 +1,23 @@ +# openapi.model.TypeModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**Object**](.md) | Type id | [optional] [readonly] +**name** | [**Object**](.md) | Type name | [optional] [readonly] +**color** | [**Object**](.md) | The color used to represent this type | [optional] [readonly] +**position** | [**Object**](.md) | Sort index of the type | [optional] [readonly] +**isDefault** | [**Object**](.md) | Is this type active by default in new projects? | [optional] [readonly] +**isMilestone** | [**Object**](.md) | Do work packages of this type represent a milestone? | [optional] [readonly] +**createdAt** | [**Object**](.md) | Time of creation | [optional] [readonly] +**updatedAt** | [**Object**](.md) | Time of the most recent change to the user | [optional] +**links** | [**TypeModelLinks**](TypeModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TypeModelLinks.md b/doc/TypeModelLinks.md new file mode 100644 index 0000000..1e43679 --- /dev/null +++ b/doc/TypeModelLinks.md @@ -0,0 +1,15 @@ +# openapi.model.TypeModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**TypeModelLinksSelf**](TypeModelLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TypeModelLinksSelf.md b/doc/TypeModelLinksSelf.md new file mode 100644 index 0000000..756c263 --- /dev/null +++ b/doc/TypeModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.TypeModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/TypesApi.md b/doc/TypesApi.md new file mode 100644 index 0000000..1c29527 --- /dev/null +++ b/doc/TypesApi.md @@ -0,0 +1,150 @@ +# openapi.api.TypesApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listAllTypes**](TypesApi.md#listalltypes) | **GET** /api/v3/types | List all Types +[**listTypesAvailableInAProject**](TypesApi.md#listtypesavailableinaproject) | **GET** /api/v3/projects/{id}/types | List types available in a project +[**viewType**](TypesApi.md#viewtype) | **GET** /api/v3/types/{id} | View Type + + +# **listAllTypes** +> Object listAllTypes() + +List all Types + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = TypesApi(); + +try { + final result = api_instance.listAllTypes(); + print(result); +} catch (e) { + print('Exception when calling TypesApi->listAllTypes: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listTypesAvailableInAProject** +> Object listTypesAvailableInAProject(id) + +List types available in a project + +This endpoint lists the types that are *available* in a given project. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = TypesApi(); +final id = 1; // int | ID of the project whose types will be listed + +try { + final result = api_instance.listTypesAvailableInAProject(id); + print(result); +} catch (e) { + print('Exception when calling TypesApi->listTypesAvailableInAProject: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| ID of the project whose types will be listed | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewType** +> TypeModel viewType(id) + +View Type + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = TypesApi(); +final id = 1; // int | Type id + +try { + final result = api_instance.viewType(id); + print(result); +} catch (e) { + print('Exception when calling TypesApi->viewType: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Type id | + +### Return type + +[**TypeModel**](TypeModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/UpdateActivityRequest.md b/doc/UpdateActivityRequest.md new file mode 100644 index 0000000..6ae79a3 --- /dev/null +++ b/doc/UpdateActivityRequest.md @@ -0,0 +1,15 @@ +# openapi.model.UpdateActivityRequest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comment** | [**UpdateActivityRequestComment**](UpdateActivityRequestComment.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UpdateActivityRequestComment.md b/doc/UpdateActivityRequestComment.md new file mode 100644 index 0000000..d7d0bc9 --- /dev/null +++ b/doc/UpdateActivityRequestComment.md @@ -0,0 +1,15 @@ +# openapi.model.UpdateActivityRequestComment + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**raw** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UpdateUserPreferencesRequest.md b/doc/UpdateUserPreferencesRequest.md new file mode 100644 index 0000000..c91b531 --- /dev/null +++ b/doc/UpdateUserPreferencesRequest.md @@ -0,0 +1,16 @@ +# openapi.model.UpdateUserPreferencesRequest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autoHidePopups** | **bool** | | [optional] +**timeZone** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserCollectionModel.md b/doc/UserCollectionModel.md new file mode 100644 index 0000000..2cb55f5 --- /dev/null +++ b/doc/UserCollectionModel.md @@ -0,0 +1,19 @@ +# openapi.model.UserCollectionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**UserCollectionModelAllOfLinks**](UserCollectionModelAllOfLinks.md) | | +**embedded** | [**UserCollectionModelAllOfEmbedded**](UserCollectionModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserCollectionModelAllOfEmbedded.md b/doc/UserCollectionModelAllOfEmbedded.md new file mode 100644 index 0000000..15836ac --- /dev/null +++ b/doc/UserCollectionModelAllOfEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.UserCollectionModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**Object**](.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserCollectionModelAllOfLinks.md b/doc/UserCollectionModelAllOfLinks.md new file mode 100644 index 0000000..890ced2 --- /dev/null +++ b/doc/UserCollectionModelAllOfLinks.md @@ -0,0 +1,15 @@ +# openapi.model.UserCollectionModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**UserCollectionModelAllOfLinksSelf**](UserCollectionModelAllOfLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserCollectionModelAllOfLinksSelf.md b/doc/UserCollectionModelAllOfLinksSelf.md new file mode 100644 index 0000000..873c1d5 --- /dev/null +++ b/doc/UserCollectionModelAllOfLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.UserCollectionModelAllOfLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserCreateModel.md b/doc/UserCreateModel.md new file mode 100644 index 0000000..89b9364 --- /dev/null +++ b/doc/UserCreateModel.md @@ -0,0 +1,22 @@ +# openapi.model.UserCreateModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**admin** | [**Object**](.md) | | +**email** | [**Object**](.md) | | +**login** | [**Object**](.md) | | +**password** | [**Object**](.md) | The users password. *Conditions:* Only writable on creation, not on update. | [optional] +**firstName** | [**Object**](.md) | | +**lastName** | [**Object**](.md) | | +**status** | [**Object**](.md) | The current activation status of the user. *Conditions:* Only writable on creation, not on update. | [optional] +**language** | [**Object**](.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserModel.md b/doc/UserModel.md new file mode 100644 index 0000000..d51b47b --- /dev/null +++ b/doc/UserModel.md @@ -0,0 +1,29 @@ +# openapi.model.UserModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**Object**](Object.md) | | +**id** | [**Object**](.md) | User's id | +**login** | [**Object**](.md) | User's login name # Conditions **Permission**: Administrator, manage_user global permission | [optional] +**firstName** | [**Object**](.md) | User's first name # Conditions **Permission**: Administrator, manage_user global permission | [optional] +**lastName** | [**Object**](.md) | User's last name # Conditions **Permission**: Administrator, manage_user global permission | [optional] +**name** | [**Object**](.md) | User's full name, formatting depends on instance settings | +**email** | [**Object**](.md) | User's email address # Conditions E-Mail address not hidden, **Permission**: Administrator, manage_user global permission | [optional] +**admin** | [**Object**](.md) | Flag indicating whether or not the user is an admin # Conditions **Permission**: Administrator | [optional] +**avatar** | [**Object**](.md) | URL to user's avatar | +**status** | [**Object**](.md) | The current activation status of the user (see below) | [optional] +**language** | [**Object**](.md) | User's language | ISO 639-1 format # Conditions **Permission**: Administrator, manage_user global permission | [optional] +**identityUrl** | [**Object**](.md) | User's identity_url for OmniAuth authentication # Conditions **Permission**: Administrator | [optional] +**createdAt** | [**Object**](.md) | Time of creation | [optional] +**updatedAt** | [**Object**](.md) | Time of the most recent change to the user | [optional] +**links** | [**UserModelLinks**](UserModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserModelLinks.md b/doc/UserModelLinks.md new file mode 100644 index 0000000..fe75737 --- /dev/null +++ b/doc/UserModelLinks.md @@ -0,0 +1,21 @@ +# openapi.model.UserModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**UserModelLinksSelf**](UserModelLinksSelf.md) | | +**memberships** | [**UserModelLinksMemberships**](UserModelLinksMemberships.md) | | +**showUser** | [**UserModelLinksShowUser**](UserModelLinksShowUser.md) | | +**updateImmediately** | [**UserModelLinksUpdateImmediately**](UserModelLinksUpdateImmediately.md) | | [optional] +**lock** | [**UserModelLinksLock**](UserModelLinksLock.md) | | [optional] +**unlock** | [**UserModelLinksUnlock**](UserModelLinksUnlock.md) | | [optional] +**delete** | [**UserModelLinksDelete**](UserModelLinksDelete.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserModelLinksDelete.md b/doc/UserModelLinksDelete.md new file mode 100644 index 0000000..a2eca18 --- /dev/null +++ b/doc/UserModelLinksDelete.md @@ -0,0 +1,20 @@ +# openapi.model.UserModelLinksDelete + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserModelLinksLock.md b/doc/UserModelLinksLock.md new file mode 100644 index 0000000..5345fdf --- /dev/null +++ b/doc/UserModelLinksLock.md @@ -0,0 +1,20 @@ +# openapi.model.UserModelLinksLock + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserModelLinksMemberships.md b/doc/UserModelLinksMemberships.md new file mode 100644 index 0000000..d79cf99 --- /dev/null +++ b/doc/UserModelLinksMemberships.md @@ -0,0 +1,20 @@ +# openapi.model.UserModelLinksMemberships + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserModelLinksSelf.md b/doc/UserModelLinksSelf.md new file mode 100644 index 0000000..7f20b03 --- /dev/null +++ b/doc/UserModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.UserModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserModelLinksShowUser.md b/doc/UserModelLinksShowUser.md new file mode 100644 index 0000000..816ba0a --- /dev/null +++ b/doc/UserModelLinksShowUser.md @@ -0,0 +1,20 @@ +# openapi.model.UserModelLinksShowUser + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserModelLinksUnlock.md b/doc/UserModelLinksUnlock.md new file mode 100644 index 0000000..8651819 --- /dev/null +++ b/doc/UserModelLinksUnlock.md @@ -0,0 +1,20 @@ +# openapi.model.UserModelLinksUnlock + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserModelLinksUpdateImmediately.md b/doc/UserModelLinksUpdateImmediately.md new file mode 100644 index 0000000..ae91c0f --- /dev/null +++ b/doc/UserModelLinksUpdateImmediately.md @@ -0,0 +1,20 @@ +# openapi.model.UserModelLinksUpdateImmediately + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/UserPreferencesApi.md b/doc/UserPreferencesApi.md new file mode 100644 index 0000000..75f107a --- /dev/null +++ b/doc/UserPreferencesApi.md @@ -0,0 +1,103 @@ +# openapi.api.UserPreferencesApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**showMyPreferences**](UserPreferencesApi.md#showmypreferences) | **GET** /api/v3/my_preferences | Show my preferences +[**updateUserPreferences**](UserPreferencesApi.md#updateuserpreferences) | **PATCH** /api/v3/my_preferences | Update my preferences + + +# **showMyPreferences** +> Object showMyPreferences() + +Show my preferences + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = UserPreferencesApi(); + +try { + final result = api_instance.showMyPreferences(); + print(result); +} catch (e) { + print('Exception when calling UserPreferencesApi->showMyPreferences: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUserPreferences** +> Object updateUserPreferences(updateUserPreferencesRequest) + +Update my preferences + +When calling this endpoint the client provides a single object, containing the properties that it wants to change, in the body. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = UserPreferencesApi(); +final updateUserPreferencesRequest = UpdateUserPreferencesRequest(); // UpdateUserPreferencesRequest | + +try { + final result = api_instance.updateUserPreferences(updateUserPreferencesRequest); + print(result); +} catch (e) { + print('Exception when calling UserPreferencesApi->updateUserPreferences: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateUserPreferencesRequest** | [**UpdateUserPreferencesRequest**](UpdateUserPreferencesRequest.md)| | [optional] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/UsersApi.md b/doc/UsersApi.md new file mode 100644 index 0000000..0544bdc --- /dev/null +++ b/doc/UsersApi.md @@ -0,0 +1,436 @@ +# openapi.api.UsersApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UsersApi.md#createuser) | **POST** /api/v3/users | Create User +[**deleteUser**](UsersApi.md#deleteuser) | **DELETE** /api/v3/users/{id} | Delete user +[**listUsers**](UsersApi.md#listusers) | **GET** /api/v3/users | List Users +[**lockUser**](UsersApi.md#lockuser) | **POST** /api/v3/users/{id}/lock | Lock user +[**unlockUser**](UsersApi.md#unlockuser) | **DELETE** /api/v3/users/{id}/lock | Unlock user +[**updateUser**](UsersApi.md#updateuser) | **PATCH** /api/v3/users/{id} | Update user +[**userUpdateForm**](UsersApi.md#userupdateform) | **POST** /api/v3/users/{id}/form | User update form +[**viewUser**](UsersApi.md#viewuser) | **GET** /api/v3/users/{id} | View user +[**viewUserSchema**](UsersApi.md#viewuserschema) | **GET** /api/v3/users/schema | View user schema + + +# **createUser** +> UserModel createUser(userCreateModel) + +Create User + +Creates a new user. Only administrators and users with manage_user global permission are allowed to do so. When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. Valid values for `status`: 1) \"active\" - In this case a password has to be provided in addition to the other attributes. 2) \"invited\" - In this case nothing but the email address is required. The rest is optional. An invitation will be sent to the user. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = UsersApi(); +final userCreateModel = UserCreateModel(); // UserCreateModel | + +try { + final result = api_instance.createUser(userCreateModel); + print(result); +} catch (e) { + print('Exception when calling UsersApi->createUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userCreateModel** | [**UserCreateModel**](UserCreateModel.md)| | [optional] + +### Return type + +[**UserModel**](UserModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +> deleteUser(id) + +Delete user + +Permanently deletes the specified user account. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = UsersApi(); +final id = 1; // int | User id + +try { + api_instance.deleteUser(id); +} catch (e) { + print('Exception when calling UsersApi->deleteUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| User id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listUsers** +> UserCollectionModel listUsers(offset, pageSize, filters, sortBy, select) + +List Users + +Lists users. Only administrators or users with manage_user global permission have permission to do this. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = UsersApi(); +final offset = 25; // int | Page number inside the requested collection. +final pageSize = 25; // int | Number of elements to display per page. +final filters = [{ "status": { "operator": "=", "values": ["invited"] } }, { "group": { "operator": "=", "values": ["1"] } }, { "name": { "operator": "=", "values": ["h.wurst@openproject.com"] } }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + status: Status the user has + group: Name of the group in which to-be-listed users are members. + name: Filter users in whose first or last names, or email addresses the given string occurs. + login: User's login +final sortBy = [["status", "asc"]]; // String | JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. +final select = total,elements/name,elements/self,self; // String | Comma separated list of properties to include. + +try { + final result = api_instance.listUsers(offset, pageSize, filters, sortBy, select); + print(result); +} catch (e) { + print('Exception when calling UsersApi->listUsers: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **offset** | **int**| Page number inside the requested collection. | [optional] [default to 1] + **pageSize** | **int**| Number of elements to display per page. | [optional] + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + status: Status the user has + group: Name of the group in which to-be-listed users are members. + name: Filter users in whose first or last names, or email addresses the given string occurs. + login: User's login | [optional] + **sortBy** | **String**| JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. | [optional] + **select** | **String**| Comma separated list of properties to include. | [optional] + +### Return type + +[**UserCollectionModel**](UserCollectionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **lockUser** +> UserModel lockUser(id) + +Lock user + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = UsersApi(); +final id = 1; // int | User id + +try { + final result = api_instance.lockUser(id); + print(result); +} catch (e) { + print('Exception when calling UsersApi->lockUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| User id | + +### Return type + +[**UserModel**](UserModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **unlockUser** +> UserModel unlockUser(id) + +Unlock user + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = UsersApi(); +final id = 1; // int | User id + +try { + final result = api_instance.unlockUser(id); + print(result); +} catch (e) { + print('Exception when calling UsersApi->unlockUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| User id | + +### Return type + +[**UserModel**](UserModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +> UserModel updateUser(id, userCreateModel) + +Update user + +Updates the user's writable attributes. When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = UsersApi(); +final id = 1; // int | User id +final userCreateModel = UserCreateModel(); // UserCreateModel | + +try { + final result = api_instance.updateUser(id, userCreateModel); + print(result); +} catch (e) { + print('Exception when calling UsersApi->updateUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| User id | + **userCreateModel** | [**UserCreateModel**](UserCreateModel.md)| | [optional] + +### Return type + +[**UserModel**](UserModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **userUpdateForm** +> userUpdateForm(id) + +User update form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = UsersApi(); +final id = 1; // int | User id + +try { + api_instance.userUpdateForm(id); +} catch (e) { + print('Exception when calling UsersApi->userUpdateForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| User id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewUser** +> UserModel viewUser(id) + +View user + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = UsersApi(); +final id = 1; // String | User id. Use `me` to reference current user, if any. + +try { + final result = api_instance.viewUser(id); + print(result); +} catch (e) { + print('Exception when calling UsersApi->viewUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| User id. Use `me` to reference current user, if any. | + +### Return type + +[**UserModel**](UserModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewUserSchema** +> Object viewUserSchema() + +View user schema + +The schema response use two exemplary custom fields that extend the schema response. Depending on your instance and custom field configuration, the response will look somewhat different. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = UsersApi(); + +try { + final result = api_instance.viewUserSchema(); + print(result); +} catch (e) { + print('Exception when calling UsersApi->viewUserSchema: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/ValuesPropertyApi.md b/doc/ValuesPropertyApi.md new file mode 100644 index 0000000..2da5146 --- /dev/null +++ b/doc/ValuesPropertyApi.md @@ -0,0 +1,109 @@ +# openapi.api.ValuesPropertyApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**viewNotificationDetail**](ValuesPropertyApi.md#viewnotificationdetail) | **GET** /api/v3/notifications/{notification_id}/details/{id} | Get a notification detail +[**viewValuesSchema**](ValuesPropertyApi.md#viewvaluesschema) | **GET** /api/v3/values/schema/{id} | View Values schema + + +# **viewNotificationDetail** +> ValuesPropertyModel viewNotificationDetail(notificationId, id) + +Get a notification detail + +Returns an individual detail of a notification identified by the notification id and the id of the detail. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ValuesPropertyApi(); +final notificationId = 1; // int | notification id +final id = 0; // int | detail id + +try { + final result = api_instance.viewNotificationDetail(notificationId, id); + print(result); +} catch (e) { + print('Exception when calling ValuesPropertyApi->viewNotificationDetail: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **notificationId** | **int**| notification id | + **id** | **int**| detail id | + +### Return type + +[**ValuesPropertyModel**](ValuesPropertyModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewValuesSchema** +> SchemaModel viewValuesSchema(id) + +View Values schema + +The schema of a `Values` resource. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ValuesPropertyApi(); +final id = startDate; // String | The identifier of the value. This is typically the value of the `property` property of the `Values` resource. It should be in lower camelcase format. + +try { + final result = api_instance.viewValuesSchema(id); + print(result); +} catch (e) { + print('Exception when calling ValuesPropertyApi->viewValuesSchema: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The identifier of the value. This is typically the value of the `property` property of the `Values` resource. It should be in lower camelcase format. | + +### Return type + +[**SchemaModel**](SchemaModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/ValuesPropertyModel.md b/doc/ValuesPropertyModel.md new file mode 100644 index 0000000..efe38a1 --- /dev/null +++ b/doc/ValuesPropertyModel.md @@ -0,0 +1,18 @@ +# openapi.model.ValuesPropertyModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**Object**](Object.md) | | +**property** | [**Object**](.md) | The key of the key - value pair represented by the Values::Property | +**value** | [**Object**](.md) | The value of the key - value pair represented by the Values::Property | +**links** | [**ValuesPropertyModelLinks**](ValuesPropertyModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ValuesPropertyModelLinks.md b/doc/ValuesPropertyModelLinks.md new file mode 100644 index 0000000..91017e9 --- /dev/null +++ b/doc/ValuesPropertyModelLinks.md @@ -0,0 +1,16 @@ +# openapi.model.ValuesPropertyModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**ValuesPropertyModelLinksSelf**](ValuesPropertyModelLinksSelf.md) | | +**schema** | [**ValuesPropertyModelLinksSchema**](ValuesPropertyModelLinksSchema.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ValuesPropertyModelLinksSchema.md b/doc/ValuesPropertyModelLinksSchema.md new file mode 100644 index 0000000..b30af3d --- /dev/null +++ b/doc/ValuesPropertyModelLinksSchema.md @@ -0,0 +1,20 @@ +# openapi.model.ValuesPropertyModelLinksSchema + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ValuesPropertyModelLinksSelf.md b/doc/ValuesPropertyModelLinksSelf.md new file mode 100644 index 0000000..19671c3 --- /dev/null +++ b/doc/ValuesPropertyModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.ValuesPropertyModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/VersionModel.md b/doc/VersionModel.md new file mode 100644 index 0000000..e04a11b --- /dev/null +++ b/doc/VersionModel.md @@ -0,0 +1,24 @@ +# openapi.model.VersionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**Object**](.md) | Version id | [optional] [readonly] +**name** | [**Object**](.md) | Version name | +**description** | [**ActivityModelComment**](ActivityModelComment.md) | | [optional] +**startDate** | [**Object**](.md) | | [optional] +**endDate** | [**Object**](.md) | | [optional] +**status** | [**Object**](.md) | The current status of the version | +**sharing** | [**Object**](.md) | The current status of the version | +**createdAt** | [**Object**](.md) | Time of creation | [readonly] +**updatedAt** | [**Object**](.md) | Time of the most recent change to the version | [readonly] +**links** | [**VersionModelLinks**](VersionModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/VersionModelLinks.md b/doc/VersionModelLinks.md new file mode 100644 index 0000000..f6b6eaf --- /dev/null +++ b/doc/VersionModelLinks.md @@ -0,0 +1,19 @@ +# openapi.model.VersionModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**update** | [**VersionModelLinksUpdate**](VersionModelLinksUpdate.md) | | [optional] +**updateImmediately** | [**VersionModelLinksUpdateImmediately**](VersionModelLinksUpdateImmediately.md) | | [optional] +**self** | [**VersionModelLinksSelf**](VersionModelLinksSelf.md) | | +**definingProject** | [**VersionModelLinksDefiningProject**](VersionModelLinksDefiningProject.md) | | [optional] +**availableInProjects** | [**VersionModelLinksAvailableInProjects**](VersionModelLinksAvailableInProjects.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/VersionModelLinksAvailableInProjects.md b/doc/VersionModelLinksAvailableInProjects.md new file mode 100644 index 0000000..c993cac --- /dev/null +++ b/doc/VersionModelLinksAvailableInProjects.md @@ -0,0 +1,20 @@ +# openapi.model.VersionModelLinksAvailableInProjects + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/VersionModelLinksDefiningProject.md b/doc/VersionModelLinksDefiningProject.md new file mode 100644 index 0000000..6970e4d --- /dev/null +++ b/doc/VersionModelLinksDefiningProject.md @@ -0,0 +1,20 @@ +# openapi.model.VersionModelLinksDefiningProject + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/VersionModelLinksSelf.md b/doc/VersionModelLinksSelf.md new file mode 100644 index 0000000..d9994be --- /dev/null +++ b/doc/VersionModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.VersionModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/VersionModelLinksUpdate.md b/doc/VersionModelLinksUpdate.md new file mode 100644 index 0000000..1407cef --- /dev/null +++ b/doc/VersionModelLinksUpdate.md @@ -0,0 +1,20 @@ +# openapi.model.VersionModelLinksUpdate + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/VersionModelLinksUpdateImmediately.md b/doc/VersionModelLinksUpdateImmediately.md new file mode 100644 index 0000000..ee8c008 --- /dev/null +++ b/doc/VersionModelLinksUpdateImmediately.md @@ -0,0 +1,20 @@ +# openapi.model.VersionModelLinksUpdateImmediately + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/VersionsApi.md b/doc/VersionsApi.md new file mode 100644 index 0000000..b43a680 --- /dev/null +++ b/doc/VersionsApi.md @@ -0,0 +1,464 @@ +# openapi.api.VersionsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**availableProjectsForVersions**](VersionsApi.md#availableprojectsforversions) | **GET** /api/v3/versions/available_projects | Available projects for versions +[**createVersion**](VersionsApi.md#createversion) | **POST** /api/v3/versions | Create version +[**deleteVersion**](VersionsApi.md#deleteversion) | **DELETE** /api/v3/versions/{id} | Delete version +[**listVersions**](VersionsApi.md#listversions) | **GET** /api/v3/versions | List versions +[**listVersionsAvailableInAProject**](VersionsApi.md#listversionsavailableinaproject) | **GET** /api/v3/projects/{id}/versions | List versions available in a project +[**updateVersion**](VersionsApi.md#updateversion) | **PATCH** /api/v3/versions/{id} | Update Version +[**versionCreateForm**](VersionsApi.md#versioncreateform) | **POST** /api/v3/versions/form | Version create form +[**versionUpdateForm**](VersionsApi.md#versionupdateform) | **POST** /api/v3/versions/{id}/form | Version update form +[**viewVersion**](VersionsApi.md#viewversion) | **GET** /api/v3/versions/{id} | View version +[**viewVersionSchema**](VersionsApi.md#viewversionschema) | **GET** /api/v3/versions/schema | View version schema + + +# **availableProjectsForVersions** +> Object availableProjectsForVersions() + +Available projects for versions + +Gets a list of projects in which a version can be created in. The list contains all projects in which the user issuing the request has the manage versions permissions. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = VersionsApi(); + +try { + final result = api_instance.availableProjectsForVersions(); + print(result); +} catch (e) { + print('Exception when calling VersionsApi->availableProjectsForVersions: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createVersion** +> VersionModel createVersion() + +Create version + +Creates a new version applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a version's attributes and are accepted by the endpoint. You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = VersionsApi(); + +try { + final result = api_instance.createVersion(); + print(result); +} catch (e) { + print('Exception when calling VersionsApi->createVersion: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**VersionModel**](VersionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteVersion** +> deleteVersion(id) + +Delete version + +Deletes the version. Work packages associated to the version will no longer be assigned to it. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = VersionsApi(); +final id = 1; // int | Version id + +try { + api_instance.deleteVersion(id); +} catch (e) { + print('Exception when calling VersionsApi->deleteVersion: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Version id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listVersions** +> Object listVersions(filters) + +List versions + +Returns a collection of versions. The client can choose to filter the versions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain versions, for which the requesting client has sufficient permissions (*view_work_packages*). + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = VersionsApi(); +final filters = [{ "sharing": { "operator": "*", "values": ["system"] }" }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + sharing: filters versions by how they are shared within the server (*none*, *descendants*, *hierarchy*, *tree*, *system*). + +try { + final result = api_instance.listVersions(filters); + print(result); +} catch (e) { + print('Exception when calling VersionsApi->listVersions: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + sharing: filters versions by how they are shared within the server (*none*, *descendants*, *hierarchy*, *tree*, *system*). | [optional] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listVersionsAvailableInAProject** +> Object listVersionsAvailableInAProject(id) + +List versions available in a project + +This endpoint lists the versions that are *available* in a given project. Note that due to sharing this might be more than the versions *defined* by that project. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = VersionsApi(); +final id = 1; // int | ID of the project whose versions will be listed + +try { + final result = api_instance.listVersionsAvailableInAProject(id); + print(result); +} catch (e) { + print('Exception when calling VersionsApi->listVersionsAvailableInAProject: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| ID of the project whose versions will be listed | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateVersion** +> VersionModel updateVersion(id) + +Update Version + +Updates the given version by applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a version's attributes and are accepted by the endpoint. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = VersionsApi(); +final id = 1; // int | Version id + +try { + final result = api_instance.updateVersion(id); + print(result); +} catch (e) { + print('Exception when calling VersionsApi->updateVersion: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Version id | + +### Return type + +[**VersionModel**](VersionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **versionCreateForm** +> versionCreateForm() + +Version create form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = VersionsApi(); + +try { + api_instance.versionCreateForm(); +} catch (e) { + print('Exception when calling VersionsApi->versionCreateForm: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **versionUpdateForm** +> versionUpdateForm(id) + +Version update form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = VersionsApi(); +final id = 1; // int | Project id + +try { + api_instance.versionUpdateForm(id); +} catch (e) { + print('Exception when calling VersionsApi->versionUpdateForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewVersion** +> VersionModel viewVersion(id) + +View version + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = VersionsApi(); +final id = 1; // int | Version id + +try { + final result = api_instance.viewVersion(id); + print(result); +} catch (e) { + print('Exception when calling VersionsApi->viewVersion: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Version id | + +### Return type + +[**VersionModel**](VersionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewVersionSchema** +> Object viewVersionSchema() + +View version schema + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = VersionsApi(); + +try { + final result = api_instance.viewVersionSchema(); + print(result); +} catch (e) { + print('Exception when calling VersionsApi->viewVersionSchema: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/ViewsApi.md b/doc/ViewsApi.md new file mode 100644 index 0000000..a15e36d --- /dev/null +++ b/doc/ViewsApi.md @@ -0,0 +1,154 @@ +# openapi.api.ViewsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createViews**](ViewsApi.md#createviews) | **POST** /api/v3/views/{id} | Create view +[**listViews**](ViewsApi.md#listviews) | **GET** /api/v3/views | List views +[**viewView**](ViewsApi.md#viewview) | **GET** /api/v3/views/{id} | View view + + +# **createViews** +> Object createViews(id, createViewsRequest) + +Create view + +When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a View can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. There are different subtypes of `Views` (e.g. `Views::WorkPackagesTable`) with each having its own endpoint for creating that subtype e.g. * `/api/v3/views/work_packages_table` for `Views::WorkPackagesTable` * `/api/v3/views/team_planner` for `Views::TeamPlanner` * `/api/v3/views/work_packages_calendar` for `Views::WorkPackagesCalendar` **Not yet implemented** To get the list of available subtypes and by that the endpoints for creating a subtype, use the ``` /api/v3/views/schemas ``` endpoint. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ViewsApi(); +final id = 1; // String | The view identifier +final createViewsRequest = CreateViewsRequest(); // CreateViewsRequest | + +try { + final result = api_instance.createViews(id, createViewsRequest); + print(result); +} catch (e) { + print('Exception when calling ViewsApi->createViews: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The view identifier | + **createViewsRequest** | [**CreateViewsRequest**](CreateViewsRequest.md)| | [optional] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listViews** +> listViews(filters) + +List views + +Returns a collection of Views. The collection can be filtered via query parameters similar to how work packages are filtered. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ViewsApi(); +final filters = [{ "project_id": { "operator": "!*", "values": null }" }]; // String | JSON specifying filter conditions. Currently supported filters are: + project: filters views by the project their associated query is assigned to. If the project filter is passed with the `!*` (not any) operator, global views are returned. + id: filters views based on their id + type: filters views based on their type + +try { + api_instance.listViews(filters); +} catch (e) { + print('Exception when calling ViewsApi->listViews: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Currently supported filters are: + project: filters views by the project their associated query is assigned to. If the project filter is passed with the `!*` (not any) operator, global views are returned. + id: filters views based on their id + type: filters views based on their type | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewView** +> viewView(id) + +View view + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = ViewsApi(); +final id = 42; // int | View id + +try { + api_instance.viewView(id); +} catch (e) { + print('Exception when calling ViewsApi->viewView: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| View id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/WatchersModel.md b/doc/WatchersModel.md new file mode 100644 index 0000000..db0f451 --- /dev/null +++ b/doc/WatchersModel.md @@ -0,0 +1,19 @@ +# openapi.model.WatchersModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**WatchersModelAllOfLinks**](WatchersModelAllOfLinks.md) | | +**embedded** | [**WatchersModelAllOfEmbedded**](WatchersModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WatchersModelAllOfEmbedded.md b/doc/WatchersModelAllOfEmbedded.md new file mode 100644 index 0000000..4c7a5fd --- /dev/null +++ b/doc/WatchersModelAllOfEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.WatchersModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**Object**](.md) | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WatchersModelAllOfLinks.md b/doc/WatchersModelAllOfLinks.md new file mode 100644 index 0000000..d668708 --- /dev/null +++ b/doc/WatchersModelAllOfLinks.md @@ -0,0 +1,15 @@ +# openapi.model.WatchersModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**WatchersModelAllOfLinksSelf**](WatchersModelAllOfLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WatchersModelAllOfLinksSelf.md b/doc/WatchersModelAllOfLinksSelf.md new file mode 100644 index 0000000..e0b021b --- /dev/null +++ b/doc/WatchersModelAllOfLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.WatchersModelAllOfLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WeekDayCollectionModel.md b/doc/WeekDayCollectionModel.md new file mode 100644 index 0000000..8cea16a --- /dev/null +++ b/doc/WeekDayCollectionModel.md @@ -0,0 +1,19 @@ +# openapi.model.WeekDayCollectionModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**WeekDayCollectionModelAllOfLinks**](WeekDayCollectionModelAllOfLinks.md) | | +**embedded** | [**WeekDayCollectionModelAllOfEmbedded**](WeekDayCollectionModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WeekDayCollectionModelAllOfEmbedded.md b/doc/WeekDayCollectionModelAllOfEmbedded.md new file mode 100644 index 0000000..c8bf700 --- /dev/null +++ b/doc/WeekDayCollectionModelAllOfEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.WeekDayCollectionModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**Object**](.md) | The array of week days. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WeekDayCollectionModelAllOfLinks.md b/doc/WeekDayCollectionModelAllOfLinks.md new file mode 100644 index 0000000..47a6791 --- /dev/null +++ b/doc/WeekDayCollectionModelAllOfLinks.md @@ -0,0 +1,15 @@ +# openapi.model.WeekDayCollectionModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**WeekDayCollectionModelAllOfLinksSelf**](WeekDayCollectionModelAllOfLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WeekDayCollectionModelAllOfLinksSelf.md b/doc/WeekDayCollectionModelAllOfLinksSelf.md new file mode 100644 index 0000000..ad2ec45 --- /dev/null +++ b/doc/WeekDayCollectionModelAllOfLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.WeekDayCollectionModelAllOfLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WeekDayCollectionWriteModel.md b/doc/WeekDayCollectionWriteModel.md new file mode 100644 index 0000000..121c7fe --- /dev/null +++ b/doc/WeekDayCollectionWriteModel.md @@ -0,0 +1,16 @@ +# openapi.model.WeekDayCollectionWriteModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**Object**](Object.md) | | +**embedded** | [**WeekDayCollectionWriteModelEmbedded**](WeekDayCollectionWriteModelEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WeekDayCollectionWriteModelEmbedded.md b/doc/WeekDayCollectionWriteModelEmbedded.md new file mode 100644 index 0000000..737576d --- /dev/null +++ b/doc/WeekDayCollectionWriteModelEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.WeekDayCollectionWriteModelEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**Object**](.md) | The array of week days. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WeekDayModel.md b/doc/WeekDayModel.md new file mode 100644 index 0000000..a2a7078 --- /dev/null +++ b/doc/WeekDayModel.md @@ -0,0 +1,19 @@ +# openapi.model.WeekDayModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**Object**](Object.md) | | +**day** | [**Object**](.md) | The week day from 1 to 7. 1 is Monday. 7 is Sunday. | [readonly] +**name** | [**Object**](.md) | The week day name. | +**working** | [**Object**](.md) | `true` for a working week day, `false` otherwise. | +**links** | [**WeekDaySelfLinkModel**](WeekDaySelfLinkModel.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WeekDaySelfLinkModel.md b/doc/WeekDaySelfLinkModel.md new file mode 100644 index 0000000..5e0df5c --- /dev/null +++ b/doc/WeekDaySelfLinkModel.md @@ -0,0 +1,15 @@ +# openapi.model.WeekDaySelfLinkModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**WeekDaySelfLinkModelSelf**](WeekDaySelfLinkModelSelf.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WeekDaySelfLinkModelSelf.md b/doc/WeekDaySelfLinkModelSelf.md new file mode 100644 index 0000000..1e0954c --- /dev/null +++ b/doc/WeekDaySelfLinkModelSelf.md @@ -0,0 +1,20 @@ +# openapi.model.WeekDaySelfLinkModelSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WeekDayWriteModel.md b/doc/WeekDayWriteModel.md new file mode 100644 index 0000000..782e76c --- /dev/null +++ b/doc/WeekDayWriteModel.md @@ -0,0 +1,16 @@ +# openapi.model.WeekDayWriteModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**Object**](Object.md) | | +**working** | [**Object**](.md) | `true` for a working day. `false` for a weekend day. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WikiPageModel.md b/doc/WikiPageModel.md new file mode 100644 index 0000000..b2862a7 --- /dev/null +++ b/doc/WikiPageModel.md @@ -0,0 +1,17 @@ +# openapi.model.WikiPageModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**Object**](.md) | Identifier of this wiki page | [optional] [readonly] +**title** | [**Object**](.md) | The wiki page's title | +**links** | [**WikiPageModelLinks**](WikiPageModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WikiPageModelLinks.md b/doc/WikiPageModelLinks.md new file mode 100644 index 0000000..204a47b --- /dev/null +++ b/doc/WikiPageModelLinks.md @@ -0,0 +1,15 @@ +# openapi.model.WikiPageModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**addAttachment** | [**WikiPageModelLinksAddAttachment**](WikiPageModelLinksAddAttachment.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WikiPageModelLinksAddAttachment.md b/doc/WikiPageModelLinksAddAttachment.md new file mode 100644 index 0000000..8be0a80 --- /dev/null +++ b/doc/WikiPageModelLinksAddAttachment.md @@ -0,0 +1,20 @@ +# openapi.model.WikiPageModelLinksAddAttachment + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WikiPagesApi.md b/doc/WikiPagesApi.md new file mode 100644 index 0000000..63c8e13 --- /dev/null +++ b/doc/WikiPagesApi.md @@ -0,0 +1,60 @@ +# openapi.api.WikiPagesApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**viewWikiPage**](WikiPagesApi.md#viewwikipage) | **GET** /api/v3/wiki_pages/{id} | View Wiki Page + + +# **viewWikiPage** +> WikiPageModel viewWikiPage(id) + +View Wiki Page + +Retrieve an individual wiki page as identified by the id parameter + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WikiPagesApi(); +final id = 1; // int | Wiki page identifier + +try { + final result = api_instance.viewWikiPage(id); + print(result); +} catch (e) { + print('Exception when calling WikiPagesApi->viewWikiPage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Wiki page identifier | + +### Return type + +[**WikiPageModel**](WikiPageModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/WorkPackageModel.md b/doc/WorkPackageModel.md new file mode 100644 index 0000000..e9b7962 --- /dev/null +++ b/doc/WorkPackageModel.md @@ -0,0 +1,35 @@ +# openapi.model.WorkPackageModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**Object**](.md) | Work package id | [optional] [readonly] +**lockVersion** | [**Object**](.md) | The version of the item as used for optimistic locking | [optional] [readonly] +**subject** | [**Object**](.md) | Work package subject | +**type** | [**Object**](Object.md) | | [optional] [readonly] +**description** | [**WorkPackageModelDescription**](WorkPackageModelDescription.md) | | [optional] +**scheduleManually** | [**Object**](.md) | If false (default) schedule automatically. | [optional] +**readonly** | [**Object**](.md) | If true, the work package is in a readonly status so with the exception of the status, no other property can be altered. | [optional] +**startDate** | [**Object**](.md) | Scheduled beginning of a work package | [optional] +**dueDate** | [**Object**](.md) | Scheduled end of a work package | [optional] +**date** | [**Object**](.md) | Date on which a milestone is achieved | [optional] +**derivedStartDate** | [**Object**](.md) | Similar to start date but is not set by a client but rather deduced by the work packages' descendants. If manual scheduleManually is active, the two dates can deviate. | [optional] [readonly] +**derivedDueDate** | [**Object**](.md) | Similar to due date but is not set by a client but rather deduced by the work packages' descendants. If manual scheduleManually is active, the two dates can deviate. | [optional] [readonly] +**duration** | [**Object**](.md) | **(NOT IMPLEMENTED)** The amount of time in hours the work package needs to be completed. Not available for milestone type of work packages. | [optional] [readonly] +**estimatedTime** | [**Object**](.md) | Time a work package likely needs to be completed excluding its descendants | [optional] +**derivedEstimatedTime** | [**Object**](.md) | Time a work package likely needs to be completed including its descendants | [optional] [readonly] +**ignoreNonWorkingDays** | [**Object**](.md) | **(NOT IMPLEMENTED)** When scheduling, whether or not to ignore the non working days being defined. A work package with the flag set to true will be allowed to be scheduled to a non working day. | [optional] [readonly] +**spentTime** | [**Object**](.md) | The time booked for this work package by users working on it # Conditions **Permission** view time entries | [optional] [readonly] +**percentageDone** | [**Object**](.md) | Amount of total completion for a work package | [optional] +**createdAt** | [**Object**](.md) | Time of creation | [optional] [readonly] +**updatedAt** | [**Object**](.md) | Time of the most recent change to the work package | [optional] [readonly] +**links** | [**WorkPackageModelLinks**](WorkPackageModelLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelDescription.md b/doc/WorkPackageModelDescription.md new file mode 100644 index 0000000..d8ba1ec --- /dev/null +++ b/doc/WorkPackageModelDescription.md @@ -0,0 +1,17 @@ +# openapi.model.WorkPackageModelDescription + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**format** | **String** | Indicates the formatting language of the raw text | [readonly] +**raw** | **String** | The raw text, as entered by the user | [optional] +**html** | **String** | The text converted to HTML according to the format | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinks.md b/doc/WorkPackageModelLinks.md new file mode 100644 index 0000000..ebd48e4 --- /dev/null +++ b/doc/WorkPackageModelLinks.md @@ -0,0 +1,48 @@ +# openapi.model.WorkPackageModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**addAttachment** | [**WorkPackageModelLinksAddAttachment**](WorkPackageModelLinksAddAttachment.md) | | [optional] +**addComment** | [**WorkPackageModelLinksAddComment**](WorkPackageModelLinksAddComment.md) | | [optional] +**addRelation** | [**WorkPackageModelLinksAddRelation**](WorkPackageModelLinksAddRelation.md) | | [optional] +**addWatcher** | [**WorkPackageModelLinksAddWatcher**](WorkPackageModelLinksAddWatcher.md) | | [optional] +**customActions** | [**Object**](.md) | | [optional] [readonly] +**previewMarkup** | [**WorkPackageModelLinksPreviewMarkup**](WorkPackageModelLinksPreviewMarkup.md) | | [optional] +**removeWatcher** | [**WorkPackageModelLinksRemoveWatcher**](WorkPackageModelLinksRemoveWatcher.md) | | [optional] +**unwatch** | [**WorkPackageModelLinksUnwatch**](WorkPackageModelLinksUnwatch.md) | | [optional] +**update** | [**WorkPackageModelLinksUpdate**](WorkPackageModelLinksUpdate.md) | | [optional] +**updateImmediately** | [**WorkPackageModelLinksUpdateImmediately**](WorkPackageModelLinksUpdateImmediately.md) | | [optional] +**watch** | [**WorkPackageModelLinksWatch**](WorkPackageModelLinksWatch.md) | | [optional] +**self** | [**WorkPackageModelLinksSelf**](WorkPackageModelLinksSelf.md) | | +**schema** | [**WorkPackageModelLinksSchema**](WorkPackageModelLinksSchema.md) | | +**ancestors** | [**Object**](.md) | | [readonly] +**attachments** | [**WorkPackageModelLinksAttachments**](WorkPackageModelLinksAttachments.md) | | +**author** | [**WorkPackageModelLinksAuthor**](WorkPackageModelLinksAuthor.md) | | +**assignee** | [**WorkPackageModelLinksAssignee**](WorkPackageModelLinksAssignee.md) | | [optional] +**availableWatchers** | [**WorkPackageModelLinksAvailableWatchers**](WorkPackageModelLinksAvailableWatchers.md) | | [optional] +**budget** | [**WorkPackageModelLinksBudget**](WorkPackageModelLinksBudget.md) | | [optional] +**category** | [**WorkPackageModelLinksCategory**](WorkPackageModelLinksCategory.md) | | [optional] +**children** | [**Object**](.md) | | [readonly] +**addFileLink** | [**WorkPackageModelLinksAddFileLink**](WorkPackageModelLinksAddFileLink.md) | | [optional] +**fileLinks** | [**WorkPackageModelLinksFileLinks**](WorkPackageModelLinksFileLinks.md) | | [optional] +**parent** | [**WorkPackageModelLinksParent**](WorkPackageModelLinksParent.md) | | [optional] +**priority** | [**WorkPackageModelLinksPriority**](WorkPackageModelLinksPriority.md) | | +**project** | [**WorkPackageModelLinksProject**](WorkPackageModelLinksProject.md) | | +**responsible** | [**WorkPackageModelLinksResponsible**](WorkPackageModelLinksResponsible.md) | | [optional] +**relations** | [**WorkPackageModelLinksRelations**](WorkPackageModelLinksRelations.md) | | [optional] +**revisions** | [**WorkPackageModelLinksRevisions**](WorkPackageModelLinksRevisions.md) | | [optional] +**status** | [**WorkPackageModelLinksStatus**](WorkPackageModelLinksStatus.md) | | +**timeEntries** | [**WorkPackageModelLinksTimeEntries**](WorkPackageModelLinksTimeEntries.md) | | [optional] +**type** | [**WorkPackageModelLinksType**](WorkPackageModelLinksType.md) | | +**version** | [**WorkPackageModelLinksVersion**](WorkPackageModelLinksVersion.md) | | [optional] +**watchers** | [**WorkPackageModelLinksWatchers**](WorkPackageModelLinksWatchers.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksAddAttachment.md b/doc/WorkPackageModelLinksAddAttachment.md new file mode 100644 index 0000000..f9abbd4 --- /dev/null +++ b/doc/WorkPackageModelLinksAddAttachment.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksAddAttachment + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksAddComment.md b/doc/WorkPackageModelLinksAddComment.md new file mode 100644 index 0000000..07886af --- /dev/null +++ b/doc/WorkPackageModelLinksAddComment.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksAddComment + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksAddFileLink.md b/doc/WorkPackageModelLinksAddFileLink.md new file mode 100644 index 0000000..79ef8c7 --- /dev/null +++ b/doc/WorkPackageModelLinksAddFileLink.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksAddFileLink + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksAddRelation.md b/doc/WorkPackageModelLinksAddRelation.md new file mode 100644 index 0000000..e82ca70 --- /dev/null +++ b/doc/WorkPackageModelLinksAddRelation.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksAddRelation + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksAddWatcher.md b/doc/WorkPackageModelLinksAddWatcher.md new file mode 100644 index 0000000..a59e016 --- /dev/null +++ b/doc/WorkPackageModelLinksAddWatcher.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksAddWatcher + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksAssignee.md b/doc/WorkPackageModelLinksAssignee.md new file mode 100644 index 0000000..0cf0462 --- /dev/null +++ b/doc/WorkPackageModelLinksAssignee.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksAssignee + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksAttachments.md b/doc/WorkPackageModelLinksAttachments.md new file mode 100644 index 0000000..1e72607 --- /dev/null +++ b/doc/WorkPackageModelLinksAttachments.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksAttachments + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksAuthor.md b/doc/WorkPackageModelLinksAuthor.md new file mode 100644 index 0000000..0024a48 --- /dev/null +++ b/doc/WorkPackageModelLinksAuthor.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksAuthor + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksAvailableWatchers.md b/doc/WorkPackageModelLinksAvailableWatchers.md new file mode 100644 index 0000000..13566a3 --- /dev/null +++ b/doc/WorkPackageModelLinksAvailableWatchers.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksAvailableWatchers + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksBudget.md b/doc/WorkPackageModelLinksBudget.md new file mode 100644 index 0000000..081be9b --- /dev/null +++ b/doc/WorkPackageModelLinksBudget.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksBudget + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksCategory.md b/doc/WorkPackageModelLinksCategory.md new file mode 100644 index 0000000..000bdda --- /dev/null +++ b/doc/WorkPackageModelLinksCategory.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksCategory + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksFileLinks.md b/doc/WorkPackageModelLinksFileLinks.md new file mode 100644 index 0000000..57faf91 --- /dev/null +++ b/doc/WorkPackageModelLinksFileLinks.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksFileLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksParent.md b/doc/WorkPackageModelLinksParent.md new file mode 100644 index 0000000..4e0f52f --- /dev/null +++ b/doc/WorkPackageModelLinksParent.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksParent + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksPreviewMarkup.md b/doc/WorkPackageModelLinksPreviewMarkup.md new file mode 100644 index 0000000..a964fb7 --- /dev/null +++ b/doc/WorkPackageModelLinksPreviewMarkup.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksPreviewMarkup + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksPriority.md b/doc/WorkPackageModelLinksPriority.md new file mode 100644 index 0000000..e6600f1 --- /dev/null +++ b/doc/WorkPackageModelLinksPriority.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksPriority + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksProject.md b/doc/WorkPackageModelLinksProject.md new file mode 100644 index 0000000..4825be5 --- /dev/null +++ b/doc/WorkPackageModelLinksProject.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksProject + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksRelations.md b/doc/WorkPackageModelLinksRelations.md new file mode 100644 index 0000000..95154c0 --- /dev/null +++ b/doc/WorkPackageModelLinksRelations.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksRelations + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksRemoveWatcher.md b/doc/WorkPackageModelLinksRemoveWatcher.md new file mode 100644 index 0000000..3ed456e --- /dev/null +++ b/doc/WorkPackageModelLinksRemoveWatcher.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksRemoveWatcher + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksResponsible.md b/doc/WorkPackageModelLinksResponsible.md new file mode 100644 index 0000000..df6a748 --- /dev/null +++ b/doc/WorkPackageModelLinksResponsible.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksResponsible + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksRevisions.md b/doc/WorkPackageModelLinksRevisions.md new file mode 100644 index 0000000..1a77464 --- /dev/null +++ b/doc/WorkPackageModelLinksRevisions.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksRevisions + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksSchema.md b/doc/WorkPackageModelLinksSchema.md new file mode 100644 index 0000000..dc2bbd4 --- /dev/null +++ b/doc/WorkPackageModelLinksSchema.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksSchema + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksSelf.md b/doc/WorkPackageModelLinksSelf.md new file mode 100644 index 0000000..4ec394d --- /dev/null +++ b/doc/WorkPackageModelLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksStatus.md b/doc/WorkPackageModelLinksStatus.md new file mode 100644 index 0000000..db9791b --- /dev/null +++ b/doc/WorkPackageModelLinksStatus.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksStatus + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksTimeEntries.md b/doc/WorkPackageModelLinksTimeEntries.md new file mode 100644 index 0000000..3daeb88 --- /dev/null +++ b/doc/WorkPackageModelLinksTimeEntries.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksTimeEntries + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksType.md b/doc/WorkPackageModelLinksType.md new file mode 100644 index 0000000..ffed135 --- /dev/null +++ b/doc/WorkPackageModelLinksType.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksType + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksUnwatch.md b/doc/WorkPackageModelLinksUnwatch.md new file mode 100644 index 0000000..7ff7171 --- /dev/null +++ b/doc/WorkPackageModelLinksUnwatch.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksUnwatch + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksUpdate.md b/doc/WorkPackageModelLinksUpdate.md new file mode 100644 index 0000000..46eb5e6 --- /dev/null +++ b/doc/WorkPackageModelLinksUpdate.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksUpdate + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksUpdateImmediately.md b/doc/WorkPackageModelLinksUpdateImmediately.md new file mode 100644 index 0000000..8e632cc --- /dev/null +++ b/doc/WorkPackageModelLinksUpdateImmediately.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksUpdateImmediately + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksVersion.md b/doc/WorkPackageModelLinksVersion.md new file mode 100644 index 0000000..c2975a4 --- /dev/null +++ b/doc/WorkPackageModelLinksVersion.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksVersion + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksWatch.md b/doc/WorkPackageModelLinksWatch.md new file mode 100644 index 0000000..7f4b9d9 --- /dev/null +++ b/doc/WorkPackageModelLinksWatch.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksWatch + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackageModelLinksWatchers.md b/doc/WorkPackageModelLinksWatchers.md new file mode 100644 index 0000000..803d960 --- /dev/null +++ b/doc/WorkPackageModelLinksWatchers.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackageModelLinksWatchers + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackagePatchModel.md b/doc/WorkPackagePatchModel.md new file mode 100644 index 0000000..b34c9ea --- /dev/null +++ b/doc/WorkPackagePatchModel.md @@ -0,0 +1,28 @@ +# openapi.model.WorkPackagePatchModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lockVersion** | [**Object**](.md) | The version of the item as used for optimistic locking | +**subject** | [**Object**](.md) | Work package subject | [optional] +**description** | [**WorkPackageModelDescription**](WorkPackageModelDescription.md) | | [optional] +**scheduleManually** | [**Object**](.md) | If false (default) schedule automatically. | [optional] +**startDate** | [**Object**](.md) | Scheduled beginning of a work package | [optional] +**dueDate** | [**Object**](.md) | Scheduled end of a work package | [optional] +**date** | [**Object**](.md) | Date on which a milestone is achieved | [optional] +**estimatedTime** | [**Object**](.md) | Time a work package likely needs to be completed excluding its descendants | [optional] +**ignoreNonWorkingDays** | [**Object**](.md) | **(NOT IMPLEMENTED)** When scheduling, whether or not to ignore the non working days being defined. A work package with the flag set to true will be allowed to be scheduled to a non working day. | [optional] [readonly] +**spentTime** | [**Object**](.md) | The time booked for this work package by users working on it # Conditions **Permission** view time entries | [optional] [readonly] +**percentageDone** | [**Object**](.md) | Amount of total completion for a work package | [optional] +**createdAt** | [**Object**](.md) | Time of creation | [optional] [readonly] +**updatedAt** | [**Object**](.md) | Time of the most recent change to the work package | [optional] [readonly] +**links** | [**WorkPackagePatchModelLinks**](WorkPackagePatchModelLinks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackagePatchModelLinks.md b/doc/WorkPackagePatchModelLinks.md new file mode 100644 index 0000000..5dc8836 --- /dev/null +++ b/doc/WorkPackagePatchModelLinks.md @@ -0,0 +1,24 @@ +# openapi.model.WorkPackagePatchModelLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignee** | [**WorkPackageModelLinksAssignee**](WorkPackageModelLinksAssignee.md) | | [optional] +**budget** | [**WorkPackageModelLinksBudget**](WorkPackageModelLinksBudget.md) | | [optional] +**category** | [**WorkPackageModelLinksCategory**](WorkPackageModelLinksCategory.md) | | [optional] +**parent** | [**WorkPackageModelLinksParent**](WorkPackageModelLinksParent.md) | | [optional] +**priority** | [**WorkPackageModelLinksPriority**](WorkPackageModelLinksPriority.md) | | [optional] +**project** | [**WorkPackageModelLinksProject**](WorkPackageModelLinksProject.md) | | [optional] +**responsible** | [**WorkPackageModelLinksResponsible**](WorkPackageModelLinksResponsible.md) | | [optional] +**status** | [**WorkPackageModelLinksStatus**](WorkPackageModelLinksStatus.md) | | [optional] +**type** | [**WorkPackageModelLinksType**](WorkPackageModelLinksType.md) | | [optional] +**version** | [**WorkPackageModelLinksVersion**](WorkPackageModelLinksVersion.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackagesApi.md b/doc/WorkPackagesApi.md new file mode 100644 index 0000000..a56eeb8 --- /dev/null +++ b/doc/WorkPackagesApi.md @@ -0,0 +1,1330 @@ +# openapi.api.WorkPackagesApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addWatcher**](WorkPackagesApi.md#addwatcher) | **POST** /api/v3/work_packages/{id}/watchers | Add watcher +[**availableAssignees**](WorkPackagesApi.md#availableassignees) | **GET** /api/v3/projects/{id}/available_assignees | Available assignees +[**availableProjectsForWorkPackage**](WorkPackagesApi.md#availableprojectsforworkpackage) | **GET** /api/v3/work_packages/{id}/available_projects | Available projects for work package +[**availableResponsibles**](WorkPackagesApi.md#availableresponsibles) | **GET** /api/v3/projects/{id}/available_responsibles | Available responsibles +[**availableWatchers**](WorkPackagesApi.md#availablewatchers) | **GET** /api/v3/work_packages/{id}/available_watchers | Available watchers +[**commentWorkPackage**](WorkPackagesApi.md#commentworkpackage) | **POST** /api/v3/work_packages/{id}/activities | Comment work package +[**createProjectWorkPackage**](WorkPackagesApi.md#createprojectworkpackage) | **POST** /api/v3/projects/{id}/work_packages | Create work package in project +[**createRelation**](WorkPackagesApi.md#createrelation) | **POST** /api/v3/work_packages/{id}/relations | Create Relation +[**createWorkPackage**](WorkPackagesApi.md#createworkpackage) | **POST** /api/v3/work_packages | Create Work Package +[**createWorkPackageFileLink**](WorkPackagesApi.md#createworkpackagefilelink) | **POST** /api/v3/work_packages/{id}/file_links | Creates file links. +[**deleteWorkPackage**](WorkPackagesApi.md#deleteworkpackage) | **DELETE** /api/v3/work_packages/{id} | Delete Work Package +[**getProjectWorkPackageCollection**](WorkPackagesApi.md#getprojectworkpackagecollection) | **GET** /api/v3/projects/{id}/work_packages | Get work packages of project +[**listAvailableRelationCandidates**](WorkPackagesApi.md#listavailablerelationcandidates) | **GET** /api/v3/work_packages/{id}/available_relation_candidates | Available relation candidates +[**listRelations**](WorkPackagesApi.md#listrelations) | **GET** /api/v3/work_packages/{id}/relations | List relations +[**listWatchers**](WorkPackagesApi.md#listwatchers) | **GET** /api/v3/work_packages/{id}/watchers | List watchers +[**listWorkPackageActivities**](WorkPackagesApi.md#listworkpackageactivities) | **GET** /api/v3/work_packages/{id}/activities | List work package activities +[**listWorkPackageFileLinks**](WorkPackagesApi.md#listworkpackagefilelinks) | **GET** /api/v3/work_packages/{id}/file_links | Gets all file links of a work package +[**listWorkPackageSchemas**](WorkPackagesApi.md#listworkpackageschemas) | **GET** /api/v3/work_packages/schemas | List Work Package Schemas +[**listWorkPackages**](WorkPackagesApi.md#listworkpackages) | **GET** /api/v3/work_packages | List work packages +[**removeWatcher**](WorkPackagesApi.md#removewatcher) | **DELETE** /api/v3/work_packages/{id}/watchers/{user_id} | Remove watcher +[**revisions**](WorkPackagesApi.md#revisions) | **GET** /api/v3/work_packages/{id}/revisions | Revisions +[**updateWorkPackage**](WorkPackagesApi.md#updateworkpackage) | **PATCH** /api/v3/work_packages/{id} | Update a Work Package +[**viewWorkPackage**](WorkPackagesApi.md#viewworkpackage) | **GET** /api/v3/work_packages/{id} | View Work Package +[**viewWorkPackageSchema**](WorkPackagesApi.md#viewworkpackageschema) | **GET** /api/v3/work_packages/schemas/{identifier} | View Work Package Schema +[**workPackageCreateForm**](WorkPackagesApi.md#workpackagecreateform) | **POST** /api/v3/work_packages/form | Work Package Create Form +[**workPackageCreateFormForProject**](WorkPackagesApi.md#workpackagecreateformforproject) | **POST** /api/v3/projects/{id}/work_packages/form | Work Package Create Form For Project +[**workPackageEditForm**](WorkPackagesApi.md#workpackageeditform) | **POST** /api/v3/work_packages/{id}/form | Work Package Edit Form + + +# **addWatcher** +> addWatcher(id, addWatcherRequest) + +Add watcher + +Adds a watcher to the specified work package. The request is expected to contain a single JSON object, that contains a link object under the `user` key. The response will be user added as watcher. In case the user was already watching the work package an `HTTP 200` is returned, an `HTTP 201` if the user was added as a new watcher. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Work package id +final addWatcherRequest = AddWatcherRequest(); // AddWatcherRequest | + +try { + api_instance.addWatcher(id, addWatcherRequest); +} catch (e) { + print('Exception when calling WorkPackagesApi->addWatcher: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + **addWatcherRequest** | [**AddWatcherRequest**](AddWatcherRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **availableAssignees** +> Object availableAssignees(id) + +Available assignees + +Gets a list of users that can be assigned to work packages in the given project. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Project id + +try { + final result = api_instance.availableAssignees(id); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->availableAssignees: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **availableProjectsForWorkPackage** +> Object availableProjectsForWorkPackage(id) + +Available projects for work package + +Gets a list of projects that are available as projects to which the work package can be moved. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | work package id + +try { + final result = api_instance.availableProjectsForWorkPackage(id); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->availableProjectsForWorkPackage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| work package id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **availableResponsibles** +> Object availableResponsibles(id) + +Available responsibles + +Gets a list of users that can be assigned as the responsible of a work package in the given project. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Project id + +try { + final result = api_instance.availableResponsibles(id); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->availableResponsibles: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **availableWatchers** +> Object availableWatchers(id) + +Available watchers + +Gets a list of users that are able to be watchers of the specified work package. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | work package id + +try { + final result = api_instance.availableWatchers(id); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->availableWatchers: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| work package id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **commentWorkPackage** +> commentWorkPackage(id, notify, commentWorkPackageRequest) + +Comment work package + +Creates an activity for the selected work package and, on success, returns the updated activity. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Work package id +final notify = false; // bool | Indicates whether change notifications (e.g. via E-Mail) should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. +final commentWorkPackageRequest = CommentWorkPackageRequest(); // CommentWorkPackageRequest | + +try { + api_instance.commentWorkPackage(id, notify, commentWorkPackageRequest); +} catch (e) { + print('Exception when calling WorkPackagesApi->commentWorkPackage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + **notify** | **bool**| Indicates whether change notifications (e.g. via E-Mail) should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. | [optional] [default to true] + **commentWorkPackageRequest** | [**CommentWorkPackageRequest**](CommentWorkPackageRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createProjectWorkPackage** +> WorkPackageModel createProjectWorkPackage(id, notify) + +Create work package in project + +When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a WorkPackage can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Project id +final notify = false; // bool | Indicates whether change notifications (e.g. via E-Mail) should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. + +try { + final result = api_instance.createProjectWorkPackage(id, notify); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->createProjectWorkPackage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + **notify** | **bool**| Indicates whether change notifications (e.g. via E-Mail) should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. | [optional] [default to true] + +### Return type + +[**WorkPackageModel**](WorkPackageModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createRelation** +> createRelation(id) + +Create Relation + +When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a Relation can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Work package id + +try { + api_instance.createRelation(id); +} catch (e) { + print('Exception when calling WorkPackagesApi->createRelation: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createWorkPackage** +> WorkPackageModel createWorkPackage(notify, workPackageModel) + +Create Work Package + +When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a WorkPackage can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. A project link must be set when creating work packages through this route. When setting start date, finish date, and duration together, their correctness will be checked and a 422 error will be returned if one value does not match with the two others. You can make the server compute a value: set only two values in the request and the third one will be computed and returned in the response. For instance, when sending `{ \"startDate\": \"2022-08-23\", duration: \"P2D\" }`, the response will include `{ \"dueDate\": \"2022-08-24\" }`. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final notify = false; // bool | Indicates whether change notifications (e.g. via E-Mail) should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. +final workPackageModel = WorkPackageModel(); // WorkPackageModel | + +try { + final result = api_instance.createWorkPackage(notify, workPackageModel); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->createWorkPackage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **notify** | **bool**| Indicates whether change notifications (e.g. via E-Mail) should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. | [optional] [default to true] + **workPackageModel** | [**WorkPackageModel**](WorkPackageModel.md)| | [optional] + +### Return type + +[**WorkPackageModel**](WorkPackageModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createWorkPackageFileLink** +> FileLinkCollectionReadModel createWorkPackageFileLink(id, fileLinkCollectionWriteModel) + +Creates file links. + +Creates file links on a work package. The request is interpreted as a bulk insert, where every element of the collection is validated separately. Each element contains the origin meta data and a link to the storage, the file link is about to point to. The storage link can be provided as a resource link with id or as the host url. The file's id and name are considered mandatory information. The rest of the origin meta data SHOULD be provided by the client. The _mimeType_ SHOULD be a standard mime type. An empty mime type will be handled as unknown. To link a folder, the custom mime type `application/x-op-directory` MUST be used. Up to 20 file links can be submitted at once. If any element data is invalid, no file links will be created. If a file link with matching origin id, work package, and storage already exists, then it will not create an additional file link or update the meta data. Instead the information from the existing file link will be returned. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1337; // int | Work package id +final fileLinkCollectionWriteModel = FileLinkCollectionWriteModel(); // FileLinkCollectionWriteModel | + +try { + final result = api_instance.createWorkPackageFileLink(id, fileLinkCollectionWriteModel); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->createWorkPackageFileLink: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + **fileLinkCollectionWriteModel** | [**FileLinkCollectionWriteModel**](FileLinkCollectionWriteModel.md)| | [optional] + +### Return type + +[**FileLinkCollectionReadModel**](FileLinkCollectionReadModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteWorkPackage** +> deleteWorkPackage(id) + +Delete Work Package + +Deletes the work package, as well as: - all associated time entries - its hierarchy of child work packages + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Work package id + +try { + api_instance.deleteWorkPackage(id); +} catch (e) { + print('Exception when calling WorkPackagesApi->deleteWorkPackage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getProjectWorkPackageCollection** +> WorkPackagesModel getProjectWorkPackageCollection(id, offset, pageSize, filters, sortBy, groupBy, showSums, select) + +Get work packages of project + +Returns the collection of work packages that are related to the given project. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Project id +final offset = 25; // int | Page number inside the requested collection. +final pageSize = 25; // int | Number of elements to display per page. +final filters = [{ "type_id": { "operator": "=", "values": ['1', '2'] }}]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. If no filter is to be applied, the client should send an empty array (`[]`). +final sortBy = [["status", "asc"]]; // String | JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. +final groupBy = status; // String | The column to group by. +final showSums = true; // bool | Indicates whether properties should be summed up if they support it. +final select = total,elements/subject,elements/id,self; // String | Comma separated list of properties to include. + +try { + final result = api_instance.getProjectWorkPackageCollection(id, offset, pageSize, filters, sortBy, groupBy, showSums, select); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->getProjectWorkPackageCollection: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + **offset** | **int**| Page number inside the requested collection. | [optional] [default to 1] + **pageSize** | **int**| Number of elements to display per page. | [optional] + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. If no filter is to be applied, the client should send an empty array (`[]`). | [optional] [default to '[{ "status_id": { "operator": "o", "values": null }}]'] + **sortBy** | **String**| JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. | [optional] [default to '[["id", "asc"]]'] + **groupBy** | **String**| The column to group by. | [optional] + **showSums** | **bool**| Indicates whether properties should be summed up if they support it. | [optional] [default to false] + **select** | **String**| Comma separated list of properties to include. | [optional] + +### Return type + +[**WorkPackagesModel**](WorkPackagesModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listAvailableRelationCandidates** +> Object listAvailableRelationCandidates(id, pageSize, filters, query, type, sortBy) + +Available relation candidates + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Project id +final pageSize = 25; // int | Maximum number of candidates to list (default 10) +final filters = [{ "status_id": { "operator": "o", "values": null } }]; // String | JSON specifying filter conditions. Accepts the same filters as the [work packages](https://www.openproject.org/docs/api/endpoints/work-packages/) endpoint. +final query = "rollout"; // String | Shortcut for filtering by ID or subject +final type = "follows"; // String | Type of relation to find candidates for (default \"relates\") +final sortBy = [["status", "asc"]]; // String | JSON specifying sort criteria. Accepts the same sort criteria as the [work packages](https://www.openproject.org/docs/api/endpoints/work-packages/) endpoint. + +try { + final result = api_instance.listAvailableRelationCandidates(id, pageSize, filters, query, type, sortBy); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->listAvailableRelationCandidates: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Project id | + **pageSize** | **int**| Maximum number of candidates to list (default 10) | [optional] + **filters** | **String**| JSON specifying filter conditions. Accepts the same filters as the [work packages](https://www.openproject.org/docs/api/endpoints/work-packages/) endpoint. | [optional] + **query** | **String**| Shortcut for filtering by ID or subject | [optional] + **type** | **String**| Type of relation to find candidates for (default \"relates\") | [optional] + **sortBy** | **String**| JSON specifying sort criteria. Accepts the same sort criteria as the [work packages](https://www.openproject.org/docs/api/endpoints/work-packages/) endpoint. | [optional] [default to '[["id", "asc"]]'] + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listRelations** +> listRelations(id) + +List relations + +Lists all relations this work package is involved in. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Work package id + +try { + api_instance.listRelations(id); +} catch (e) { + print('Exception when calling WorkPackagesApi->listRelations: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listWatchers** +> WatchersModel listWatchers(id) + +List watchers + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Work package id + +try { + final result = api_instance.listWatchers(id); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->listWatchers: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + +### Return type + +[**WatchersModel**](WatchersModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listWorkPackageActivities** +> Object listWorkPackageActivities(id) + +List work package activities + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Work package id + +try { + final result = api_instance.listWorkPackageActivities(id); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->listWorkPackageActivities: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listWorkPackageFileLinks** +> FileLinkCollectionReadModel listWorkPackageFileLinks(id, filters) + +Gets all file links of a work package + +Gets all file links of a work package. As a side effect, for every file link a request is sent to the storage's origin to fetch live data and patch the file link's data before returning, as well as retrieving permissions of the user on this origin file. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1337; // int | Work package id +final filters = [{"storage":{"operator":"=","values":["42"]}}]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. The following filters are supported: - storage + +try { + final result = api_instance.listWorkPackageFileLinks(id, filters); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->listWorkPackageFileLinks: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. The following filters are supported: - storage | [optional] + +### Return type + +[**FileLinkCollectionReadModel**](FileLinkCollectionReadModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listWorkPackageSchemas** +> Object listWorkPackageSchemas(filters) + +List Work Package Schemas + +List work package schemas. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final filters = [{ "id": { "operator": "=", "values": ["12-1", "14-2"] } }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: The schema's id Schema id has the form `project_id-work_package_type_id`. + +try { + final result = api_instance.listWorkPackageSchemas(filters); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->listWorkPackageSchemas: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: The schema's id Schema id has the form `project_id-work_package_type_id`. | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listWorkPackages** +> WorkPackagesModel listWorkPackages(offset, pageSize, filters, sortBy, groupBy, showSums, select, timestamps) + +List work packages + +Returns a collection of work packages. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final offset = 25; // int | Page number inside the requested collection. +final pageSize = 25; // int | Number of elements to display per page. +final filters = [{ "type_id": { "operator": "=", "values": ["1", "2"] }}]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. If no filter is to be applied, the client should send an empty array (`[]`), otherwise a default filter is applied. A Currently supported filters are (there are additional filters added by modules): - assigned_to - assignee_or_group - attachment_base - attachment_content - attachment_file_name - author - blocked - blocks - category - comment - created_at - custom_field - dates_interval - description - done_ratio - due_date - duplicated - duplicates - duration - estimated_hours - file_link_origin_id - follows - group - id - includes - linkable_to_storage_id - linkable_to_storage_url - manual_sort - milestone - only_subproject - parent - partof - precedes - principal_base - priority - project - relatable - relates - required - requires - responsible - role - search - start_date - status - storage_id - storage_url - subject - subject_or_id - subproject - type - typeahead - updated_at - version - watcher - work_package +final sortBy = [["status", "asc"]]; // String | JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. +final groupBy = status; // String | The column to group by. +final showSums = true; // bool | Indicates whether properties should be summed up if they support it. +final select = total,elements/subject,elements/id,self; // String | Comma separated list of properties to include. +final timestamps = 2022-01-01T00:00:00Z,PT0S; // String | In order to perform a [baseline comparison](/docs/api/baseline-comparisons), you may provide one or several timestamps in ISO-8601 format as comma-separated list. The timestamps may be absolute or relative, such as ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Usually, the first timestamp is the baseline date, the last timestamp is the current date. Values older than 1 day are accepted only with valid Enterprise Token available. + +try { + final result = api_instance.listWorkPackages(offset, pageSize, filters, sortBy, groupBy, showSums, select, timestamps); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->listWorkPackages: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **offset** | **int**| Page number inside the requested collection. | [optional] [default to 1] + **pageSize** | **int**| Number of elements to display per page. | [optional] + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. If no filter is to be applied, the client should send an empty array (`[]`), otherwise a default filter is applied. A Currently supported filters are (there are additional filters added by modules): - assigned_to - assignee_or_group - attachment_base - attachment_content - attachment_file_name - author - blocked - blocks - category - comment - created_at - custom_field - dates_interval - description - done_ratio - due_date - duplicated - duplicates - duration - estimated_hours - file_link_origin_id - follows - group - id - includes - linkable_to_storage_id - linkable_to_storage_url - manual_sort - milestone - only_subproject - parent - partof - precedes - principal_base - priority - project - relatable - relates - required - requires - responsible - role - search - start_date - status - storage_id - storage_url - subject - subject_or_id - subproject - type - typeahead - updated_at - version - watcher - work_package | [optional] [default to '[{ "status_id": { "operator": "o", "values": null }}]'] + **sortBy** | **String**| JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. | [optional] [default to '[["id", "asc"]]'] + **groupBy** | **String**| The column to group by. | [optional] + **showSums** | **bool**| Indicates whether properties should be summed up if they support it. | [optional] [default to false] + **select** | **String**| Comma separated list of properties to include. | [optional] + **timestamps** | **String**| In order to perform a [baseline comparison](/docs/api/baseline-comparisons), you may provide one or several timestamps in ISO-8601 format as comma-separated list. The timestamps may be absolute or relative, such as ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Usually, the first timestamp is the baseline date, the last timestamp is the current date. Values older than 1 day are accepted only with valid Enterprise Token available. | [optional] [default to 'PT0S'] + +### Return type + +[**WorkPackagesModel**](WorkPackagesModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **removeWatcher** +> removeWatcher(id, userId) + +Remove watcher + +Removes the specified user from the list of watchers for the given work package. If the request succeeds, the specified user is not watching the work package anymore. *Note: This might also be the case, if the specified user did not watch the work package prior to the request.* + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Work package id +final userId = 1; // int | User id + +try { + api_instance.removeWatcher(id, userId); +} catch (e) { + print('Exception when calling WorkPackagesApi->removeWatcher: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + **userId** | **int**| User id | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **revisions** +> Object revisions(id) + +Revisions + +Gets a list of revisions that are linked to this work package, e.g., because it is referenced in the commit message of the revision. Only linked revisions from repositories are shown if the user has the view changesets permission in the defining project. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Work package id + +try { + final result = api_instance.revisions(id); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->revisions: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateWorkPackage** +> WorkPackagePatchModel updateWorkPackage(id, notify, workPackageModel) + +Update a Work Package + +When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body. Note that it is only allowed to provide properties or links supporting the **write** operation. Additionally to the fields the client wants to change, it is mandatory to provide the value of `lockVersion` which was received by the `GET` request this change originates from. The value of `lockVersion` is used to implement [optimistic locking](https://en.wikipedia.org/wiki/Optimistic_concurrency_control). + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 42; // int | Work package id +final notify = false; // bool | Indicates whether change notifications should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. +final workPackageModel = WorkPackageModel(); // WorkPackageModel | + +try { + final result = api_instance.updateWorkPackage(id, notify, workPackageModel); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->updateWorkPackage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + **notify** | **bool**| Indicates whether change notifications should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. | [optional] [default to true] + **workPackageModel** | [**WorkPackageModel**](WorkPackageModel.md)| | [optional] + +### Return type + +[**WorkPackagePatchModel**](WorkPackagePatchModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewWorkPackage** +> WorkPackageModel viewWorkPackage(id, timestamps) + +View Work Package + +Returns the specified work package. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | Work package id +final timestamps = 2022-01-01T00:00:00Z,PT0S; // String | In order to perform a [baseline comparison](/docs/api/baseline-comparisons) of the work-package attributes, you may provide one or several timestamps in ISO-8601 format as comma-separated list. The timestamps may be absolute or relative, such as ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Usually, the first timestamp is the baseline date, the last timestamp is the current date. Values older than 1 day are accepted only with valid Enterprise Token available. + +try { + final result = api_instance.viewWorkPackage(id, timestamps); + print(result); +} catch (e) { + print('Exception when calling WorkPackagesApi->viewWorkPackage: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Work package id | + **timestamps** | **String**| In order to perform a [baseline comparison](/docs/api/baseline-comparisons) of the work-package attributes, you may provide one or several timestamps in ISO-8601 format as comma-separated list. The timestamps may be absolute or relative, such as ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Usually, the first timestamp is the baseline date, the last timestamp is the current date. Values older than 1 day are accepted only with valid Enterprise Token available. | [optional] [default to 'PT0S'] + +### Return type + +[**WorkPackageModel**](WorkPackageModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewWorkPackageSchema** +> viewWorkPackageSchema(identifier) + +View Work Package Schema + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final identifier = 12-13; // String | Identifier of the schema + +try { + api_instance.viewWorkPackageSchema(identifier); +} catch (e) { + print('Exception when calling WorkPackagesApi->viewWorkPackageSchema: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **identifier** | **String**| Identifier of the schema | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **workPackageCreateForm** +> workPackageCreateForm() + +Work Package Create Form + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); + +try { + api_instance.workPackageCreateForm(); +} catch (e) { + print('Exception when calling WorkPackagesApi->workPackageCreateForm: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **workPackageCreateFormForProject** +> workPackageCreateFormForProject(id) + +Work Package Create Form For Project + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | ID of the project in which the work package will be created + +try { + api_instance.workPackageCreateFormForProject(id); +} catch (e) { + print('Exception when calling WorkPackagesApi->workPackageCreateFormForProject: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| ID of the project in which the work package will be created | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **workPackageEditForm** +> workPackageEditForm(id, workPackageModel) + +Work Package Edit Form + +When calling this endpoint, the client provides a single object containing the properties and links to be edited, in the body. Note that it is only allowed to provide properties or links supporting the write operation. When setting start date, finish date, and duration together, their correctness will be checked and a 422 error will be returned if one value does not match with the two others. You can make the server compute a value: set only two values in the request and the third one will be computed and returned in the response. For instance, when sending `{ \"startDate\": \"2022-08-23\", duration: \"P2D\" }`, the response will include `{ \"dueDate\": \"2022-08-24\" }`. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkPackagesApi(); +final id = 1; // int | ID of the work package being modified +final workPackageModel = WorkPackageModel(); // WorkPackageModel | + +try { + api_instance.workPackageEditForm(id, workPackageModel); +} catch (e) { + print('Exception when calling WorkPackagesApi->workPackageEditForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| ID of the work package being modified | + **workPackageModel** | [**WorkPackageModel**](WorkPackageModel.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/WorkPackagesModel.md b/doc/WorkPackagesModel.md new file mode 100644 index 0000000..c816142 --- /dev/null +++ b/doc/WorkPackagesModel.md @@ -0,0 +1,19 @@ +# openapi.model.WorkPackagesModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | +**total** | **int** | The total amount of elements available in the collection. | +**count** | **int** | Actual amount of elements in this response. | +**links** | [**WorkPackagesModelAllOfLinks**](WorkPackagesModelAllOfLinks.md) | | +**embedded** | [**WorkPackagesModelAllOfEmbedded**](WorkPackagesModelAllOfEmbedded.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackagesModelAllOfEmbedded.md b/doc/WorkPackagesModelAllOfEmbedded.md new file mode 100644 index 0000000..20f43ee --- /dev/null +++ b/doc/WorkPackagesModelAllOfEmbedded.md @@ -0,0 +1,15 @@ +# openapi.model.WorkPackagesModelAllOfEmbedded + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**elements** | [**Object**](.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackagesModelAllOfLinks.md b/doc/WorkPackagesModelAllOfLinks.md new file mode 100644 index 0000000..15cc6df --- /dev/null +++ b/doc/WorkPackagesModelAllOfLinks.md @@ -0,0 +1,15 @@ +# openapi.model.WorkPackagesModelAllOfLinks + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | [**WorkPackagesModelAllOfLinksSelf**](WorkPackagesModelAllOfLinksSelf.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkPackagesModelAllOfLinksSelf.md b/doc/WorkPackagesModelAllOfLinksSelf.md new file mode 100644 index 0000000..fb0fbb6 --- /dev/null +++ b/doc/WorkPackagesModelAllOfLinksSelf.md @@ -0,0 +1,20 @@ +# openapi.model.WorkPackagesModelAllOfLinksSelf + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **String** | URL to the referenced resource (might be relative) | +**title** | **String** | Representative label for the resource | [optional] +**templated** | **bool** | If true the href contains parts that need to be replaced by the client | [optional] [default to false] +**method** | **String** | The HTTP verb to use when requesting the resource | [optional] [default to 'GET'] +**payload** | [**Object**](.md) | The payload to send in the request to achieve the desired result | [optional] +**identifier** | **String** | An optional unique identifier to the link object | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/WorkScheduleApi.md b/doc/WorkScheduleApi.md new file mode 100644 index 0000000..1ddda7e --- /dev/null +++ b/doc/WorkScheduleApi.md @@ -0,0 +1,529 @@ +# openapi.api.WorkScheduleApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *https://community.openproject.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createNonWorkingDay**](WorkScheduleApi.md#createnonworkingday) | **POST** /api/v3/days/non_working | Creates a non-working day (NOT IMPLEMENTED) +[**deleteNonWorkingDay**](WorkScheduleApi.md#deletenonworkingday) | **DELETE** /api/v3/days/non_working/{date} | Removes a non-working day (NOT IMPLEMENTED) +[**listDays**](WorkScheduleApi.md#listdays) | **GET** /api/v3/days | Lists days +[**listNonWorkingDays**](WorkScheduleApi.md#listnonworkingdays) | **GET** /api/v3/days/non_working | Lists all non working days +[**listWeekDays**](WorkScheduleApi.md#listweekdays) | **GET** /api/v3/days/week | Lists week days +[**updateNonWorkingDay**](WorkScheduleApi.md#updatenonworkingday) | **PATCH** /api/v3/days/non_working/{date} | Update a non-working day attributes (NOT IMPLEMENTED) +[**updateWeekDay**](WorkScheduleApi.md#updateweekday) | **PATCH** /api/v3/days/week/{day} | Update a week day attributes (NOT IMPLEMENTED) +[**updateWeekDays**](WorkScheduleApi.md#updateweekdays) | **PATCH** /api/v3/days/week | Update week days (NOT IMPLEMENTED) +[**viewDay**](WorkScheduleApi.md#viewday) | **GET** /api/v3/days/{date} | View day +[**viewNonWorkingDay**](WorkScheduleApi.md#viewnonworkingday) | **GET** /api/v3/days/non_working/{date} | View a non-working day +[**viewWeekDay**](WorkScheduleApi.md#viewweekday) | **GET** /api/v3/days/week/{day} | View a week day + + +# **createNonWorkingDay** +> NonWorkingDayModel createNonWorkingDay(nonWorkingDayModel) + +Creates a non-working day (NOT IMPLEMENTED) + +**(NOT IMPLEMENTED)** Marks a day as being a non-working day. Note: creating a non-working day will not affect the start and finish dates of work packages but will affect their duration. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkScheduleApi(); +final nonWorkingDayModel = NonWorkingDayModel(); // NonWorkingDayModel | + +try { + final result = api_instance.createNonWorkingDay(nonWorkingDayModel); + print(result); +} catch (e) { + print('Exception when calling WorkScheduleApi->createNonWorkingDay: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **nonWorkingDayModel** | [**NonWorkingDayModel**](NonWorkingDayModel.md)| | [optional] + +### Return type + +[**NonWorkingDayModel**](NonWorkingDayModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteNonWorkingDay** +> deleteNonWorkingDay(date) + +Removes a non-working day (NOT IMPLEMENTED) + +**(NOT IMPLEMENTED)** Removes the non-working day at the given date. Note: deleting a non-working day will not affect the start and finish dates of work packages but will affect their duration. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkScheduleApi(); +final date = 2022-05-06; // DateTime | The date of the non-working day to view in ISO 8601 format. + +try { + api_instance.deleteNonWorkingDay(date); +} catch (e) { + print('Exception when calling WorkScheduleApi->deleteNonWorkingDay: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **date** | **DateTime**| The date of the non-working day to view in ISO 8601 format. | + +### Return type + +void (empty response body) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listDays** +> DayCollectionModel listDays(filters) + +Lists days + +Lists days information for a given date interval. All days from the beginning of current month to the end of following month are returned by default. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkScheduleApi(); +final filters = [{ "date": { "operator": "<>d", "values": ["2022-05-02","2022-05-26"] } }, { "working": { "operator": "=", "values": ["f"] } }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + date: the inclusive date interval to scope days to look up. When unspecified, default is from the beginning of current month to the end of following month. Example: `{ \"date\": { \"operator\": \"<>d\", \"values\": [\"2022-05-02\",\"2022-05-26\"] } }` would return days between May 5 and May 26 2022, inclusive. + working: when `true`, returns only the working days. When `false`, returns only the non-working days (weekend days and non-working days). When unspecified, returns both working and non-working days. Example: `{ \"working\": { \"operator\": \"=\", \"values\": [\"t\"] } }` would exclude non-working days from the response. + +try { + final result = api_instance.listDays(filters); + print(result); +} catch (e) { + print('Exception when calling WorkScheduleApi->listDays: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + date: the inclusive date interval to scope days to look up. When unspecified, default is from the beginning of current month to the end of following month. Example: `{ \"date\": { \"operator\": \"<>d\", \"values\": [\"2022-05-02\",\"2022-05-26\"] } }` would return days between May 5 and May 26 2022, inclusive. + working: when `true`, returns only the working days. When `false`, returns only the non-working days (weekend days and non-working days). When unspecified, returns both working and non-working days. Example: `{ \"working\": { \"operator\": \"=\", \"values\": [\"t\"] } }` would exclude non-working days from the response. | [optional] + +### Return type + +[**DayCollectionModel**](DayCollectionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listNonWorkingDays** +> NonWorkingDayCollectionModel listNonWorkingDays(filters) + +Lists all non working days + +Lists all one-time non working days, such as holidays. It does not lists the non working weekdays, such as each Saturday, Sunday. For listing the weekends, the `/api/v3/days` endpoint should be used. All days from current year are returned by default. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkScheduleApi(); +final filters = [{ "date": { "operator": "<>d", "values": ["2022-05-02","2022-05-26"] } }]; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + date: the inclusive date interval to scope days to look up. When unspecified, default is from the beginning to the end of current year. Example: `{ \"date\": { \"operator\": \"<>d\", \"values\": [\"2022-05-02\",\"2022-05-26\"] } }` would return days between May 5 and May 26 2022, inclusive. + +try { + final result = api_instance.listNonWorkingDays(filters); + print(result); +} catch (e) { + print('Exception when calling WorkScheduleApi->listNonWorkingDays: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **String**| JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + date: the inclusive date interval to scope days to look up. When unspecified, default is from the beginning to the end of current year. Example: `{ \"date\": { \"operator\": \"<>d\", \"values\": [\"2022-05-02\",\"2022-05-26\"] } }` would return days between May 5 and May 26 2022, inclusive. | [optional] + +### Return type + +[**NonWorkingDayCollectionModel**](NonWorkingDayCollectionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **listWeekDays** +> WeekDayCollectionModel listWeekDays() + +Lists week days + +Lists week days with work schedule information. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkScheduleApi(); + +try { + final result = api_instance.listWeekDays(); + print(result); +} catch (e) { + print('Exception when calling WorkScheduleApi->listWeekDays: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**WeekDayCollectionModel**](WeekDayCollectionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateNonWorkingDay** +> NonWorkingDayModel updateNonWorkingDay(date, nonWorkingDayModel) + +Update a non-working day attributes (NOT IMPLEMENTED) + +**(NOT IMPLEMENTED)** Update the non-working day information for a given date. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkScheduleApi(); +final date = 2022-05-06; // DateTime | The date of the non-working day to view in ISO 8601 format. +final nonWorkingDayModel = NonWorkingDayModel(); // NonWorkingDayModel | + +try { + final result = api_instance.updateNonWorkingDay(date, nonWorkingDayModel); + print(result); +} catch (e) { + print('Exception when calling WorkScheduleApi->updateNonWorkingDay: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **date** | **DateTime**| The date of the non-working day to view in ISO 8601 format. | + **nonWorkingDayModel** | [**NonWorkingDayModel**](NonWorkingDayModel.md)| | [optional] + +### Return type + +[**NonWorkingDayModel**](NonWorkingDayModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateWeekDay** +> WeekDayModel updateWeekDay(day, weekDayWriteModel) + +Update a week day attributes (NOT IMPLEMENTED) + +**(NOT IMPLEMENTED)** Makes a week day a working or non-working day. Note: changing a week day working attribute will not affect the start and finish dates of work packages but will affect their duration attribute. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkScheduleApi(); +final day = 56; // int | The week day from 1 to 7. 1 is Monday. 7 is Sunday. +final weekDayWriteModel = WeekDayWriteModel(); // WeekDayWriteModel | + +try { + final result = api_instance.updateWeekDay(day, weekDayWriteModel); + print(result); +} catch (e) { + print('Exception when calling WorkScheduleApi->updateWeekDay: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **day** | **int**| The week day from 1 to 7. 1 is Monday. 7 is Sunday. | + **weekDayWriteModel** | [**WeekDayWriteModel**](WeekDayWriteModel.md)| | [optional] + +### Return type + +[**WeekDayModel**](WeekDayModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateWeekDays** +> WeekDayCollectionModel updateWeekDays(weekDayCollectionWriteModel) + +Update week days (NOT IMPLEMENTED) + +**(NOT IMPLEMENTED)** Update multiple week days with work schedule information. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkScheduleApi(); +final weekDayCollectionWriteModel = WeekDayCollectionWriteModel(); // WeekDayCollectionWriteModel | + +try { + final result = api_instance.updateWeekDays(weekDayCollectionWriteModel); + print(result); +} catch (e) { + print('Exception when calling WorkScheduleApi->updateWeekDays: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **weekDayCollectionWriteModel** | [**WeekDayCollectionWriteModel**](WeekDayCollectionWriteModel.md)| | [optional] + +### Return type + +[**WeekDayCollectionModel**](WeekDayCollectionModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewDay** +> DayModel viewDay(date) + +View day + +View the day information for a given date. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkScheduleApi(); +final date = 2022-05-06; // DateTime | The date of the non-working day to view in ISO 8601 format. + +try { + final result = api_instance.viewDay(date); + print(result); +} catch (e) { + print('Exception when calling WorkScheduleApi->viewDay: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **date** | **DateTime**| The date of the non-working day to view in ISO 8601 format. | + +### Return type + +[**DayModel**](DayModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewNonWorkingDay** +> NonWorkingDayModel viewNonWorkingDay(date) + +View a non-working day + +Returns the non-working day information for a given date. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkScheduleApi(); +final date = 2022-05-06; // DateTime | The date of the non-working day to view in ISO 8601 format. + +try { + final result = api_instance.viewNonWorkingDay(date); + print(result); +} catch (e) { + print('Exception when calling WorkScheduleApi->viewNonWorkingDay: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **date** | **DateTime**| The date of the non-working day to view in ISO 8601 format. | + +### Return type + +[**NonWorkingDayModel**](NonWorkingDayModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **viewWeekDay** +> WeekDayModel viewWeekDay(day) + +View a week day + +View a week day and its attributes. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: BasicAuth +//defaultApiClient.getAuthentication('BasicAuth').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('BasicAuth').password = 'YOUR_PASSWORD'; + +final api_instance = WorkScheduleApi(); +final day = 56; // int | The week day from 1 to 7. 1 is Monday. 7 is Sunday. + +try { + final result = api_instance.viewWeekDay(day); + print(result); +} catch (e) { + print('Exception when calling WorkScheduleApi->viewWeekDay: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **day** | **int**| The week day from 1 to 7. 1 is Monday. 7 is Sunday. | + +### Return type + +[**WeekDayModel**](WeekDayModel.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/lib/api.dart b/lib/api.dart new file mode 100644 index 0000000..67260ab --- /dev/null +++ b/lib/api.dart @@ -0,0 +1,480 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +library openapi.api; + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:collection/collection.dart'; +import 'package:http/http.dart'; +import 'package:intl/intl.dart'; +import 'package:meta/meta.dart'; + +part 'api_client.dart'; +part 'api_helper.dart'; +part 'api_exception.dart'; +part 'auth/authentication.dart'; +part 'auth/api_key_auth.dart'; +part 'auth/oauth.dart'; +part 'auth/http_basic_auth.dart'; +part 'auth/http_bearer_auth.dart'; + +part 'api/actions_capabilities_api.dart'; +part 'api/activities_api.dart'; +part 'api/attachments_api.dart'; +part 'api/budgets_api.dart'; +part 'api/categories_api.dart'; +part 'api/collections_api.dart'; +part 'api/configuration_api.dart'; +part 'api/custom_actions_api.dart'; +part 'api/custom_options_api.dart'; +part 'api/documents_api.dart'; +part 'api/file_links_api.dart'; +part 'api/forms_api.dart'; +part 'api/grids_api.dart'; +part 'api/groups_api.dart'; +part 'api/help_texts_api.dart'; +part 'api/memberships_api.dart'; +part 'api/news_api.dart'; +part 'api/notifications_api.dart'; +part 'api/o_auth2_api.dart'; +part 'api/posts_api.dart'; +part 'api/previewing_api.dart'; +part 'api/principals_api.dart'; +part 'api/priorities_api.dart'; +part 'api/projects_api.dart'; +part 'api/queries_api.dart'; +part 'api/query_columns_api.dart'; +part 'api/query_filter_instance_schema_api.dart'; +part 'api/query_filters_api.dart'; +part 'api/query_operators_api.dart'; +part 'api/query_sort_bys_api.dart'; +part 'api/relations_api.dart'; +part 'api/revisions_api.dart'; +part 'api/roles_api.dart'; +part 'api/root_api.dart'; +part 'api/schemas_api.dart'; +part 'api/statuses_api.dart'; +part 'api/time_entries_api.dart'; +part 'api/time_entry_activities_api.dart'; +part 'api/types_api.dart'; +part 'api/user_preferences_api.dart'; +part 'api/users_api.dart'; +part 'api/values_property_api.dart'; +part 'api/versions_api.dart'; +part 'api/views_api.dart'; +part 'api/wiki_pages_api.dart'; +part 'api/work_packages_api.dart'; +part 'api/work_schedule_api.dart'; + +part 'model/activity_model.dart'; +part 'model/activity_model_comment.dart'; +part 'model/add_watcher_request.dart'; +part 'model/attachment_model.dart'; +part 'model/attachment_model_description.dart'; +part 'model/attachment_model_links.dart'; +part 'model/attachment_model_links_author.dart'; +part 'model/attachment_model_links_container.dart'; +part 'model/attachment_model_links_delete.dart'; +part 'model/attachment_model_links_download_location.dart'; +part 'model/attachment_model_links_self.dart'; +part 'model/attachments_model.dart'; +part 'model/attachments_model_all_of_embedded.dart'; +part 'model/attachments_model_all_of_embedded_elements_inner.dart'; +part 'model/attachments_model_all_of_links.dart'; +part 'model/attachments_model_all_of_links_self.dart'; +part 'model/budget_model.dart'; +part 'model/budget_model_links.dart'; +part 'model/budget_model_links_self.dart'; +part 'model/category_model.dart'; +part 'model/category_model_links.dart'; +part 'model/category_model_links_default_assignee.dart'; +part 'model/category_model_links_project.dart'; +part 'model/category_model_links_self.dart'; +part 'model/collection_model.dart'; +part 'model/collection_model_links.dart'; +part 'model/collection_model_links_self.dart'; +part 'model/comment_work_package_request.dart'; +part 'model/configuration_model.dart'; +part 'model/create_views_request.dart'; +part 'model/create_views_request_links.dart'; +part 'model/create_views_request_links_query.dart'; +part 'model/custom_action_model.dart'; +part 'model/custom_action_model_links.dart'; +part 'model/custom_action_model_links_execute_immediately.dart'; +part 'model/custom_action_model_links_self.dart'; +part 'model/custom_option_model.dart'; +part 'model/custom_option_model_links.dart'; +part 'model/custom_option_model_links_self.dart'; +part 'model/day_collection_model.dart'; +part 'model/day_collection_model_all_of_embedded.dart'; +part 'model/day_collection_model_all_of_links.dart'; +part 'model/day_collection_model_all_of_links_self.dart'; +part 'model/day_model.dart'; +part 'model/day_model_links.dart'; +part 'model/day_model_links_week_day.dart'; +part 'model/document_model.dart'; +part 'model/document_model_links.dart'; +part 'model/document_model_links_attachments.dart'; +part 'model/document_model_links_project.dart'; +part 'model/document_model_links_self.dart'; +part 'model/error_response.dart'; +part 'model/error_response_embedded.dart'; +part 'model/error_response_embedded_details.dart'; +part 'model/execute_custom_action_request.dart'; +part 'model/execute_custom_action_request_links.dart'; +part 'model/execute_custom_action_request_links_work_package.dart'; +part 'model/file_link_collection_read_model.dart'; +part 'model/file_link_collection_read_model_all_of_embedded.dart'; +part 'model/file_link_collection_read_model_all_of_links.dart'; +part 'model/file_link_collection_read_model_all_of_links_self.dart'; +part 'model/file_link_collection_write_model.dart'; +part 'model/file_link_collection_write_model_all_of_embedded.dart'; +part 'model/file_link_origin_data_model.dart'; +part 'model/file_link_read_model.dart'; +part 'model/file_link_read_model_embedded.dart'; +part 'model/file_link_read_model_links.dart'; +part 'model/file_link_read_model_links_container.dart'; +part 'model/file_link_read_model_links_creator.dart'; +part 'model/file_link_read_model_links_delete.dart'; +part 'model/file_link_read_model_links_origin_open.dart'; +part 'model/file_link_read_model_links_origin_open_location.dart'; +part 'model/file_link_read_model_links_permission.dart'; +part 'model/file_link_read_model_links_self.dart'; +part 'model/file_link_read_model_links_static_origin_download.dart'; +part 'model/file_link_read_model_links_static_origin_open.dart'; +part 'model/file_link_read_model_links_static_origin_open_location.dart'; +part 'model/file_link_read_model_links_storage.dart'; +part 'model/file_link_write_model.dart'; +part 'model/formattable.dart'; +part 'model/grid_collection_model.dart'; +part 'model/grid_collection_model_all_of_embedded.dart'; +part 'model/grid_read_model.dart'; +part 'model/grid_read_model_links.dart'; +part 'model/grid_read_model_links_add_attachment.dart'; +part 'model/grid_read_model_links_attachments.dart'; +part 'model/grid_read_model_links_delete.dart'; +part 'model/grid_read_model_links_scope.dart'; +part 'model/grid_read_model_links_self.dart'; +part 'model/grid_read_model_links_update.dart'; +part 'model/grid_read_model_links_update_immediately.dart'; +part 'model/grid_widget_model.dart'; +part 'model/grid_write_model.dart'; +part 'model/grid_write_model_links.dart'; +part 'model/group_collection_model.dart'; +part 'model/group_collection_model_all_of_embedded.dart'; +part 'model/group_collection_model_all_of_links.dart'; +part 'model/group_collection_model_all_of_links_self.dart'; +part 'model/group_model.dart'; +part 'model/group_model_links.dart'; +part 'model/group_model_links_delete.dart'; +part 'model/group_model_links_members_inner.dart'; +part 'model/group_model_links_memberships.dart'; +part 'model/group_model_links_self.dart'; +part 'model/group_model_links_update_immediately.dart'; +part 'model/group_write_model.dart'; +part 'model/group_write_model_links.dart'; +part 'model/group_write_model_links_members_inner.dart'; +part 'model/help_text_collection_model.dart'; +part 'model/help_text_collection_model_all_of_embedded.dart'; +part 'model/help_text_collection_model_all_of_links.dart'; +part 'model/help_text_collection_model_all_of_links_self.dart'; +part 'model/help_text_model.dart'; +part 'model/help_text_model_links.dart'; +part 'model/help_text_model_links_add_attachment.dart'; +part 'model/help_text_model_links_attachments.dart'; +part 'model/help_text_model_links_edit_text.dart'; +part 'model/help_text_model_links_self.dart'; +part 'model/link.dart'; +part 'model/news_model.dart'; +part 'model/news_model_links.dart'; +part 'model/news_model_links_author.dart'; +part 'model/news_model_links_project.dart'; +part 'model/news_model_links_self.dart'; +part 'model/non_working_day_collection_model.dart'; +part 'model/non_working_day_collection_model_all_of_embedded.dart'; +part 'model/non_working_day_collection_model_all_of_links.dart'; +part 'model/non_working_day_collection_model_all_of_links_self.dart'; +part 'model/non_working_day_model.dart'; +part 'model/non_working_day_model_links.dart'; +part 'model/non_working_day_model_links_self.dart'; +part 'model/notification_collection_model.dart'; +part 'model/notification_collection_model_all_of_embedded.dart'; +part 'model/notification_collection_model_all_of_links.dart'; +part 'model/notification_collection_model_all_of_links_change_size.dart'; +part 'model/notification_collection_model_all_of_links_jump_to.dart'; +part 'model/notification_collection_model_all_of_links_self.dart'; +part 'model/notification_model.dart'; +part 'model/notification_model_details_inner.dart'; +part 'model/notification_model_embedded.dart'; +part 'model/notification_model_embedded_resource.dart'; +part 'model/notification_model_links.dart'; +part 'model/notification_model_links_activity.dart'; +part 'model/notification_model_links_actor.dart'; +part 'model/notification_model_links_details_inner.dart'; +part 'model/notification_model_links_project.dart'; +part 'model/notification_model_links_read_ian.dart'; +part 'model/notification_model_links_resource.dart'; +part 'model/notification_model_links_self.dart'; +part 'model/notification_model_links_unread_ian.dart'; +part 'model/o_auth_application_read_model.dart'; +part 'model/o_auth_application_read_model_links.dart'; +part 'model/o_auth_application_read_model_links_integration.dart'; +part 'model/o_auth_application_read_model_links_owner.dart'; +part 'model/o_auth_application_read_model_links_redirect_uri.dart'; +part 'model/o_auth_application_read_model_links_self.dart'; +part 'model/o_auth_client_credentials_read_model.dart'; +part 'model/o_auth_client_credentials_read_model_links.dart'; +part 'model/o_auth_client_credentials_read_model_links_integration.dart'; +part 'model/o_auth_client_credentials_read_model_links_self.dart'; +part 'model/o_auth_client_credentials_write_model.dart'; +part 'model/paginated_collection_model.dart'; +part 'model/paginated_collection_model_all_of_links.dart'; +part 'model/paginated_collection_model_all_of_links_change_size.dart'; +part 'model/paginated_collection_model_all_of_links_jump_to.dart'; +part 'model/post_model.dart'; +part 'model/post_model_links.dart'; +part 'model/post_model_links_add_attachment.dart'; +part 'model/priority_model.dart'; +part 'model/priority_model_links.dart'; +part 'model/priority_model_links_self.dart'; +part 'model/project_model.dart'; +part 'model/project_model_links.dart'; +part 'model/project_model_links_categories.dart'; +part 'model/project_model_links_create_work_package.dart'; +part 'model/project_model_links_create_work_package_immediately.dart'; +part 'model/project_model_links_delete.dart'; +part 'model/project_model_links_memberships.dart'; +part 'model/project_model_links_parent.dart'; +part 'model/project_model_links_self.dart'; +part 'model/project_model_links_status.dart'; +part 'model/project_model_links_storages_inner.dart'; +part 'model/project_model_links_types.dart'; +part 'model/project_model_links_update.dart'; +part 'model/project_model_links_update_immediately.dart'; +part 'model/project_model_links_versions.dart'; +part 'model/project_model_links_work_packages.dart'; +part 'model/project_model_status_explanation.dart'; +part 'model/project_storage_collection_model.dart'; +part 'model/project_storage_collection_model_all_of_embedded.dart'; +part 'model/project_storage_collection_model_all_of_links.dart'; +part 'model/project_storage_collection_model_all_of_links_self.dart'; +part 'model/project_storage_model.dart'; +part 'model/project_storage_model_links.dart'; +part 'model/project_storage_model_links_creator.dart'; +part 'model/project_storage_model_links_project.dart'; +part 'model/project_storage_model_links_project_folder.dart'; +part 'model/project_storage_model_links_self.dart'; +part 'model/project_storage_model_links_storage.dart'; +part 'model/query_column_model.dart'; +part 'model/query_create_form.dart'; +part 'model/query_filter_instance_schema_model.dart'; +part 'model/query_filter_instance_schema_model_links.dart'; +part 'model/query_filter_instance_schema_model_links_filter.dart'; +part 'model/query_filter_instance_schema_model_links_self.dart'; +part 'model/query_filter_model.dart'; +part 'model/query_model.dart'; +part 'model/query_model_links.dart'; +part 'model/query_model_links_star.dart'; +part 'model/query_model_links_unstar.dart'; +part 'model/query_model_links_update.dart'; +part 'model/query_model_links_update_immediately.dart'; +part 'model/query_operator_model.dart'; +part 'model/query_sort_by_model.dart'; +part 'model/query_update_form.dart'; +part 'model/relation_model.dart'; +part 'model/relation_model_links.dart'; +part 'model/relation_model_links_delete.dart'; +part 'model/relation_model_links_from.dart'; +part 'model/relation_model_links_schema.dart'; +part 'model/relation_model_links_self.dart'; +part 'model/relation_model_links_to.dart'; +part 'model/relation_model_links_update.dart'; +part 'model/relation_model_links_update_immediately.dart'; +part 'model/revision_model.dart'; +part 'model/revision_model_links.dart'; +part 'model/revision_model_links_author.dart'; +part 'model/revision_model_links_project.dart'; +part 'model/revision_model_links_self.dart'; +part 'model/revision_model_links_show_revision.dart'; +part 'model/revision_model_message.dart'; +part 'model/role_model.dart'; +part 'model/role_model_links.dart'; +part 'model/role_model_links_self.dart'; +part 'model/root_model.dart'; +part 'model/root_model_links.dart'; +part 'model/root_model_links_configuration.dart'; +part 'model/root_model_links_memberships.dart'; +part 'model/root_model_links_priorities.dart'; +part 'model/root_model_links_relations.dart'; +part 'model/root_model_links_self.dart'; +part 'model/root_model_links_statuses.dart'; +part 'model/root_model_links_time_entries.dart'; +part 'model/root_model_links_types.dart'; +part 'model/root_model_links_user.dart'; +part 'model/root_model_links_user_preferences.dart'; +part 'model/root_model_links_work_packages.dart'; +part 'model/schema_model.dart'; +part 'model/schema_model_links.dart'; +part 'model/schema_model_links_self.dart'; +part 'model/show_or_validate_form_request.dart'; +part 'model/status_model.dart'; +part 'model/status_model_links.dart'; +part 'model/status_model_links_self.dart'; +part 'model/storage_file_model.dart'; +part 'model/storage_file_model_all_of_links.dart'; +part 'model/storage_file_model_all_of_links_self.dart'; +part 'model/storage_file_upload_link_model.dart'; +part 'model/storage_file_upload_link_model_links.dart'; +part 'model/storage_file_upload_link_model_links_destination.dart'; +part 'model/storage_file_upload_link_model_links_self.dart'; +part 'model/storage_file_upload_preparation_model.dart'; +part 'model/storage_files_model.dart'; +part 'model/storage_files_model_parent.dart'; +part 'model/storage_read_model.dart'; +part 'model/storage_read_model_embedded.dart'; +part 'model/storage_read_model_links.dart'; +part 'model/storage_read_model_links_authorization_state.dart'; +part 'model/storage_read_model_links_authorize.dart'; +part 'model/storage_read_model_links_oauth_application.dart'; +part 'model/storage_read_model_links_oauth_client_credentials.dart'; +part 'model/storage_read_model_links_open.dart'; +part 'model/storage_read_model_links_origin.dart'; +part 'model/storage_read_model_links_self.dart'; +part 'model/storage_read_model_links_type.dart'; +part 'model/storage_write_model.dart'; +part 'model/storage_write_model_links.dart'; +part 'model/storage_write_model_links_origin.dart'; +part 'model/storage_write_model_links_type.dart'; +part 'model/time_entry_activity_model.dart'; +part 'model/time_entry_activity_model_embedded.dart'; +part 'model/time_entry_activity_model_links.dart'; +part 'model/time_entry_activity_model_links_self.dart'; +part 'model/time_entry_collection_model.dart'; +part 'model/time_entry_collection_model_all_of_embedded.dart'; +part 'model/time_entry_collection_model_all_of_links.dart'; +part 'model/time_entry_collection_model_all_of_links_self.dart'; +part 'model/time_entry_model.dart'; +part 'model/time_entry_model_comment.dart'; +part 'model/time_entry_model_links.dart'; +part 'model/time_entry_model_links_activity.dart'; +part 'model/time_entry_model_links_delete.dart'; +part 'model/time_entry_model_links_project.dart'; +part 'model/time_entry_model_links_schema.dart'; +part 'model/time_entry_model_links_self.dart'; +part 'model/time_entry_model_links_update.dart'; +part 'model/time_entry_model_links_update_immediately.dart'; +part 'model/time_entry_model_links_user.dart'; +part 'model/time_entry_model_links_work_package.dart'; +part 'model/type_model.dart'; +part 'model/type_model_links.dart'; +part 'model/type_model_links_self.dart'; +part 'model/update_activity_request.dart'; +part 'model/update_activity_request_comment.dart'; +part 'model/update_user_preferences_request.dart'; +part 'model/user_collection_model.dart'; +part 'model/user_collection_model_all_of_embedded.dart'; +part 'model/user_collection_model_all_of_links.dart'; +part 'model/user_collection_model_all_of_links_self.dart'; +part 'model/user_create_model.dart'; +part 'model/user_model.dart'; +part 'model/user_model_links.dart'; +part 'model/user_model_links_delete.dart'; +part 'model/user_model_links_lock.dart'; +part 'model/user_model_links_memberships.dart'; +part 'model/user_model_links_self.dart'; +part 'model/user_model_links_show_user.dart'; +part 'model/user_model_links_unlock.dart'; +part 'model/user_model_links_update_immediately.dart'; +part 'model/values_property_model.dart'; +part 'model/values_property_model_links.dart'; +part 'model/values_property_model_links_schema.dart'; +part 'model/values_property_model_links_self.dart'; +part 'model/version_model.dart'; +part 'model/version_model_links.dart'; +part 'model/version_model_links_available_in_projects.dart'; +part 'model/version_model_links_defining_project.dart'; +part 'model/version_model_links_self.dart'; +part 'model/version_model_links_update.dart'; +part 'model/version_model_links_update_immediately.dart'; +part 'model/watchers_model.dart'; +part 'model/watchers_model_all_of_embedded.dart'; +part 'model/watchers_model_all_of_links.dart'; +part 'model/watchers_model_all_of_links_self.dart'; +part 'model/week_day_collection_model.dart'; +part 'model/week_day_collection_model_all_of_embedded.dart'; +part 'model/week_day_collection_model_all_of_links.dart'; +part 'model/week_day_collection_model_all_of_links_self.dart'; +part 'model/week_day_collection_write_model.dart'; +part 'model/week_day_collection_write_model_embedded.dart'; +part 'model/week_day_model.dart'; +part 'model/week_day_self_link_model.dart'; +part 'model/week_day_self_link_model_self.dart'; +part 'model/week_day_write_model.dart'; +part 'model/wiki_page_model.dart'; +part 'model/wiki_page_model_links.dart'; +part 'model/wiki_page_model_links_add_attachment.dart'; +part 'model/work_package_model.dart'; +part 'model/work_package_model_description.dart'; +part 'model/work_package_model_links.dart'; +part 'model/work_package_model_links_add_attachment.dart'; +part 'model/work_package_model_links_add_comment.dart'; +part 'model/work_package_model_links_add_file_link.dart'; +part 'model/work_package_model_links_add_relation.dart'; +part 'model/work_package_model_links_add_watcher.dart'; +part 'model/work_package_model_links_assignee.dart'; +part 'model/work_package_model_links_attachments.dart'; +part 'model/work_package_model_links_author.dart'; +part 'model/work_package_model_links_available_watchers.dart'; +part 'model/work_package_model_links_budget.dart'; +part 'model/work_package_model_links_category.dart'; +part 'model/work_package_model_links_file_links.dart'; +part 'model/work_package_model_links_parent.dart'; +part 'model/work_package_model_links_preview_markup.dart'; +part 'model/work_package_model_links_priority.dart'; +part 'model/work_package_model_links_project.dart'; +part 'model/work_package_model_links_relations.dart'; +part 'model/work_package_model_links_remove_watcher.dart'; +part 'model/work_package_model_links_responsible.dart'; +part 'model/work_package_model_links_revisions.dart'; +part 'model/work_package_model_links_schema.dart'; +part 'model/work_package_model_links_self.dart'; +part 'model/work_package_model_links_status.dart'; +part 'model/work_package_model_links_time_entries.dart'; +part 'model/work_package_model_links_type.dart'; +part 'model/work_package_model_links_unwatch.dart'; +part 'model/work_package_model_links_update.dart'; +part 'model/work_package_model_links_update_immediately.dart'; +part 'model/work_package_model_links_version.dart'; +part 'model/work_package_model_links_watch.dart'; +part 'model/work_package_model_links_watchers.dart'; +part 'model/work_package_patch_model.dart'; +part 'model/work_package_patch_model_links.dart'; +part 'model/work_packages_model.dart'; +part 'model/work_packages_model_all_of_embedded.dart'; +part 'model/work_packages_model_all_of_links.dart'; +part 'model/work_packages_model_all_of_links_self.dart'; + + +/// An [ApiClient] instance that uses the default values obtained from +/// the OpenAPI specification file. +var defaultApiClient = ApiClient(); + +const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; +const _dateEpochMarker = 'epoch'; +const _deepEquality = DeepCollectionEquality(); +final _dateFormatter = DateFormat('yyyy-MM-dd'); +final _regList = RegExp(r'^List<(.*)>$'); +final _regSet = RegExp(r'^Set<(.*)>$'); +final _regMap = RegExp(r'^Map$'); + +bool _isEpochMarker(String? pattern) => pattern == _dateEpochMarker || pattern == '/$_dateEpochMarker/'; diff --git a/lib/api/actions_capabilities_api.dart b/lib/api/actions_capabilities_api.dart new file mode 100644 index 0000000..44554a1 --- /dev/null +++ b/lib/api/actions_capabilities_api.dart @@ -0,0 +1,326 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class ActionsCapabilitiesApi { + ActionsCapabilitiesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// List actions + /// + /// Returns a collection of actions. The client can choose to filter the actions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain actions, for which the requesting client has sufficient permissions. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Returns only the action having the id or all actions except those having the id(s). + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + *No sort supported yet* + Future listActionsWithHttpInfo({ String? filters, String? sortBy, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/actions'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List actions + /// + /// Returns a collection of actions. The client can choose to filter the actions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain actions, for which the requesting client has sufficient permissions. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Returns only the action having the id or all actions except those having the id(s). + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + *No sort supported yet* + Future listActions({ String? filters, String? sortBy, }) async { + final response = await listActionsWithHttpInfo( filters: filters, sortBy: sortBy, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// List capabilities + /// + /// Returns a collection of actions assigned to a principal in a context. The client can choose to filter the actions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain actions, for which the requesting client has sufficient permissions + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + action: Get all capabilities of a certain action + principal: Get all capabilities of a principal + context: Get all capabilities within a context. Note that for a project context the client needs to provide `p{id}`, e.g. `p5` and for the global context a `g` + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by the capabilities id + Future listCapabilitiesWithHttpInfo({ String? filters, String? sortBy, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/capabilities'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List capabilities + /// + /// Returns a collection of actions assigned to a principal in a context. The client can choose to filter the actions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain actions, for which the requesting client has sufficient permissions + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + action: Get all capabilities of a certain action + principal: Get all capabilities of a principal + context: Get all capabilities within a context. Note that for a project context the client needs to provide `p{id}`, e.g. `p5` and for the global context a `g` + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by the capabilities id + Future listCapabilities({ String? filters, String? sortBy, }) async { + final response = await listCapabilitiesWithHttpInfo( filters: filters, sortBy: sortBy, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View action + /// + /// Returns an individual action. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] id (required): + /// action id which is the name of the action + Future viewActionWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/actions/{id}' + .replaceAll('{id}', id); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View action + /// + /// Returns an individual action. + /// + /// Parameters: + /// + /// * [String] id (required): + /// action id which is the name of the action + Future viewAction(String id,) async { + final response = await viewActionWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View capabilities + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] id (required): + /// capability id + Future viewCapabilitiesWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/capabilities/{id}' + .replaceAll('{id}', id); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View capabilities + /// + /// + /// + /// Parameters: + /// + /// * [String] id (required): + /// capability id + Future viewCapabilities(String id,) async { + final response = await viewCapabilitiesWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View global context + /// + /// Returns the global capability context. This context is necessary to consistently link to a context even if the context is not a project. + /// + /// Note: This method returns the HTTP [Response]. + Future viewGlobalContextWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/capabilities/context/global'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View global context + /// + /// Returns the global capability context. This context is necessary to consistently link to a context even if the context is not a project. + Future viewGlobalContext() async { + final response = await viewGlobalContextWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } +} diff --git a/lib/api/activities_api.dart b/lib/api/activities_api.dart new file mode 100644 index 0000000..3e67f1a --- /dev/null +++ b/lib/api/activities_api.dart @@ -0,0 +1,140 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class ActivitiesApi { + ActivitiesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Update activity + /// + /// Updates an activity's comment and, on success, returns the updated activity. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Activity id + /// + /// * [UpdateActivityRequest] updateActivityRequest: + Future updateActivityWithHttpInfo(int id, { UpdateActivityRequest? updateActivityRequest, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/activities/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = updateActivityRequest; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Update activity + /// + /// Updates an activity's comment and, on success, returns the updated activity. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Activity id + /// + /// * [UpdateActivityRequest] updateActivityRequest: + Future updateActivity(int id, { UpdateActivityRequest? updateActivityRequest, }) async { + final response = await updateActivityWithHttpInfo(id, updateActivityRequest: updateActivityRequest, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ActivityModel',) as ActivityModel; + + } + return null; + } + + /// View activity + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Activity id + Future viewActivityWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/activities/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View activity + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Activity id + Future viewActivity(int id,) async { + final response = await viewActivityWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ActivityModel',) as ActivityModel; + + } + return null; + } +} diff --git a/lib/api/attachments_api.dart b/lib/api/attachments_api.dart new file mode 100644 index 0000000..c50da12 --- /dev/null +++ b/lib/api/attachments_api.dart @@ -0,0 +1,514 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class AttachmentsApi { + AttachmentsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Add attachment to post + /// + /// Adds an attachment with the post as it's container. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the post to receive the attachment + Future addAttachmentToPostWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/posts/{id}/attachments' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Add attachment to post + /// + /// Adds an attachment with the post as it's container. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the post to receive the attachment + Future addAttachmentToPost(int id,) async { + final response = await addAttachmentToPostWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Add attachment to wiki page + /// + /// Adds an attachment with the wiki page as it's container. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the wiki page to receive the attachment + Future addAttachmentToWikiPageWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/wiki_pages/{id}/attachments' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Add attachment to wiki page + /// + /// Adds an attachment with the wiki page as it's container. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the wiki page to receive the attachment + Future addAttachmentToWikiPage(int id,) async { + final response = await addAttachmentToWikiPageWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Create Attachment + /// + /// Clients can create attachments without a container first and attach them later on. This is useful if the container does not exist at the time the attachment is uploaded. After the upload, the client can then claim such containerless attachments for any resource eligible (e.g. WorkPackage) on subsequent requests. The upload and the claiming *must* be done for the same user account. Attachments uploaded by another user cannot be claimed and once claimed for a resource, they cannot be claimed by another. The upload request must be of type `multipart/form-data` with exactly two parts. The first part *must* be called `metadata`. Its content type is expected to be `application/json`, the body *must* be a single JSON object, containing at least the `fileName` and optionally the attachments `description`. The second part *must* be called `file`, its content type *should* match the mime type of the file. The body *must* be the raw content of the file. Note that a `filename` *must* be indicated in the `Content-Disposition` of this part, although it will be ignored. Instead the `fileName` inside the JSON of the metadata part will be used. + /// + /// Note: This method returns the HTTP [Response]. + Future createAttachmentWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/attachments'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create Attachment + /// + /// Clients can create attachments without a container first and attach them later on. This is useful if the container does not exist at the time the attachment is uploaded. After the upload, the client can then claim such containerless attachments for any resource eligible (e.g. WorkPackage) on subsequent requests. The upload and the claiming *must* be done for the same user account. Attachments uploaded by another user cannot be claimed and once claimed for a resource, they cannot be claimed by another. The upload request must be of type `multipart/form-data` with exactly two parts. The first part *must* be called `metadata`. Its content type is expected to be `application/json`, the body *must* be a single JSON object, containing at least the `fileName` and optionally the attachments `description`. The second part *must* be called `file`, its content type *should* match the mime type of the file. The body *must* be the raw content of the file. Note that a `filename` *must* be indicated in the `Content-Disposition` of this part, although it will be ignored. Instead the `fileName` inside the JSON of the metadata part will be used. + Future createAttachment() async { + final response = await createAttachmentWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AttachmentModel',) as AttachmentModel; + + } + return null; + } + + /// Create work package attachment + /// + /// To add an attachment to a work package, a client needs to issue a request of type `multipart/form-data` with exactly two parts. The first part *must* be called `metadata`. Its content type is expected to be `application/json`, the body *must* be a single JSON object, containing at least the `fileName` and optionally the attachments `description`. The second part *must* be called `file`, its content type *should* match the mime type of the file. The body *must* be the raw content of the file. Note that a `filename` must be indicated in the `Content-Disposition` of this part, however it will be ignored. Instead the `fileName` inside the JSON of the metadata part will be used. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the work package to receive the attachment + Future createWorkPackageAttachmentWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/attachments' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create work package attachment + /// + /// To add an attachment to a work package, a client needs to issue a request of type `multipart/form-data` with exactly two parts. The first part *must* be called `metadata`. Its content type is expected to be `application/json`, the body *must* be a single JSON object, containing at least the `fileName` and optionally the attachments `description`. The second part *must* be called `file`, its content type *should* match the mime type of the file. The body *must* be the raw content of the file. Note that a `filename` must be indicated in the `Content-Disposition` of this part, however it will be ignored. Instead the `fileName` inside the JSON of the metadata part will be used. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the work package to receive the attachment + Future createWorkPackageAttachment(int id,) async { + final response = await createWorkPackageAttachmentWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AttachmentModel',) as AttachmentModel; + + } + return null; + } + + /// Delete attachment + /// + /// Permanently deletes the specified attachment. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Attachment id + Future deleteAttachmentWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/attachments/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Delete attachment + /// + /// Permanently deletes the specified attachment. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Attachment id + Future deleteAttachment(int id,) async { + final response = await deleteAttachmentWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// List attachments by post + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the post whose attachments will be listed + Future listAttachmentsByPostWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/posts/{id}/attachments' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List attachments by post + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the post whose attachments will be listed + Future listAttachmentsByPost(int id,) async { + final response = await listAttachmentsByPostWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AttachmentsModel',) as AttachmentsModel; + + } + return null; + } + + /// List attachments by wiki page + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the wiki page whose attachments will be listed + Future listAttachmentsByWikiPageWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/wiki_pages/{id}/attachments' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List attachments by wiki page + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the wiki page whose attachments will be listed + Future listAttachmentsByWikiPage(int id,) async { + final response = await listAttachmentsByWikiPageWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AttachmentsModel',) as AttachmentsModel; + + } + return null; + } + + /// List attachments by work package + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the work package whose attachments will be listed + Future listWorkPackageAttachmentsWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/attachments' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List attachments by work package + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the work package whose attachments will be listed + Future listWorkPackageAttachments(int id,) async { + final response = await listWorkPackageAttachmentsWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AttachmentsModel',) as AttachmentsModel; + + } + return null; + } + + /// View attachment + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Attachment id + Future viewAttachmentWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/attachments/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View attachment + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Attachment id + Future viewAttachment(int id,) async { + final response = await viewAttachmentWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AttachmentModel',) as AttachmentModel; + + } + return null; + } +} diff --git a/lib/api/budgets_api.dart b/lib/api/budgets_api.dart new file mode 100644 index 0000000..225c071 --- /dev/null +++ b/lib/api/budgets_api.dart @@ -0,0 +1,136 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class BudgetsApi { + BudgetsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// view Budget + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Budget id + Future viewBudgetWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/budgets/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// view Budget + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Budget id + Future viewBudget(int id,) async { + final response = await viewBudgetWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'BudgetModel',) as BudgetModel; + + } + return null; + } + + /// view Budgets of a Project + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future viewBudgetsOfAProjectWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/budgets' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// view Budgets of a Project + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future viewBudgetsOfAProject(int id,) async { + final response = await viewBudgetsOfAProjectWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } +} diff --git a/lib/api/categories_api.dart b/lib/api/categories_api.dart new file mode 100644 index 0000000..ff58976 --- /dev/null +++ b/lib/api/categories_api.dart @@ -0,0 +1,136 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class CategoriesApi { + CategoriesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// List categories of a project + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the project whose categories will be listed + Future listCategoriesOfAProjectWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/categories' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List categories of a project + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the project whose categories will be listed + Future listCategoriesOfAProject(int id,) async { + final response = await listCategoriesOfAProjectWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View Category + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Category id + Future viewCategoryWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/categories/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Category + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Category id + Future viewCategory(int id,) async { + final response = await viewCategoryWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'CategoryModel',) as CategoryModel; + + } + return null; + } +} diff --git a/lib/api/collections_api.dart b/lib/api/collections_api.dart new file mode 100644 index 0000000..eb99dbc --- /dev/null +++ b/lib/api/collections_api.dart @@ -0,0 +1,81 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class CollectionsApi { + CollectionsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// view aggregated result + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] groupBy: + /// The column to group by. Note: Aggregation is as of now only supported by the work package collection. You can pass any column name as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + /// + /// * [bool] showSums: + /// + Future viewAggregatedResultWithHttpInfo({ String? groupBy, bool? showSums, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/examples'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (groupBy != null) { + queryParams.addAll(_queryParams('', 'groupBy', groupBy)); + } + if (showSums != null) { + queryParams.addAll(_queryParams('', 'showSums', showSums)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// view aggregated result + /// + /// + /// + /// Parameters: + /// + /// * [String] groupBy: + /// The column to group by. Note: Aggregation is as of now only supported by the work package collection. You can pass any column name as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + /// + /// * [bool] showSums: + /// + Future viewAggregatedResult({ String? groupBy, bool? showSums, }) async { + final response = await viewAggregatedResultWithHttpInfo( groupBy: groupBy, showSums: showSums, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } +} diff --git a/lib/api/configuration_api.dart b/lib/api/configuration_api.dart new file mode 100644 index 0000000..5ebaf78 --- /dev/null +++ b/lib/api/configuration_api.dart @@ -0,0 +1,66 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class ConfigurationApi { + ConfigurationApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// View configuration + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future viewConfigurationWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/configuration'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View configuration + /// + /// + Future viewConfiguration() async { + final response = await viewConfigurationWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ConfigurationModel',) as ConfigurationModel; + + } + return null; + } +} diff --git a/lib/api/custom_actions_api.dart b/lib/api/custom_actions_api.dart new file mode 100644 index 0000000..9351d95 --- /dev/null +++ b/lib/api/custom_actions_api.dart @@ -0,0 +1,132 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class CustomActionsApi { + CustomActionsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Execute custom action + /// + /// A POST to this end point executes the custom action on the work package provided in the payload. The altered work package will be returned. In order to avoid executing the custom action unbeknown to a change that has already taken place, the client has to provide the work package's current lockVersion. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// The id of the custom action to execute + /// + /// * [ExecuteCustomActionRequest] executeCustomActionRequest: + Future executeCustomActionWithHttpInfo(int id, { ExecuteCustomActionRequest? executeCustomActionRequest, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/custom_actions/{id}/execute' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = executeCustomActionRequest; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Execute custom action + /// + /// A POST to this end point executes the custom action on the work package provided in the payload. The altered work package will be returned. In order to avoid executing the custom action unbeknown to a change that has already taken place, the client has to provide the work package's current lockVersion. + /// + /// Parameters: + /// + /// * [int] id (required): + /// The id of the custom action to execute + /// + /// * [ExecuteCustomActionRequest] executeCustomActionRequest: + Future executeCustomAction(int id, { ExecuteCustomActionRequest? executeCustomActionRequest, }) async { + final response = await executeCustomActionWithHttpInfo(id, executeCustomActionRequest: executeCustomActionRequest, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Get a custom action + /// + /// Retrieves a custom action by id. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// The id of the custom action to fetch + Future getCustomActionWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/custom_actions/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get a custom action + /// + /// Retrieves a custom action by id. + /// + /// Parameters: + /// + /// * [int] id (required): + /// The id of the custom action to fetch + Future getCustomAction(int id,) async { + final response = await getCustomActionWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'CustomActionModel',) as CustomActionModel; + + } + return null; + } +} diff --git a/lib/api/custom_options_api.dart b/lib/api/custom_options_api.dart new file mode 100644 index 0000000..03d036e --- /dev/null +++ b/lib/api/custom_options_api.dart @@ -0,0 +1,77 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class CustomOptionsApi { + CustomOptionsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// View Custom Option + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// The custom option's identifier + Future viewCustomOptionWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/custom_options/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Custom Option + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// The custom option's identifier + Future viewCustomOption(int id,) async { + final response = await viewCustomOptionWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'CustomOptionModel',) as CustomOptionModel; + + } + return null; + } +} diff --git a/lib/api/documents_api.dart b/lib/api/documents_api.dart new file mode 100644 index 0000000..efa28b5 --- /dev/null +++ b/lib/api/documents_api.dart @@ -0,0 +1,157 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class DocumentsApi { + DocumentsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// List Documents + /// + /// The documents returned depend on the provided parameters and also on the requesting user's permissions. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + created_at: Sort by document creation datetime + Future listDocumentsWithHttpInfo({ int? offset, int? pageSize, String? sortBy, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/documents'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (offset != null) { + queryParams.addAll(_queryParams('', 'offset', offset)); + } + if (pageSize != null) { + queryParams.addAll(_queryParams('', 'pageSize', pageSize)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List Documents + /// + /// The documents returned depend on the provided parameters and also on the requesting user's permissions. + /// + /// Parameters: + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + created_at: Sort by document creation datetime + Future listDocuments({ int? offset, int? pageSize, String? sortBy, }) async { + final response = await listDocumentsWithHttpInfo( offset: offset, pageSize: pageSize, sortBy: sortBy, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View document + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Document id + Future viewDocumentWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/documents/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View document + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Document id + Future viewDocument(int id,) async { + final response = await viewDocumentWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DocumentModel',) as DocumentModel; + + } + return null; + } +} diff --git a/lib/api/file_links_api.dart b/lib/api/file_links_api.dart new file mode 100644 index 0000000..52e862c --- /dev/null +++ b/lib/api/file_links_api.dart @@ -0,0 +1,917 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class FileLinksApi { + FileLinksApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Creates a storage. + /// + /// Creates a storage resource. When creating a storage, a confidential OAuth 2 provider application is created automatically. The oauth client id and secret of the created OAuth application are returned in the response. **IMPORTANT:** This is the only time, the oauth client secret is visible to the consumer. After that, the secret is hidden. To update the storage with OAuth client credentials, which enable the storage resource to behave as an OAuth 2 client against an external OAuth 2 provider application, another request must be made to create those, see `POST /api/v3/storages/{id}/oauth_client_credentials`. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [StorageWriteModel] storageWriteModel: + Future createStorageWithHttpInfo({ StorageWriteModel? storageWriteModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/storages'; + + // ignore: prefer_final_locals + Object? postBody = storageWriteModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Creates a storage. + /// + /// Creates a storage resource. When creating a storage, a confidential OAuth 2 provider application is created automatically. The oauth client id and secret of the created OAuth application are returned in the response. **IMPORTANT:** This is the only time, the oauth client secret is visible to the consumer. After that, the secret is hidden. To update the storage with OAuth client credentials, which enable the storage resource to behave as an OAuth 2 client against an external OAuth 2 provider application, another request must be made to create those, see `POST /api/v3/storages/{id}/oauth_client_credentials`. + /// + /// Parameters: + /// + /// * [StorageWriteModel] storageWriteModel: + Future createStorage({ StorageWriteModel? storageWriteModel, }) async { + final response = await createStorageWithHttpInfo( storageWriteModel: storageWriteModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StorageReadModel',) as StorageReadModel; + + } + return null; + } + + /// Creates an oauth client credentials object for a storage. + /// + /// Inserts the OAuth 2 credentials into the storage, to allow the storage to act as an OAuth 2 client. Calling this endpoint on a storage that already contains OAuth 2 client credentials will replace them. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Storage id + /// + /// * [OAuthClientCredentialsWriteModel] oAuthClientCredentialsWriteModel: + Future createStorageOauthCredentialsWithHttpInfo(int id, { OAuthClientCredentialsWriteModel? oAuthClientCredentialsWriteModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/storages/{id}/oauth_client_credentials' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = oAuthClientCredentialsWriteModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Creates an oauth client credentials object for a storage. + /// + /// Inserts the OAuth 2 credentials into the storage, to allow the storage to act as an OAuth 2 client. Calling this endpoint on a storage that already contains OAuth 2 client credentials will replace them. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Storage id + /// + /// * [OAuthClientCredentialsWriteModel] oAuthClientCredentialsWriteModel: + Future createStorageOauthCredentials(int id, { OAuthClientCredentialsWriteModel? oAuthClientCredentialsWriteModel, }) async { + final response = await createStorageOauthCredentialsWithHttpInfo(id, oAuthClientCredentialsWriteModel: oAuthClientCredentialsWriteModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StorageReadModel',) as StorageReadModel; + + } + return null; + } + + /// Creates file links. + /// + /// Creates file links on a work package. The request is interpreted as a bulk insert, where every element of the collection is validated separately. Each element contains the origin meta data and a link to the storage, the file link is about to point to. The storage link can be provided as a resource link with id or as the host url. The file's id and name are considered mandatory information. The rest of the origin meta data SHOULD be provided by the client. The _mimeType_ SHOULD be a standard mime type. An empty mime type will be handled as unknown. To link a folder, the custom mime type `application/x-op-directory` MUST be used. Up to 20 file links can be submitted at once. If any element data is invalid, no file links will be created. If a file link with matching origin id, work package, and storage already exists, then it will not create an additional file link or update the meta data. Instead the information from the existing file link will be returned. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [FileLinkCollectionWriteModel] fileLinkCollectionWriteModel: + Future createWorkPackageFileLinkWithHttpInfo(int id, { FileLinkCollectionWriteModel? fileLinkCollectionWriteModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/file_links' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = fileLinkCollectionWriteModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Creates file links. + /// + /// Creates file links on a work package. The request is interpreted as a bulk insert, where every element of the collection is validated separately. Each element contains the origin meta data and a link to the storage, the file link is about to point to. The storage link can be provided as a resource link with id or as the host url. The file's id and name are considered mandatory information. The rest of the origin meta data SHOULD be provided by the client. The _mimeType_ SHOULD be a standard mime type. An empty mime type will be handled as unknown. To link a folder, the custom mime type `application/x-op-directory` MUST be used. Up to 20 file links can be submitted at once. If any element data is invalid, no file links will be created. If a file link with matching origin id, work package, and storage already exists, then it will not create an additional file link or update the meta data. Instead the information from the existing file link will be returned. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [FileLinkCollectionWriteModel] fileLinkCollectionWriteModel: + Future createWorkPackageFileLink(int id, { FileLinkCollectionWriteModel? fileLinkCollectionWriteModel, }) async { + final response = await createWorkPackageFileLinkWithHttpInfo(id, fileLinkCollectionWriteModel: fileLinkCollectionWriteModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'FileLinkCollectionReadModel',) as FileLinkCollectionReadModel; + + } + return null; + } + + /// Removes a file link. + /// + /// Removes a file link on a work package. The request contains only the file link identifier as a path parameter. No request body is needed. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// File link id + Future deleteFileLinkWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/file_links/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Removes a file link. + /// + /// Removes a file link on a work package. The request contains only the file link identifier as a path parameter. No request body is needed. + /// + /// Parameters: + /// + /// * [int] id (required): + /// File link id + Future deleteFileLink(int id,) async { + final response = await deleteFileLinkWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Delete a storage + /// + /// Deletes a storage resource. This also deletes all related records, like the created oauth application, client, and any file links created within this storage. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Storage id + Future deleteStorageWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/storages/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Delete a storage + /// + /// Deletes a storage resource. This also deletes all related records, like the created oauth application, client, and any file links created within this storage. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Storage id + Future deleteStorage(int id,) async { + final response = await deleteStorageWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Creates a download uri of the linked file. + /// + /// Creates a uri to download the origin file linked by the given file link. This uri depends on the storage type and is always located on the origin storage itself. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// File link id + Future downloadFileLinkWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/file_links/{id}/download' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Creates a download uri of the linked file. + /// + /// Creates a uri to download the origin file linked by the given file link. This uri depends on the storage type and is always located on the origin storage itself. + /// + /// Parameters: + /// + /// * [int] id (required): + /// File link id + Future downloadFileLink(int id,) async { + final response = await downloadFileLinkWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Gets a project storage + /// + /// Gets a project storage resource. This resource contains all data that is applicable on the relation between a storage and a project. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project storage id + Future getProjectStorageWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/project_storages/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Gets a project storage + /// + /// Gets a project storage resource. This resource contains all data that is applicable on the relation between a storage and a project. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project storage id + Future getProjectStorage(int id,) async { + final response = await getProjectStorageWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ProjectStorageModel',) as ProjectStorageModel; + + } + return null; + } + + /// Get a storage + /// + /// Gets a storage resource. As a side effect, a live connection to the storages origin is established to retrieve connection state data. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Storage id + Future getStorageWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/storages/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get a storage + /// + /// Gets a storage resource. As a side effect, a live connection to the storages origin is established to retrieve connection state data. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Storage id + Future getStorage(int id,) async { + final response = await getStorageWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StorageReadModel',) as StorageReadModel; + + } + return null; + } + + /// Gets files of a storage. + /// + /// Gets a collection of files from a storage. If no `parent` context is given, the result is the content of the document root. With `parent` context given, the result contains the collections of files/directories from within the given parent file id. If given `parent` context is no directory, `400 Bad Request` is returned. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Storage id + /// + /// * [String] parent: + /// Parent file identification + Future getStorageFilesWithHttpInfo(int id, { String? parent, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/storages/{id}/files' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (parent != null) { + queryParams.addAll(_queryParams('', 'parent', parent)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Gets files of a storage. + /// + /// Gets a collection of files from a storage. If no `parent` context is given, the result is the content of the document root. With `parent` context given, the result contains the collections of files/directories from within the given parent file id. If given `parent` context is no directory, `400 Bad Request` is returned. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Storage id + /// + /// * [String] parent: + /// Parent file identification + Future getStorageFiles(int id, { String? parent, }) async { + final response = await getStorageFilesWithHttpInfo(id, parent: parent, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StorageFilesModel',) as StorageFilesModel; + + } + return null; + } + + /// Gets a list of project storages + /// + /// Gets a collection of all project storages that meet the provided filters and the user has permission to see them. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: - project_id - storage_id + Future listProjectStoragesWithHttpInfo({ String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/project_storages'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Gets a list of project storages + /// + /// Gets a collection of all project storages that meet the provided filters and the user has permission to see them. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: - project_id - storage_id + Future listProjectStorages({ String? filters, }) async { + final response = await listProjectStoragesWithHttpInfo( filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ProjectStorageCollectionModel',) as ProjectStorageCollectionModel; + + } + return null; + } + + /// Gets all file links of a work package + /// + /// Gets all file links of a work package. As a side effect, for every file link a request is sent to the storage's origin to fetch live data and patch the file link's data before returning, as well as retrieving permissions of the user on this origin file. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. The following filters are supported: - storage + Future listWorkPackageFileLinksWithHttpInfo(int id, { String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/file_links' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Gets all file links of a work package + /// + /// Gets all file links of a work package. As a side effect, for every file link a request is sent to the storage's origin to fetch live data and patch the file link's data before returning, as well as retrieving permissions of the user on this origin file. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. The following filters are supported: - storage + Future listWorkPackageFileLinks(int id, { String? filters, }) async { + final response = await listWorkPackageFileLinksWithHttpInfo(id, filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'FileLinkCollectionReadModel',) as FileLinkCollectionReadModel; + + } + return null; + } + + /// Creates an opening uri of the linked file. + /// + /// Creates a uri to open the origin file linked by the given file link. This uri depends on the storage type and is always located on the origin storage itself. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// File link id + /// + /// * [bool] location: + /// Boolean flag indicating, if the file should be opened directly or rather the directory location. + Future openFileLinkWithHttpInfo(int id, { bool? location, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/file_links/{id}/open' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (location != null) { + queryParams.addAll(_queryParams('', 'location', location)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Creates an opening uri of the linked file. + /// + /// Creates a uri to open the origin file linked by the given file link. This uri depends on the storage type and is always located on the origin storage itself. + /// + /// Parameters: + /// + /// * [int] id (required): + /// File link id + /// + /// * [bool] location: + /// Boolean flag indicating, if the file should be opened directly or rather the directory location. + Future openFileLink(int id, { bool? location, }) async { + final response = await openFileLinkWithHttpInfo(id, location: location, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Preparation of a direct upload of a file to the given storage. + /// + /// Executes a request that prepares a link for a direct upload to the storage. The background here is, that the client needs to make a direct request to the storage instance for file uploading, but should not get access to the credentials, which are stored in the backend. The response contains a link object, that enables the client to execute a file upload without the real credentials. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Storage id + /// + /// * [StorageFileUploadPreparationModel] storageFileUploadPreparationModel: + Future prepareStorageFileUploadWithHttpInfo(int id, { StorageFileUploadPreparationModel? storageFileUploadPreparationModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/storages/{id}/files/prepare_upload' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = storageFileUploadPreparationModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Preparation of a direct upload of a file to the given storage. + /// + /// Executes a request that prepares a link for a direct upload to the storage. The background here is, that the client needs to make a direct request to the storage instance for file uploading, but should not get access to the credentials, which are stored in the backend. The response contains a link object, that enables the client to execute a file upload without the real credentials. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Storage id + /// + /// * [StorageFileUploadPreparationModel] storageFileUploadPreparationModel: + Future prepareStorageFileUpload(int id, { StorageFileUploadPreparationModel? storageFileUploadPreparationModel, }) async { + final response = await prepareStorageFileUploadWithHttpInfo(id, storageFileUploadPreparationModel: storageFileUploadPreparationModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StorageFileUploadLinkModel',) as StorageFileUploadLinkModel; + + } + return null; + } + + /// Update a storage + /// + /// Updates a storage resource. Only data that is not generated by the server can be updated. This excludes the OAuth 2 application data. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Storage id + /// + /// * [StorageWriteModel] storageWriteModel: + Future updateStorageWithHttpInfo(int id, { StorageWriteModel? storageWriteModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/storages/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = storageWriteModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Update a storage + /// + /// Updates a storage resource. Only data that is not generated by the server can be updated. This excludes the OAuth 2 application data. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Storage id + /// + /// * [StorageWriteModel] storageWriteModel: + Future updateStorage(int id, { StorageWriteModel? storageWriteModel, }) async { + final response = await updateStorageWithHttpInfo(id, storageWriteModel: storageWriteModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StorageReadModel',) as StorageReadModel; + + } + return null; + } + + /// Gets a file link. + /// + /// Gets a single file link resource of a work package. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// File link id + Future viewFileLinkWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/file_links/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Gets a file link. + /// + /// Gets a single file link resource of a work package. + /// + /// Parameters: + /// + /// * [int] id (required): + /// File link id + Future viewFileLink(int id,) async { + final response = await viewFileLinkWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'FileLinkReadModel',) as FileLinkReadModel; + + } + return null; + } +} diff --git a/lib/api/forms_api.dart b/lib/api/forms_api.dart new file mode 100644 index 0000000..70ee745 --- /dev/null +++ b/lib/api/forms_api.dart @@ -0,0 +1,74 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class FormsApi { + FormsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// show or validate form + /// + /// This is an example of how a form might look like. Note that this endpoint does not exist in the actual implementation. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [ShowOrValidateFormRequest] showOrValidateFormRequest: + Future showOrValidateFormWithHttpInfo({ ShowOrValidateFormRequest? showOrValidateFormRequest, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/example/form'; + + // ignore: prefer_final_locals + Object? postBody = showOrValidateFormRequest; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// show or validate form + /// + /// This is an example of how a form might look like. Note that this endpoint does not exist in the actual implementation. + /// + /// Parameters: + /// + /// * [ShowOrValidateFormRequest] showOrValidateFormRequest: + Future showOrValidateForm({ ShowOrValidateFormRequest? showOrValidateFormRequest, }) async { + final response = await showOrValidateFormWithHttpInfo( showOrValidateFormRequest: showOrValidateFormRequest, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } +} diff --git a/lib/api/grids_api.dart b/lib/api/grids_api.dart new file mode 100644 index 0000000..f3603a3 --- /dev/null +++ b/lib/api/grids_api.dart @@ -0,0 +1,375 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class GridsApi { + GridsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Create a grid + /// + /// Creates a new grid applying the attributes provided in the body. The constraints applied to the grid depend on the page the grid is placed in which is why the create form end point should be used to be guided when wanting to create a grid. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [GridWriteModel] gridWriteModel: + Future createGridWithHttpInfo({ GridWriteModel? gridWriteModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/grids'; + + // ignore: prefer_final_locals + Object? postBody = gridWriteModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create a grid + /// + /// Creates a new grid applying the attributes provided in the body. The constraints applied to the grid depend on the page the grid is placed in which is why the create form end point should be used to be guided when wanting to create a grid. + /// + /// Parameters: + /// + /// * [GridWriteModel] gridWriteModel: + Future createGrid({ GridWriteModel? gridWriteModel, }) async { + final response = await createGridWithHttpInfo( gridWriteModel: gridWriteModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'GridReadModel',) as GridReadModel; + + } + return null; + } + + /// Get a grid + /// + /// Fetches a single grid identified by its id. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Grid id + Future getGridWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/grids/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get a grid + /// + /// Fetches a single grid identified by its id. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Grid id + Future getGrid(int id,) async { + final response = await getGridWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'GridReadModel',) as GridReadModel; + + } + return null; + } + + /// Grid Create Form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future gridCreateFormWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/grids/form'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Grid Create Form + /// + /// + Future gridCreateForm() async { + final response = await gridCreateFormWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Grid Update Form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the grid being modified + Future gridUpdateFormWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/grids/{id}/form' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Grid Update Form + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the grid being modified + Future gridUpdateForm(int id,) async { + final response = await gridUpdateFormWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// List grids + /// + /// Lists all grids matching the provided filters and being part of the selected query page. The grids returned will also depend on the permissions of the requesting user. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: - page: Filter grid by work package + Future listGridsWithHttpInfo({ int? offset, int? pageSize, String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/grids'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (offset != null) { + queryParams.addAll(_queryParams('', 'offset', offset)); + } + if (pageSize != null) { + queryParams.addAll(_queryParams('', 'pageSize', pageSize)); + } + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List grids + /// + /// Lists all grids matching the provided filters and being part of the selected query page. The grids returned will also depend on the permissions of the requesting user. + /// + /// Parameters: + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: - page: Filter grid by work package + Future listGrids({ int? offset, int? pageSize, String? filters, }) async { + final response = await listGridsWithHttpInfo( offset: offset, pageSize: pageSize, filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'GridCollectionModel',) as GridCollectionModel; + + } + return null; + } + + /// Update a grid + /// + /// Updates the given grid by applying the attributes provided in the body. The constraints applied to the grid depend on the page the grid is placed in which is why the create form end point should be used to be guided when wanting to update a grid. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the grid being modified + /// + /// * [GridWriteModel] gridWriteModel: + Future updateGridWithHttpInfo(int id, { GridWriteModel? gridWriteModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/grids/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = gridWriteModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Update a grid + /// + /// Updates the given grid by applying the attributes provided in the body. The constraints applied to the grid depend on the page the grid is placed in which is why the create form end point should be used to be guided when wanting to update a grid. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the grid being modified + /// + /// * [GridWriteModel] gridWriteModel: + Future updateGrid(int id, { GridWriteModel? gridWriteModel, }) async { + final response = await updateGridWithHttpInfo(id, gridWriteModel: gridWriteModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'GridReadModel',) as GridReadModel; + + } + return null; + } +} diff --git a/lib/api/groups_api.dart b/lib/api/groups_api.dart new file mode 100644 index 0000000..996e15c --- /dev/null +++ b/lib/api/groups_api.dart @@ -0,0 +1,318 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class GroupsApi { + GroupsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Create group + /// + /// Creates a new group applying the attributes provided in the body. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [GroupWriteModel] groupWriteModel: + Future createGroupWithHttpInfo({ GroupWriteModel? groupWriteModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/groups'; + + // ignore: prefer_final_locals + Object? postBody = groupWriteModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create group + /// + /// Creates a new group applying the attributes provided in the body. + /// + /// Parameters: + /// + /// * [GroupWriteModel] groupWriteModel: + Future createGroup({ GroupWriteModel? groupWriteModel, }) async { + final response = await createGroupWithHttpInfo( groupWriteModel: groupWriteModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'GroupModel',) as GroupModel; + + } + return null; + } + + /// Delete group + /// + /// Deletes the group. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Group id + Future deleteGroupWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/groups/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Delete group + /// + /// Deletes the group. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Group id + Future deleteGroup(int id,) async { + final response = await deleteGroupWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Get group + /// + /// Fetches a group resource. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Group id + Future getGroupWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/groups/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get group + /// + /// Fetches a group resource. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Group id + Future getGroup(int id,) async { + final response = await getGroupWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'GroupModel',) as GroupModel; + + } + return null; + } + + /// List groups + /// + /// Returns a collection of groups. The client can choose to filter the groups similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain groups, for which the requesting client has sufficient permissions (*view_members*, *manage_members*). + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + created_at: Sort by group creation datetime + updated_at: Sort by the time the group was updated last + /// + /// * [String] select: + /// Comma separated list of properties to include. + Future listGroupsWithHttpInfo({ String? sortBy, String? select, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/groups'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + if (select != null) { + queryParams.addAll(_queryParams('', 'select', select)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List groups + /// + /// Returns a collection of groups. The client can choose to filter the groups similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain groups, for which the requesting client has sufficient permissions (*view_members*, *manage_members*). + /// + /// Parameters: + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + created_at: Sort by group creation datetime + updated_at: Sort by the time the group was updated last + /// + /// * [String] select: + /// Comma separated list of properties to include. + Future listGroups({ String? sortBy, String? select, }) async { + final response = await listGroupsWithHttpInfo( sortBy: sortBy, select: select, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'GroupCollectionModel',) as GroupCollectionModel; + + } + return null; + } + + /// Update group + /// + /// Updates the given group by applying the attributes provided in the body. Please note that the `members` array provided will override the existing set of members (similar to a PUT). A client thus has to provide the complete list of members the group is to have after the PATCH even if only one member is to be added. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Group id + /// + /// * [GroupWriteModel] groupWriteModel: + Future updateGroupWithHttpInfo(int id, { GroupWriteModel? groupWriteModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/groups/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = groupWriteModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Update group + /// + /// Updates the given group by applying the attributes provided in the body. Please note that the `members` array provided will override the existing set of members (similar to a PUT). A client thus has to provide the complete list of members the group is to have after the PATCH even if only one member is to be added. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Group id + /// + /// * [GroupWriteModel] groupWriteModel: + Future updateGroup(int id, { GroupWriteModel? groupWriteModel, }) async { + final response = await updateGroupWithHttpInfo(id, groupWriteModel: groupWriteModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'GroupModel',) as GroupModel; + + } + return null; + } +} diff --git a/lib/api/help_texts_api.dart b/lib/api/help_texts_api.dart new file mode 100644 index 0000000..9893410 --- /dev/null +++ b/lib/api/help_texts_api.dart @@ -0,0 +1,125 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class HelpTextsApi { + HelpTextsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Get help text + /// + /// Fetches the help text from the given id. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Help text id + Future getHelpTextWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/help_texts/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get help text + /// + /// Fetches the help text from the given id. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Help text id + Future getHelpText(int id,) async { + final response = await getHelpTextWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'HelpTextModel',) as HelpTextModel; + + } + return null; + } + + /// List help texts + /// + /// List the complete collection of help texts. + /// + /// Note: This method returns the HTTP [Response]. + Future listHelpTextsWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/help_texts'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List help texts + /// + /// List the complete collection of help texts. + Future listHelpTexts() async { + final response = await listHelpTextsWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'HelpTextCollectionModel',) as HelpTextCollectionModel; + + } + return null; + } +} diff --git a/lib/api/memberships_api.dart b/lib/api/memberships_api.dart new file mode 100644 index 0000000..2f1fbe9 --- /dev/null +++ b/lib/api/memberships_api.dart @@ -0,0 +1,493 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class MembershipsApi { + MembershipsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Available projects for memberships + /// + /// Gets a list of projects in which a membership can be created in. The list contains all projects in which the user issuing the request has the manage members permissions. + /// + /// Note: This method returns the HTTP [Response]. + Future availableProjectsForMembershipsWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/memberships/available_projects'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Available projects for memberships + /// + /// Gets a list of projects in which a membership can be created in. The list contains all projects in which the user issuing the request has the manage members permissions. + Future availableProjectsForMemberships() async { + final response = await availableProjectsForMembershipsWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Create membership + /// + /// Creates a new membership applying the attributes provided in the body. You can use the form and schema to retrieve the valid attribute values and by that be guided towards successful creation. By providing a `notificationMessage` within the `_meta` block of the payload, the client can include a customized message to the user of the newly created membership. In case of a group, the message will be sent to every user belonging to the group. By including `{ \"sendNotifications\": false }` within the `_meta` block of the payload, no notifications is send out at all. + /// + /// Note: This method returns the HTTP [Response]. + Future createMembershipWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/memberships'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create membership + /// + /// Creates a new membership applying the attributes provided in the body. You can use the form and schema to retrieve the valid attribute values and by that be guided towards successful creation. By providing a `notificationMessage` within the `_meta` block of the payload, the client can include a customized message to the user of the newly created membership. In case of a group, the message will be sent to every user belonging to the group. By including `{ \"sendNotifications\": false }` within the `_meta` block of the payload, no notifications is send out at all. + Future createMembership() async { + final response = await createMembershipWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Delete membership + /// + /// Deletes the membership. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Membership id + Future deleteMembershipWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/memberships/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Delete membership + /// + /// Deletes the membership. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Membership id + Future deleteMembership(int id,) async { + final response = await deleteMembershipWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// List memberships + /// + /// Returns a collection of memberships. The client can choose to filter the memberships similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain memberships, for which the requesting client has sufficient permissions (*view_members*, *manage_members*). + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + any_name_attribute: filters memberships based on the name of the principal. All possible name variants (and also email and login) are searched. + blocked: reduces the result set to all memberships that are temporarily blocked or that are not blocked temporarily. + group: filters memberships based on the name of a group. The group however is not the principal used for filtering. Rather, the memberships of the group are used as the filter values. + name: filters memberships based on the name of the principal. Note that only the name is used which depends on a setting in the OpenProject instance. + principal: filters memberships based on the id of the principal. + project: filters memberships based on the id of the project. + role: filters memberships based on the id of any role assigned to the membership. + status: filters memberships based on the status of the principal. + created_at: filters memberships based on the time the membership was created. + updated_at: filters memberships based on the time the membership was updated last. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + name: Sort by the name of the principal. Note that this depends on the setting for how the name is to be displayed at least for users. + email: Sort by the email address of the principal. Groups and principal users, which do not have an email, are sorted last. + status: Sort by the status of the principal. Groups and principal users, which do not have a status, are sorted together with the active users. + created_at: Sort by membership creation datetime + updated_at: Sort by the time the membership was updated last + Future listMembershipsWithHttpInfo({ String? filters, String? sortBy, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/memberships'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List memberships + /// + /// Returns a collection of memberships. The client can choose to filter the memberships similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain memberships, for which the requesting client has sufficient permissions (*view_members*, *manage_members*). + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + any_name_attribute: filters memberships based on the name of the principal. All possible name variants (and also email and login) are searched. + blocked: reduces the result set to all memberships that are temporarily blocked or that are not blocked temporarily. + group: filters memberships based on the name of a group. The group however is not the principal used for filtering. Rather, the memberships of the group are used as the filter values. + name: filters memberships based on the name of the principal. Note that only the name is used which depends on a setting in the OpenProject instance. + principal: filters memberships based on the id of the principal. + project: filters memberships based on the id of the project. + role: filters memberships based on the id of any role assigned to the membership. + status: filters memberships based on the status of the principal. + created_at: filters memberships based on the time the membership was created. + updated_at: filters memberships based on the time the membership was updated last. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + name: Sort by the name of the principal. Note that this depends on the setting for how the name is to be displayed at least for users. + email: Sort by the email address of the principal. Groups and principal users, which do not have an email, are sorted last. + status: Sort by the status of the principal. Groups and principal users, which do not have a status, are sorted together with the active users. + created_at: Sort by membership creation datetime + updated_at: Sort by the time the membership was updated last + Future listMemberships({ String? filters, String? sortBy, }) async { + final response = await listMembershipsWithHttpInfo( filters: filters, sortBy: sortBy, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Membership create form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future membershipCreateFormWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/memberships/form'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Membership create form + /// + /// + Future membershipCreateForm() async { + final response = await membershipCreateFormWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Membership update form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Membership id + Future membershipUpdateFormWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/memberships/{id}/form' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Membership update form + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Membership id + Future membershipUpdateForm(int id,) async { + final response = await membershipUpdateFormWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Update membership + /// + /// Updates the given membership by applying the attributes provided in the body. By providing a `notificationMessage` within the `_meta` block of the payload, the client can include a customized message to the user of the updated membership. In case of a group, the message will be sent to every user belonging to the group. By including `{ \"sendNotifications\": false }` within the `_meta` block of the payload, no notifications is send out at all. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Membership id + Future updateMembershipWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/memberships/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Update membership + /// + /// Updates the given membership by applying the attributes provided in the body. By providing a `notificationMessage` within the `_meta` block of the payload, the client can include a customized message to the user of the updated membership. In case of a group, the message will be sent to every user belonging to the group. By including `{ \"sendNotifications\": false }` within the `_meta` block of the payload, no notifications is send out at all. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Membership id + Future updateMembership(int id,) async { + final response = await updateMembershipWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View membership + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Membership id + Future viewMembershipWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/memberships/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View membership + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Membership id + Future viewMembership(int id,) async { + final response = await viewMembershipWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View membership schema + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future viewMembershipSchemaWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/memberships/schema'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View membership schema + /// + /// + Future viewMembershipSchema() async { + final response = await viewMembershipSchemaWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } +} diff --git a/lib/api/news_api.dart b/lib/api/news_api.dart new file mode 100644 index 0000000..8f34697 --- /dev/null +++ b/lib/api/news_api.dart @@ -0,0 +1,166 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class NewsApi { + NewsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// List News + /// + /// Lists news. The news returned depend on the provided parameters and also on the requesting user's permissions. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + created_at: Sort by news creation datetime + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + project_id: Filter news by project + Future listNewsWithHttpInfo({ int? offset, int? pageSize, String? sortBy, String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/news'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (offset != null) { + queryParams.addAll(_queryParams('', 'offset', offset)); + } + if (pageSize != null) { + queryParams.addAll(_queryParams('', 'pageSize', pageSize)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List News + /// + /// Lists news. The news returned depend on the provided parameters and also on the requesting user's permissions. + /// + /// Parameters: + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + created_at: Sort by news creation datetime + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + project_id: Filter news by project + Future listNews({ int? offset, int? pageSize, String? sortBy, String? filters, }) async { + final response = await listNewsWithHttpInfo( offset: offset, pageSize: pageSize, sortBy: sortBy, filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View news + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// news id + Future viewNewsWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/news/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View news + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// news id + Future viewNews(int id,) async { + final response = await viewNewsWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NewsModel',) as NewsModel; + + } + return null; + } +} diff --git a/lib/api/notifications_api.dart b/lib/api/notifications_api.dart new file mode 100644 index 0000000..3daeca6 --- /dev/null +++ b/lib/api/notifications_api.dart @@ -0,0 +1,451 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class NotificationsApi { + NotificationsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Get notification collection + /// + /// Returns the collection of available in-app notifications. The notifications returned depend on the provided parameters and also on the requesting user's permissions. Contrary to most collections, this one also links to and embeds schemas for the `details` properties of the notifications returned. This is an optimization. Clients will receive the information necessary to display the various types of details that a notification can carry. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + reason: Sort by notification reason + readIAN: Sort by read status + /// + /// * [String] groupBy: + /// string specifying group_by criteria. + reason: Group by notification reason + project: Sort by associated project + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Filter by primary key + project: Filter by the project the notification was created in + readIAN: Filter by read status + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the `resourceType` filter. + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with the `resourceId` filter. + Future listNotificationsWithHttpInfo({ int? offset, int? pageSize, String? sortBy, String? groupBy, String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/notifications'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (offset != null) { + queryParams.addAll(_queryParams('', 'offset', offset)); + } + if (pageSize != null) { + queryParams.addAll(_queryParams('', 'pageSize', pageSize)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + if (groupBy != null) { + queryParams.addAll(_queryParams('', 'groupBy', groupBy)); + } + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get notification collection + /// + /// Returns the collection of available in-app notifications. The notifications returned depend on the provided parameters and also on the requesting user's permissions. Contrary to most collections, this one also links to and embeds schemas for the `details` properties of the notifications returned. This is an optimization. Clients will receive the information necessary to display the various types of details that a notification can carry. + /// + /// Parameters: + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + reason: Sort by notification reason + readIAN: Sort by read status + /// + /// * [String] groupBy: + /// string specifying group_by criteria. + reason: Group by notification reason + project: Sort by associated project + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Filter by primary key + project: Filter by the project the notification was created in + readIAN: Filter by read status + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the `resourceType` filter. + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with the `resourceId` filter. + Future listNotifications({ int? offset, int? pageSize, String? sortBy, String? groupBy, String? filters, }) async { + final response = await listNotificationsWithHttpInfo( offset: offset, pageSize: pageSize, sortBy: sortBy, groupBy: groupBy, filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NotificationCollectionModel',) as NotificationCollectionModel; + + } + return null; + } + + /// Read notification + /// + /// Marks the given notification as read. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// notification id + Future readNotificationWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/notifications/{id}/read_ian' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Read notification + /// + /// Marks the given notification as read. + /// + /// Parameters: + /// + /// * [int] id (required): + /// notification id + Future readNotification(int id,) async { + final response = await readNotificationWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Read all notifications + /// + /// Marks the whole notification collection as read. The collection contains only elements the authenticated user can see, and can be further reduced with filters. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Filter by primary key + project: Filter by the project the notification was created in + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the `resourceType` filter. + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with the `resourceId` filter. + Future readNotificationsWithHttpInfo({ String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/notifications/read_ian'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Read all notifications + /// + /// Marks the whole notification collection as read. The collection contains only elements the authenticated user can see, and can be further reduced with filters. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Filter by primary key + project: Filter by the project the notification was created in + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the `resourceType` filter. + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with the `resourceId` filter. + Future readNotifications({ String? filters, }) async { + final response = await readNotificationsWithHttpInfo( filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Unread notification + /// + /// Marks the given notification as unread. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// notification id + Future unreadNotificationWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/notifications/{id}/unread_ian' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Unread notification + /// + /// Marks the given notification as unread. + /// + /// Parameters: + /// + /// * [int] id (required): + /// notification id + Future unreadNotification(int id,) async { + final response = await unreadNotificationWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Unread all notifications + /// + /// Marks the whole notification collection as unread. The collection contains only elements the authenticated user can see, and can be further reduced with filters. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Filter by primary key + project: Filter by the project the notification was created in + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the `resourceType` filter. + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with the `resourceId` filter. + Future unreadNotificationsWithHttpInfo({ String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/notifications/unread_ian'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Unread all notifications + /// + /// Marks the whole notification collection as unread. The collection contains only elements the authenticated user can see, and can be further reduced with filters. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: Filter by primary key + project: Filter by the project the notification was created in + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the `resourceType` filter. + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with the `resourceId` filter. + Future unreadNotifications({ String? filters, }) async { + final response = await unreadNotificationsWithHttpInfo( filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Get the notification + /// + /// Returns the notification identified by the notification id. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// notification id + Future viewNotificationWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/notifications/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get the notification + /// + /// Returns the notification identified by the notification id. + /// + /// Parameters: + /// + /// * [int] id (required): + /// notification id + Future viewNotification(int id,) async { + final response = await viewNotificationWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NotificationModel',) as NotificationModel; + + } + return null; + } + + /// Get a notification detail + /// + /// Returns an individual detail of a notification identified by the notification id and the id of the detail. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] notificationId (required): + /// notification id + /// + /// * [int] id (required): + /// detail id + Future viewNotificationDetailWithHttpInfo(int notificationId, int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/notifications/{notification_id}/details/{id}' + .replaceAll('{notification_id}', notificationId.toString()) + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get a notification detail + /// + /// Returns an individual detail of a notification identified by the notification id and the id of the detail. + /// + /// Parameters: + /// + /// * [int] notificationId (required): + /// notification id + /// + /// * [int] id (required): + /// detail id + Future viewNotificationDetail(int notificationId, int id,) async { + final response = await viewNotificationDetailWithHttpInfo(notificationId, id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ValuesPropertyModel',) as ValuesPropertyModel; + + } + return null; + } +} diff --git a/lib/api/o_auth2_api.dart b/lib/api/o_auth2_api.dart new file mode 100644 index 0000000..5a93f5a --- /dev/null +++ b/lib/api/o_auth2_api.dart @@ -0,0 +1,136 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class OAuth2Api { + OAuth2Api([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Get the oauth application. + /// + /// Retrieves the OAuth 2 provider application for the given identifier. The secret will not be part of the response, instead a `confidential` flag is indicating, whether there is a secret or not. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// OAuth application id + Future getOauthApplicationWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/oauth_applications/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get the oauth application. + /// + /// Retrieves the OAuth 2 provider application for the given identifier. The secret will not be part of the response, instead a `confidential` flag is indicating, whether there is a secret or not. + /// + /// Parameters: + /// + /// * [int] id (required): + /// OAuth application id + Future getOauthApplication(int id,) async { + final response = await getOauthApplicationWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OAuthApplicationReadModel',) as OAuthApplicationReadModel; + + } + return null; + } + + /// Get the oauth client credentials object. + /// + /// Retrieves the OAuth 2 client credentials for the given identifier. The secret will not be part of the response, instead a `confidential` flag is indicating, whether there is a secret or not. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// OAuth Client Credentials id + Future getOauthClientCredentialsWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/oauth_client_credentials/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get the oauth client credentials object. + /// + /// Retrieves the OAuth 2 client credentials for the given identifier. The secret will not be part of the response, instead a `confidential` flag is indicating, whether there is a secret or not. + /// + /// Parameters: + /// + /// * [int] id (required): + /// OAuth Client Credentials id + Future getOauthClientCredentials(int id,) async { + final response = await getOauthClientCredentialsWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OAuthClientCredentialsReadModel',) as OAuthClientCredentialsReadModel; + + } + return null; + } +} diff --git a/lib/api/posts_api.dart b/lib/api/posts_api.dart new file mode 100644 index 0000000..790adc0 --- /dev/null +++ b/lib/api/posts_api.dart @@ -0,0 +1,77 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class PostsApi { + PostsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// View Post + /// + /// Retrieve an individual post as identified by the id parameter + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Post's identifier + Future viewPostWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/posts/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Post + /// + /// Retrieve an individual post as identified by the id parameter + /// + /// Parameters: + /// + /// * [int] id (required): + /// Post's identifier + Future viewPost(int id,) async { + final response = await viewPostWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PostModel',) as PostModel; + + } + return null; + } +} diff --git a/lib/api/previewing_api.dart b/lib/api/previewing_api.dart new file mode 100644 index 0000000..d22d08b --- /dev/null +++ b/lib/api/previewing_api.dart @@ -0,0 +1,128 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class PreviewingApi { + PreviewingApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Preview Markdown document + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] context: + /// API-Link to the context in which the rendering occurs, for example a specific work package. If left out only context-agnostic rendering takes place. Please note that OpenProject features markdown-extensions on top of the extensions GitHub Flavored Markdown (gfm) already provides that can only work given a context (e.g. display attached images). **Supported contexts:** * `/api/v3/work_packages/{id}` - an existing work package + Future previewMarkdownDocumentWithHttpInfo({ String? context, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/render/markdown'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (context != null) { + queryParams.addAll(_queryParams('', 'context', context)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Preview Markdown document + /// + /// + /// + /// Parameters: + /// + /// * [String] context: + /// API-Link to the context in which the rendering occurs, for example a specific work package. If left out only context-agnostic rendering takes place. Please note that OpenProject features markdown-extensions on top of the extensions GitHub Flavored Markdown (gfm) already provides that can only work given a context (e.g. display attached images). **Supported contexts:** * `/api/v3/work_packages/{id}` - an existing work package + Future previewMarkdownDocument({ String? context, }) async { + final response = await previewMarkdownDocumentWithHttpInfo( context: context, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; + + } + return null; + } + + /// Preview plain document + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future previewPlainDocumentWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/render/plain'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Preview plain document + /// + /// + Future previewPlainDocument() async { + final response = await previewPlainDocumentWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; + + } + return null; + } +} diff --git a/lib/api/principals_api.dart b/lib/api/principals_api.dart new file mode 100644 index 0000000..ef1bb53 --- /dev/null +++ b/lib/api/principals_api.dart @@ -0,0 +1,89 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class PrincipalsApi { + PrincipalsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// List principals + /// + /// List all principals. The client can choose to filter the principals similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain principals who are members in projects the client is allowed to see. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + type: filters principals by their type (*User*, *Group*, *PlaceholderUser*). + member: filters principals by the projects they are members in. + name: filters principals by the user or group name. + any_name_attribute: filters principals by the user or group first- and last name, email or login. + status: filters principals by their status number (active = *1*, registered = *2*, locked = *3*, invited = *4*) + /// + /// * [String] select: + /// Comma separated list of properties to include. + Future listPrincipalsWithHttpInfo({ String? filters, String? select, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/principals'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + if (select != null) { + queryParams.addAll(_queryParams('', 'select', select)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List principals + /// + /// List all principals. The client can choose to filter the principals similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain principals who are members in projects the client is allowed to see. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + type: filters principals by their type (*User*, *Group*, *PlaceholderUser*). + member: filters principals by the projects they are members in. + name: filters principals by the user or group name. + any_name_attribute: filters principals by the user or group first- and last name, email or login. + status: filters principals by their status number (active = *1*, registered = *2*, locked = *3*, invited = *4*) + /// + /// * [String] select: + /// Comma separated list of properties to include. + Future listPrincipals({ String? filters, String? select, }) async { + final response = await listPrincipalsWithHttpInfo( filters: filters, select: select, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } +} diff --git a/lib/api/priorities_api.dart b/lib/api/priorities_api.dart new file mode 100644 index 0000000..6ff2d99 --- /dev/null +++ b/lib/api/priorities_api.dart @@ -0,0 +1,125 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class PrioritiesApi { + PrioritiesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// List all Priorities + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future listAllPrioritiesWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/priorities'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List all Priorities + /// + /// + Future listAllPriorities() async { + final response = await listAllPrioritiesWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View Priority + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Priority id + Future viewPriorityWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/priorities/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Priority + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Priority id + Future viewPriority(int id,) async { + final response = await viewPriorityWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PriorityModel',) as PriorityModel; + + } + return null; + } +} diff --git a/lib/api/projects_api.dart b/lib/api/projects_api.dart new file mode 100644 index 0000000..7b059d4 --- /dev/null +++ b/lib/api/projects_api.dart @@ -0,0 +1,786 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class ProjectsApi { + ProjectsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Create project + /// + /// Creates a new project, applying the attributes provided in the body. You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [Object] body: + Future createProjectWithHttpInfo({ Object? body, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects'; + + // ignore: prefer_final_locals + Object? postBody = body; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create project + /// + /// Creates a new project, applying the attributes provided in the body. You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation. + /// + /// Parameters: + /// + /// * [Object] body: + Future createProject({ Object? body, }) async { + final response = await createProjectWithHttpInfo( body: body, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ProjectModel',) as ProjectModel; + + } + return null; + } + + /// Create project copy + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future createProjectCopyWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/copy' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create project copy + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future createProjectCopy(int id,) async { + final response = await createProjectCopyWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Delete Project + /// + /// Deletes the project permanently. As this is a lengthy process, the actual deletion is carried out asynchronously. So the project might exist well after the request has returned successfully. To prevent unwanted changes to the project scheduled for deletion, it is archived at once. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future deleteProjectWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Delete Project + /// + /// Deletes the project permanently. As this is a lengthy process, the actual deletion is carried out asynchronously. So the project might exist well after the request has returned successfully. To prevent unwanted changes to the project scheduled for deletion, it is archived at once. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future deleteProject(int id,) async { + final response = await deleteProjectWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// List available parent project candidates + /// + /// Lists projects which can become parent to another project. Only sound candidates are returned. For instance a project cannot become parent of itself or it's children. To specify the project for which a parent is queried for, the `of` parameter can be provided. If no `of` parameter is provided, a new project is assumed. Then, the check for the hierarchy is omitted as a new project cannot be part of a hierarchy yet. Candidates can be filtered. Most commonly one will want to filter by name or identifier. You can do this through the `filters` parameter which works just like the work package index. For instance to find all parent candidates with \"rollout\" in their name: ``` ?filters=[{\"name_and_identifier\":{\"operator\":\"~\",\"values\":[\"rollout\"]}}] ``` + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. + /// + /// * [String] of_: + /// The id or identifier of the project the parent candidate is determined for + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint and allows all the filters and sortBy supported by the project list end point. + Future listAvailableParentProjectCandidatesWithHttpInfo({ String? filters, String? of_, String? sortBy, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/available_parent_projects'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + if (of_ != null) { + queryParams.addAll(_queryParams('', 'of', of_)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List available parent project candidates + /// + /// Lists projects which can become parent to another project. Only sound candidates are returned. For instance a project cannot become parent of itself or it's children. To specify the project for which a parent is queried for, the `of` parameter can be provided. If no `of` parameter is provided, a new project is assumed. Then, the check for the hierarchy is omitted as a new project cannot be part of a hierarchy yet. Candidates can be filtered. Most commonly one will want to filter by name or identifier. You can do this through the `filters` parameter which works just like the work package index. For instance to find all parent candidates with \"rollout\" in their name: ``` ?filters=[{\"name_and_identifier\":{\"operator\":\"~\",\"values\":[\"rollout\"]}}] ``` + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. + /// + /// * [String] of_: + /// The id or identifier of the project the parent candidate is determined for + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint and allows all the filters and sortBy supported by the project list end point. + Future listAvailableParentProjectCandidates({ String? filters, String? of_, String? sortBy, }) async { + final response = await listAvailableParentProjectCandidatesWithHttpInfo( filters: filters, of_: of_, sortBy: sortBy, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// List projects + /// + /// Returns a collection of projects. The collection can be filtered via query parameters similar to how work packages are filtered. In addition to the provided filter, the result set is always limited to only contain projects the client is allowed to see. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + active: based on the active property of the project + ancestor: filters projects by their ancestor. A project is not considered to be it's own ancestor. + created_at: based on the time the project was created + latest_activity_at: based on the time the last activity was registered on a project. + name_and_identifier: based on both the name and the identifier. + parent_id: filters projects by their parent. + principal: based on members of the project. + type_id: based on the types active in a project. + user_action: based on the actions the current user has in the project. + id: based on projects' id. + visible: based on the visibility for the user (id) provided as the filter value. This filter is useful for admins to identify the projects visible to a user. There might also be additional filters based on the custom fields that have been configured. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Currently supported orders are: + id + name + typeahead (sorting by hierarchy and name) + created_at + public + latest_activity_at + required_disk_space There might also be additional orders based on the custom fields that have been configured. + /// + /// * [String] select: + /// Comma separated list of properties to include. + Future listProjectsWithHttpInfo({ String? filters, String? sortBy, String? select, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + if (select != null) { + queryParams.addAll(_queryParams('', 'select', select)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List projects + /// + /// Returns a collection of projects. The collection can be filtered via query parameters similar to how work packages are filtered. In addition to the provided filter, the result set is always limited to only contain projects the client is allowed to see. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + active: based on the active property of the project + ancestor: filters projects by their ancestor. A project is not considered to be it's own ancestor. + created_at: based on the time the project was created + latest_activity_at: based on the time the last activity was registered on a project. + name_and_identifier: based on both the name and the identifier. + parent_id: filters projects by their parent. + principal: based on members of the project. + type_id: based on the types active in a project. + user_action: based on the actions the current user has in the project. + id: based on projects' id. + visible: based on the visibility for the user (id) provided as the filter value. This filter is useful for admins to identify the projects visible to a user. There might also be additional filters based on the custom fields that have been configured. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Currently supported orders are: + id + name + typeahead (sorting by hierarchy and name) + created_at + public + latest_activity_at + required_disk_space There might also be additional orders based on the custom fields that have been configured. + /// + /// * [String] select: + /// Comma separated list of properties to include. + Future listProjects({ String? filters, String? sortBy, String? select, }) async { + final response = await listProjectsWithHttpInfo( filters: filters, sortBy: sortBy, select: select, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// List projects having version + /// + /// This endpoint lists the projects where the given version is available. The projects returned depend on the sharing settings of the given version, but are also limited to the projects that the current user is allowed to see. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Version id + Future listProjectsWithVersionWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/versions/{id}/projects' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List projects having version + /// + /// This endpoint lists the projects where the given version is available. The projects returned depend on the sharing settings of the given version, but are also limited to the projects that the current user is allowed to see. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Version id + Future listProjectsWithVersion(int id,) async { + final response = await listProjectsWithVersionWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Project copy form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future projectCopyFormWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/copy/form' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Project copy form + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future projectCopyForm(int id,) async { + final response = await projectCopyFormWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Project create form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [Object] body: + Future projectCreateFormWithHttpInfo({ Object? body, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/form'; + + // ignore: prefer_final_locals + Object? postBody = body; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Project create form + /// + /// + /// + /// Parameters: + /// + /// * [Object] body: + Future projectCreateForm({ Object? body, }) async { + final response = await projectCreateFormWithHttpInfo( body: body, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Project update form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + /// + /// * [Object] body: + Future projectUpdateFormWithHttpInfo(int id, { Object? body, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/form' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = body; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Project update form + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + /// + /// * [Object] body: + Future projectUpdateForm(int id, { Object? body, }) async { + final response = await projectUpdateFormWithHttpInfo(id, body: body, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Update Project + /// + /// Updates the given project by applying the attributes provided in the body. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + /// + /// * [Object] body: + Future updateProjectWithHttpInfo(int id, { Object? body, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = body; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Update Project + /// + /// Updates the given project by applying the attributes provided in the body. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + /// + /// * [Object] body: + Future updateProject(int id, { Object? body, }) async { + final response = await updateProjectWithHttpInfo(id, body: body, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ProjectModel',) as ProjectModel; + + } + return null; + } + + /// View project + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future viewProjectWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View project + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future viewProject(int id,) async { + final response = await viewProjectWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ProjectModel',) as ProjectModel; + + } + return null; + } + + /// View project schema + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future viewProjectSchemaWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/schema'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View project schema + /// + /// + Future viewProjectSchema() async { + final response = await viewProjectSchemaWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View project status + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] id (required): + /// Project status id + Future viewProjectStatusWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/project_statuses/{id}' + .replaceAll('{id}', id); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View project status + /// + /// + /// + /// Parameters: + /// + /// * [String] id (required): + /// Project status id + Future viewProjectStatus(String id,) async { + final response = await viewProjectStatusWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } +} diff --git a/lib/api/queries_api.dart b/lib/api/queries_api.dart new file mode 100644 index 0000000..25f10cc --- /dev/null +++ b/lib/api/queries_api.dart @@ -0,0 +1,1087 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class QueriesApi { + QueriesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Available projects for query + /// + /// Gets a list of projects that are available as projects a query can be assigned to. + /// + /// Note: This method returns the HTTP [Response]. + Future availableProjectsForQueryWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/available_projects'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Available projects for query + /// + /// Gets a list of projects that are available as projects a query can be assigned to. + Future availableProjectsForQuery() async { + final response = await availableProjectsForQueryWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Create query + /// + /// When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a Query can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [QueryCreateForm] queryCreateForm: + Future createQueryWithHttpInfo({ QueryCreateForm? queryCreateForm, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries'; + + // ignore: prefer_final_locals + Object? postBody = queryCreateForm; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create query + /// + /// When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a Query can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. + /// + /// Parameters: + /// + /// * [QueryCreateForm] queryCreateForm: + Future createQuery({ QueryCreateForm? queryCreateForm, }) async { + final response = await createQueryWithHttpInfo( queryCreateForm: queryCreateForm, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueryModel',) as QueryModel; + + } + return null; + } + + /// Delete query + /// + /// Delete the query identified by the id parameter + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Query id + Future deleteQueryWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Delete query + /// + /// Delete the query identified by the id parameter + /// + /// Parameters: + /// + /// * [int] id (required): + /// Query id + Future deleteQuery(int id,) async { + final response = await deleteQueryWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Edit Query + /// + /// When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body. Note that it is only allowed to provide properties or links supporting the **write** operation. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Query id + /// + /// * [QueryUpdateForm] queryUpdateForm: + Future editQueryWithHttpInfo(int id, { QueryUpdateForm? queryUpdateForm, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = queryUpdateForm; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Edit Query + /// + /// When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body. Note that it is only allowed to provide properties or links supporting the **write** operation. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Query id + /// + /// * [QueryUpdateForm] queryUpdateForm: + Future editQuery(int id, { QueryUpdateForm? queryUpdateForm, }) async { + final response = await editQueryWithHttpInfo(id, queryUpdateForm: queryUpdateForm, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueryModel',) as QueryModel; + + } + return null; + } + + /// List queries + /// + /// Returns a collection of queries. The collection can be filtered via query parameters similar to how work packages are filtered. Please note however, that the filters are applied to the queries and not to the work packages the queries in turn might return. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Currently supported filters are: + project: filters queries by the project they are assigned to. If the project filter is passed with the `!*` (not any) operator, global queries are returned. + id: filters queries based on their id + updated_at: filters queries based on the last time they where updated + Future listQueriesWithHttpInfo({ String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List queries + /// + /// Returns a collection of queries. The collection can be filtered via query parameters similar to how work packages are filtered. Please note however, that the filters are applied to the queries and not to the work packages the queries in turn might return. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Currently supported filters are: + project: filters queries by the project they are assigned to. If the project filter is passed with the `!*` (not any) operator, global queries are returned. + id: filters queries based on their id + updated_at: filters queries based on the last time they where updated + Future listQueries({ String? filters, }) async { + final response = await listQueriesWithHttpInfo( filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Query Create Form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [QueryCreateForm] queryCreateForm: + Future queryCreateFormWithHttpInfo({ QueryCreateForm? queryCreateForm, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/form'; + + // ignore: prefer_final_locals + Object? postBody = queryCreateForm; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Query Create Form + /// + /// + /// + /// Parameters: + /// + /// * [QueryCreateForm] queryCreateForm: + Future queryCreateForm({ QueryCreateForm? queryCreateForm, }) async { + final response = await queryCreateFormWithHttpInfo( queryCreateForm: queryCreateForm, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Query Update Form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Query id + /// + /// * [QueryUpdateForm] queryUpdateForm: + Future queryUpdateFormWithHttpInfo(int id, { QueryUpdateForm? queryUpdateForm, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/{id}/form' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = queryUpdateForm; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Query Update Form + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Query id + /// + /// * [QueryUpdateForm] queryUpdateForm: + Future queryUpdateForm(int id, { QueryUpdateForm? queryUpdateForm, }) async { + final response = await queryUpdateFormWithHttpInfo(id, queryUpdateForm: queryUpdateForm, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Star query + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Query id + Future starQueryWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/{id}/star' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Star query + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Query id + Future starQuery(int id,) async { + final response = await starQueryWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Unstar query + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Query id + Future unstarQueryWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/{id}/unstar' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Unstar query + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Query id + Future unstarQuery(int id,) async { + final response = await unstarQueryWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View default query + /// + /// Same as [viewing an existing, persisted Query](https://www.openproject.org/docs/api/endpoints/queries/#list-queries) in its response, this resource returns an unpersisted query and by that allows to get the default query configuration. The client may also provide additional parameters which will modify the default query. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). + /// + /// * [int] offset: + /// Page number inside the queries' result collection of work packages. + /// + /// * [int] pageSize: + /// Number of elements to display per page for the queries' result collection of work packages. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria. + /// + /// * [String] groupBy: + /// The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria. + /// + /// * [bool] showSums: + /// Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property. + /// + /// * [String] timestamps: + /// Indicates the timestamps to filter by when showing changed attributes on work packages. Values can be either ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Values older than 1 day are accepted only with valid Enterprise Token available. + /// + /// * [bool] timelineVisible: + /// Indicates whether the timeline should be shown. + /// + /// * [String] timelineZoomLevel: + /// Indicates in what zoom level the timeline should be shown. Valid values are `days`, `weeks`, `months`, `quarters`, and `years`. + /// + /// * [bool] showHierarchies: + /// Indicates whether the hierarchy mode should be enabled. + Future viewDefaultQueryWithHttpInfo({ String? filters, int? offset, int? pageSize, String? sortBy, String? groupBy, bool? showSums, String? timestamps, bool? timelineVisible, String? timelineZoomLevel, bool? showHierarchies, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/default'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + if (offset != null) { + queryParams.addAll(_queryParams('', 'offset', offset)); + } + if (pageSize != null) { + queryParams.addAll(_queryParams('', 'pageSize', pageSize)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + if (groupBy != null) { + queryParams.addAll(_queryParams('', 'groupBy', groupBy)); + } + if (showSums != null) { + queryParams.addAll(_queryParams('', 'showSums', showSums)); + } + if (timestamps != null) { + queryParams.addAll(_queryParams('', 'timestamps', timestamps)); + } + if (timelineVisible != null) { + queryParams.addAll(_queryParams('', 'timelineVisible', timelineVisible)); + } + if (timelineZoomLevel != null) { + queryParams.addAll(_queryParams('', 'timelineZoomLevel', timelineZoomLevel)); + } + if (showHierarchies != null) { + queryParams.addAll(_queryParams('', 'showHierarchies', showHierarchies)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View default query + /// + /// Same as [viewing an existing, persisted Query](https://www.openproject.org/docs/api/endpoints/queries/#list-queries) in its response, this resource returns an unpersisted query and by that allows to get the default query configuration. The client may also provide additional parameters which will modify the default query. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). + /// + /// * [int] offset: + /// Page number inside the queries' result collection of work packages. + /// + /// * [int] pageSize: + /// Number of elements to display per page for the queries' result collection of work packages. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria. + /// + /// * [String] groupBy: + /// The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria. + /// + /// * [bool] showSums: + /// Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property. + /// + /// * [String] timestamps: + /// Indicates the timestamps to filter by when showing changed attributes on work packages. Values can be either ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Values older than 1 day are accepted only with valid Enterprise Token available. + /// + /// * [bool] timelineVisible: + /// Indicates whether the timeline should be shown. + /// + /// * [String] timelineZoomLevel: + /// Indicates in what zoom level the timeline should be shown. Valid values are `days`, `weeks`, `months`, `quarters`, and `years`. + /// + /// * [bool] showHierarchies: + /// Indicates whether the hierarchy mode should be enabled. + Future viewDefaultQuery({ String? filters, int? offset, int? pageSize, String? sortBy, String? groupBy, bool? showSums, String? timestamps, bool? timelineVisible, String? timelineZoomLevel, bool? showHierarchies, }) async { + final response = await viewDefaultQueryWithHttpInfo( filters: filters, offset: offset, pageSize: pageSize, sortBy: sortBy, groupBy: groupBy, showSums: showSums, timestamps: timestamps, timelineVisible: timelineVisible, timelineZoomLevel: timelineZoomLevel, showHierarchies: showHierarchies, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View default query for project + /// + /// Same as [viewing an existing, persisted Query](https://www.openproject.org/docs/api/endpoints/queries/#list-queries) in its response, this resource returns an unpersisted query and by that allows to get the default query configuration. The client may also provide additional parameters which will modify the default query. The query will already be scoped for the project. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Id of the project the default query is requested for + /// + /// * [String] filters: + /// JSON specifying filter conditions. The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). + /// + /// * [int] offset: + /// Page number inside the queries' result collection of work packages. + /// + /// * [int] pageSize: + /// Number of elements to display per page for the queries' result collection of work packages. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria. + /// + /// * [String] groupBy: + /// The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria. + /// + /// * [bool] showSums: + /// Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property. + /// + /// * [String] timestamps: + /// Indicates the timestamps to filter by when showing changed attributes on work packages. Values can be either ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time. Values older than 1 day are accepted only with valid Enterprise Token available. + /// + /// * [bool] timelineVisible: + /// Indicates whether the timeline should be shown. + /// + /// * [bool] showHierarchies: + /// Indicates whether the hierarchy mode should be enabled. + Future viewDefaultQueryForProjectWithHttpInfo(int id, { String? filters, int? offset, int? pageSize, String? sortBy, String? groupBy, bool? showSums, String? timestamps, bool? timelineVisible, bool? showHierarchies, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/queries/default' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + if (offset != null) { + queryParams.addAll(_queryParams('', 'offset', offset)); + } + if (pageSize != null) { + queryParams.addAll(_queryParams('', 'pageSize', pageSize)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + if (groupBy != null) { + queryParams.addAll(_queryParams('', 'groupBy', groupBy)); + } + if (showSums != null) { + queryParams.addAll(_queryParams('', 'showSums', showSums)); + } + if (timestamps != null) { + queryParams.addAll(_queryParams('', 'timestamps', timestamps)); + } + if (timelineVisible != null) { + queryParams.addAll(_queryParams('', 'timelineVisible', timelineVisible)); + } + if (showHierarchies != null) { + queryParams.addAll(_queryParams('', 'showHierarchies', showHierarchies)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View default query for project + /// + /// Same as [viewing an existing, persisted Query](https://www.openproject.org/docs/api/endpoints/queries/#list-queries) in its response, this resource returns an unpersisted query and by that allows to get the default query configuration. The client may also provide additional parameters which will modify the default query. The query will already be scoped for the project. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Id of the project the default query is requested for + /// + /// * [String] filters: + /// JSON specifying filter conditions. The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). + /// + /// * [int] offset: + /// Page number inside the queries' result collection of work packages. + /// + /// * [int] pageSize: + /// Number of elements to display per page for the queries' result collection of work packages. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria. + /// + /// * [String] groupBy: + /// The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria. + /// + /// * [bool] showSums: + /// Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property. + /// + /// * [String] timestamps: + /// Indicates the timestamps to filter by when showing changed attributes on work packages. Values can be either ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time. Values older than 1 day are accepted only with valid Enterprise Token available. + /// + /// * [bool] timelineVisible: + /// Indicates whether the timeline should be shown. + /// + /// * [bool] showHierarchies: + /// Indicates whether the hierarchy mode should be enabled. + Future viewDefaultQueryForProject(int id, { String? filters, int? offset, int? pageSize, String? sortBy, String? groupBy, bool? showSums, String? timestamps, bool? timelineVisible, bool? showHierarchies, }) async { + final response = await viewDefaultQueryForProjectWithHttpInfo(id, filters: filters, offset: offset, pageSize: pageSize, sortBy: sortBy, groupBy: groupBy, showSums: showSums, timestamps: timestamps, timelineVisible: timelineVisible, showHierarchies: showHierarchies, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View query + /// + /// Retrieve an individual query as identified by the id parameter. Then end point accepts a number of parameters that can be used to override the resources' persisted parameters. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Query id + /// + /// * [String] filters: + /// JSON specifying filter conditions. The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). + /// + /// * [int] offset: + /// Page number inside the queries' result collection of work packages. + /// + /// * [int] pageSize: + /// Number of elements to display per page for the queries' result collection of work packages. + /// + /// * [String] columns: + /// Selected columns for the table view. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria. + /// + /// * [String] groupBy: + /// The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria. + /// + /// * [bool] showSums: + /// Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property. + /// + /// * [String] timestamps: + /// Indicates the timestamps to filter by when showing changed attributes on work packages. Values can be either ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Values older than 1 day are accepted only with valid Enterprise Token available. + /// + /// * [bool] timelineVisible: + /// Indicates whether the timeline should be shown. + /// + /// * [String] timelineLabels: + /// Overridden labels in the timeline view + /// + /// * [String] highlightingMode: + /// Highlighting mode for the table view. + /// + /// * [String] highlightedAttributes: + /// Highlighted attributes mode for the table view when `highlightingMode` is `inline`. When set to `[]` all highlightable attributes will be returned as `highlightedAttributes`. + /// + /// * [bool] showHierarchies: + /// Indicates whether the hierarchy mode should be enabled. + Future viewQueryWithHttpInfo(int id, { String? filters, int? offset, int? pageSize, String? columns, String? sortBy, String? groupBy, bool? showSums, String? timestamps, bool? timelineVisible, String? timelineLabels, String? highlightingMode, String? highlightedAttributes, bool? showHierarchies, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + if (offset != null) { + queryParams.addAll(_queryParams('', 'offset', offset)); + } + if (pageSize != null) { + queryParams.addAll(_queryParams('', 'pageSize', pageSize)); + } + if (columns != null) { + queryParams.addAll(_queryParams('', 'columns', columns)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + if (groupBy != null) { + queryParams.addAll(_queryParams('', 'groupBy', groupBy)); + } + if (showSums != null) { + queryParams.addAll(_queryParams('', 'showSums', showSums)); + } + if (timestamps != null) { + queryParams.addAll(_queryParams('', 'timestamps', timestamps)); + } + if (timelineVisible != null) { + queryParams.addAll(_queryParams('', 'timelineVisible', timelineVisible)); + } + if (timelineLabels != null) { + queryParams.addAll(_queryParams('', 'timelineLabels', timelineLabels)); + } + if (highlightingMode != null) { + queryParams.addAll(_queryParams('', 'highlightingMode', highlightingMode)); + } + if (highlightedAttributes != null) { + queryParams.addAll(_queryParams('', 'highlightedAttributes', highlightedAttributes)); + } + if (showHierarchies != null) { + queryParams.addAll(_queryParams('', 'showHierarchies', showHierarchies)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View query + /// + /// Retrieve an individual query as identified by the id parameter. Then end point accepts a number of parameters that can be used to override the resources' persisted parameters. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Query id + /// + /// * [String] filters: + /// JSON specifying filter conditions. The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). + /// + /// * [int] offset: + /// Page number inside the queries' result collection of work packages. + /// + /// * [int] pageSize: + /// Number of elements to display per page for the queries' result collection of work packages. + /// + /// * [String] columns: + /// Selected columns for the table view. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria. + /// + /// * [String] groupBy: + /// The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria. + /// + /// * [bool] showSums: + /// Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property. + /// + /// * [String] timestamps: + /// Indicates the timestamps to filter by when showing changed attributes on work packages. Values can be either ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Values older than 1 day are accepted only with valid Enterprise Token available. + /// + /// * [bool] timelineVisible: + /// Indicates whether the timeline should be shown. + /// + /// * [String] timelineLabels: + /// Overridden labels in the timeline view + /// + /// * [String] highlightingMode: + /// Highlighting mode for the table view. + /// + /// * [String] highlightedAttributes: + /// Highlighted attributes mode for the table view when `highlightingMode` is `inline`. When set to `[]` all highlightable attributes will be returned as `highlightedAttributes`. + /// + /// * [bool] showHierarchies: + /// Indicates whether the hierarchy mode should be enabled. + Future viewQuery(int id, { String? filters, int? offset, int? pageSize, String? columns, String? sortBy, String? groupBy, bool? showSums, String? timestamps, bool? timelineVisible, String? timelineLabels, String? highlightingMode, String? highlightedAttributes, bool? showHierarchies, }) async { + final response = await viewQueryWithHttpInfo(id, filters: filters, offset: offset, pageSize: pageSize, columns: columns, sortBy: sortBy, groupBy: groupBy, showSums: showSums, timestamps: timestamps, timelineVisible: timelineVisible, timelineLabels: timelineLabels, highlightingMode: highlightingMode, highlightedAttributes: highlightedAttributes, showHierarchies: showHierarchies, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueryModel',) as QueryModel; + + } + return null; + } + + /// View schema for global queries + /// + /// Retrieve the schema for global queries, those, that are not assigned to a project. + /// + /// Note: This method returns the HTTP [Response]. + Future viewSchemaForGlobalQueriesWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/schema'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View schema for global queries + /// + /// Retrieve the schema for global queries, those, that are not assigned to a project. + Future viewSchemaForGlobalQueries() async { + final response = await viewSchemaForGlobalQueriesWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View schema for project queries + /// + /// Retrieve the schema for project queries. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future viewSchemaForProjectQueriesWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/queries/schema' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View schema for project queries + /// + /// Retrieve the schema for project queries. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future viewSchemaForProjectQueries(int id,) async { + final response = await viewSchemaForProjectQueriesWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } +} diff --git a/lib/api/query_columns_api.dart b/lib/api/query_columns_api.dart new file mode 100644 index 0000000..a7daa62 --- /dev/null +++ b/lib/api/query_columns_api.dart @@ -0,0 +1,77 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class QueryColumnsApi { + QueryColumnsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// View Query Column + /// + /// Retrieve an individual QueryColumn as identified by the `id` parameter. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] id (required): + /// QueryColumn id + Future viewQueryColumnWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/columns/{id}' + .replaceAll('{id}', id); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Query Column + /// + /// Retrieve an individual QueryColumn as identified by the `id` parameter. + /// + /// Parameters: + /// + /// * [String] id (required): + /// QueryColumn id + Future viewQueryColumn(String id,) async { + final response = await viewQueryColumnWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueryColumnModel',) as QueryColumnModel; + + } + return null; + } +} diff --git a/lib/api/query_filter_instance_schema_api.dart b/lib/api/query_filter_instance_schema_api.dart new file mode 100644 index 0000000..273c25f --- /dev/null +++ b/lib/api/query_filter_instance_schema_api.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class QueryFilterInstanceSchemaApi { + QueryFilterInstanceSchemaApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// List Query Filter Instance Schemas + /// + /// Returns the list of QueryFilterInstanceSchemas defined for a global query. That is a query not assigned to a project. + /// + /// Note: This method returns the HTTP [Response]. + Future listQueryFilterInstanceSchemasWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/filter_instance_schemas'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List Query Filter Instance Schemas + /// + /// Returns the list of QueryFilterInstanceSchemas defined for a global query. That is a query not assigned to a project. + Future listQueryFilterInstanceSchemas() async { + final response = await listQueryFilterInstanceSchemasWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// List Query Filter Instance Schemas for Project + /// + /// Returns the list of QueryFilterInstanceSchemas defined for a query of the specified project. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future listQueryFilterInstanceSchemasForProjectWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/queries/filter_instance_schemas' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List Query Filter Instance Schemas for Project + /// + /// Returns the list of QueryFilterInstanceSchemas defined for a query of the specified project. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future listQueryFilterInstanceSchemasForProject(int id,) async { + final response = await listQueryFilterInstanceSchemasForProjectWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View Query Filter Instance Schema + /// + /// Retrieve an individual QueryFilterInstanceSchema as identified by the id parameter. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] id (required): + /// QueryFilterInstanceSchema identifier. The identifier is the filter identifier. + Future viewQueryFilterInstanceSchemaWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/filter_instance_schemas/{id}' + .replaceAll('{id}', id); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Query Filter Instance Schema + /// + /// Retrieve an individual QueryFilterInstanceSchema as identified by the id parameter. + /// + /// Parameters: + /// + /// * [String] id (required): + /// QueryFilterInstanceSchema identifier. The identifier is the filter identifier. + Future viewQueryFilterInstanceSchema(String id,) async { + final response = await viewQueryFilterInstanceSchemaWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueryFilterInstanceSchemaModel',) as QueryFilterInstanceSchemaModel; + + } + return null; + } +} diff --git a/lib/api/query_filters_api.dart b/lib/api/query_filters_api.dart new file mode 100644 index 0000000..6ce5fcc --- /dev/null +++ b/lib/api/query_filters_api.dart @@ -0,0 +1,77 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class QueryFiltersApi { + QueryFiltersApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// View Query Filter + /// + /// Retrieve an individual QueryFilter as identified by the id parameter. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] id (required): + /// QueryFilter identifier + Future viewQueryFilterWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/filters/{id}' + .replaceAll('{id}', id); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Query Filter + /// + /// Retrieve an individual QueryFilter as identified by the id parameter. + /// + /// Parameters: + /// + /// * [String] id (required): + /// QueryFilter identifier + Future viewQueryFilter(String id,) async { + final response = await viewQueryFilterWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueryFilterModel',) as QueryFilterModel; + + } + return null; + } +} diff --git a/lib/api/query_operators_api.dart b/lib/api/query_operators_api.dart new file mode 100644 index 0000000..8c81041 --- /dev/null +++ b/lib/api/query_operators_api.dart @@ -0,0 +1,77 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class QueryOperatorsApi { + QueryOperatorsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// View Query Operator + /// + /// Retrieve an individual QueryOperator as identified by the `id` parameter. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] id (required): + /// QueryOperator id + Future viewQueryOperatorWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/operators/{id}' + .replaceAll('{id}', id); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Query Operator + /// + /// Retrieve an individual QueryOperator as identified by the `id` parameter. + /// + /// Parameters: + /// + /// * [String] id (required): + /// QueryOperator id + Future viewQueryOperator(String id,) async { + final response = await viewQueryOperatorWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueryOperatorModel',) as QueryOperatorModel; + + } + return null; + } +} diff --git a/lib/api/query_sort_bys_api.dart b/lib/api/query_sort_bys_api.dart new file mode 100644 index 0000000..cd7a8e2 --- /dev/null +++ b/lib/api/query_sort_bys_api.dart @@ -0,0 +1,77 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class QuerySortBysApi { + QuerySortBysApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// View Query Sort By + /// + /// Retrieve an individual QuerySortBy as identified by the id parameter. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] id (required): + /// QuerySortBy identifier. The identifier is a combination of the column identifier and the direction. + Future viewQuerySortByWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/queries/sort_bys/{id}' + .replaceAll('{id}', id); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Query Sort By + /// + /// Retrieve an individual QuerySortBy as identified by the id parameter. + /// + /// Parameters: + /// + /// * [String] id (required): + /// QuerySortBy identifier. The identifier is a combination of the column identifier and the direction. + Future viewQuerySortBy(String id,) async { + final response = await viewQuerySortByWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QuerySortByModel',) as QuerySortByModel; + + } + return null; + } +} diff --git a/lib/api/relations_api.dart b/lib/api/relations_api.dart new file mode 100644 index 0000000..67d8a6a --- /dev/null +++ b/lib/api/relations_api.dart @@ -0,0 +1,424 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class RelationsApi { + RelationsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Delete Relation + /// + /// Deletes the relation. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Relation ID + Future deleteRelationWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/relations/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Delete Relation + /// + /// Deletes the relation. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Relation ID + Future deleteRelation(int id,) async { + final response = await deleteRelationWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Edit Relation + /// + /// When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body. It is only allowed to provide properties or links supporting the **write** operation. Note that changing the `type` of a relation invariably also changes the respective `reverseType` as well as the \"name\" of it. The returned Relation object will reflect that change. For instance if you change a Relation's `type` to \"follows\" then the `reverseType` will be changed to `precedes`. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Relation ID + Future editRelationWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/relations/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Edit Relation + /// + /// When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body. It is only allowed to provide properties or links supporting the **write** operation. Note that changing the `type` of a relation invariably also changes the respective `reverseType` as well as the \"name\" of it. The returned Relation object will reflect that change. For instance if you change a Relation's `type` to \"follows\" then the `reverseType` will be changed to `precedes`. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Relation ID + Future editRelation(int id,) async { + final response = await editRelationWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'RelationModel',) as RelationModel; + + } + return null; + } + + /// List Relations + /// + /// Lists all relations according to the given (optional, logically conjunctive) filters and ordered by ID. The response only includes relations between work packages which the user is allowed to see. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Valid fields to filter by are: + id - ID of relation + from - ID of work package from which the filtered relations emanates. + to - ID of work package to which this related points. + involved - ID of either the `from` or the `to` work package. + type - The type of relation to filter by, e.g. \"follows\". + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + Future listRelationsWithHttpInfo({ String? filters, String? sortBy, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/relations'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List Relations + /// + /// Lists all relations according to the given (optional, logically conjunctive) filters and ordered by ID. The response only includes relations between work packages which the user is allowed to see. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Valid fields to filter by are: + id - ID of relation + from - ID of work package from which the filtered relations emanates. + to - ID of work package to which this related points. + involved - ID of either the `from` or the `to` work package. + type - The type of relation to filter by, e.g. \"follows\". + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + Future listRelations({ String? filters, String? sortBy, }) async { + final response = await listRelationsWithHttpInfo( filters: filters, sortBy: sortBy, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Relation edit form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the relation being modified + Future relationEditFormWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/relations/{id}/form' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Relation edit form + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the relation being modified + Future relationEditForm(int id,) async { + final response = await relationEditFormWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View Relation + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Relation id + Future viewRelationWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/relations/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Relation + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Relation id + Future viewRelation(int id,) async { + final response = await viewRelationWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'RelationModel',) as RelationModel; + + } + return null; + } + + /// View relation schema + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future viewRelationSchemaWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/relations/schema'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View relation schema + /// + /// + Future viewRelationSchema() async { + final response = await viewRelationSchemaWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View relation schema for type + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] type (required): + /// Type of the schema + Future viewRelationSchemaForTypeWithHttpInfo(String type,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/relations/schema/{type}' + .replaceAll('{type}', type); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View relation schema for type + /// + /// + /// + /// Parameters: + /// + /// * [String] type (required): + /// Type of the schema + Future viewRelationSchemaForType(String type,) async { + final response = await viewRelationSchemaForTypeWithHttpInfo(type,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } +} diff --git a/lib/api/revisions_api.dart b/lib/api/revisions_api.dart new file mode 100644 index 0000000..4af4df3 --- /dev/null +++ b/lib/api/revisions_api.dart @@ -0,0 +1,77 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class RevisionsApi { + RevisionsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// View revision + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Revision id + Future viewRevisionWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/revisions/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View revision + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Revision id + Future viewRevision(int id,) async { + final response = await viewRevisionWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'RevisionModel',) as RevisionModel; + + } + return null; + } +} diff --git a/lib/api/roles_api.dart b/lib/api/roles_api.dart new file mode 100644 index 0000000..c0f809b --- /dev/null +++ b/lib/api/roles_api.dart @@ -0,0 +1,139 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class RolesApi { + RolesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// List roles + /// + /// List all defined roles. This includes built in roles like 'Anonymous' and 'Non member'. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + grantable: filters roles based on whether they are selectable for a membership + unit: filters roles based on the unit ('project' or 'system') for which they are selectable for a membership + Future listRolesWithHttpInfo({ String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/roles'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List roles + /// + /// List all defined roles. This includes built in roles like 'Anonymous' and 'Non member'. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + grantable: filters roles based on whether they are selectable for a membership + unit: filters roles based on the unit ('project' or 'system') for which they are selectable for a membership + Future listRoles({ String? filters, }) async { + final response = await listRolesWithHttpInfo( filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View role + /// + /// Fetch an individual role. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Role id + Future viewRoleWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/roles/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View role + /// + /// Fetch an individual role. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Role id + Future viewRole(int id,) async { + final response = await viewRoleWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'RoleModel',) as RoleModel; + + } + return null; + } +} diff --git a/lib/api/root_api.dart b/lib/api/root_api.dart new file mode 100644 index 0000000..f08203a --- /dev/null +++ b/lib/api/root_api.dart @@ -0,0 +1,66 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class RootApi { + RootApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// View root + /// + /// Returns the root resource, containing basic information about the server instance and a collection of useful links. + /// + /// Note: This method returns the HTTP [Response]. + Future viewRootWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View root + /// + /// Returns the root resource, containing basic information about the server instance and a collection of useful links. + Future viewRoot() async { + final response = await viewRootWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'RootModel',) as RootModel; + + } + return null; + } +} diff --git a/lib/api/schemas_api.dart b/lib/api/schemas_api.dart new file mode 100644 index 0000000..94ba294 --- /dev/null +++ b/lib/api/schemas_api.dart @@ -0,0 +1,66 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class SchemasApi { + SchemasApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// view the schema + /// + /// This is an example of how a schema might look like. Note that this endpoint does not exist in the actual implementation. + /// + /// Note: This method returns the HTTP [Response]. + Future viewTheSchemaWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/example/schema'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// view the schema + /// + /// This is an example of how a schema might look like. Note that this endpoint does not exist in the actual implementation. + Future viewTheSchema() async { + final response = await viewTheSchemaWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } +} diff --git a/lib/api/statuses_api.dart b/lib/api/statuses_api.dart new file mode 100644 index 0000000..1fea5c4 --- /dev/null +++ b/lib/api/statuses_api.dart @@ -0,0 +1,125 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class StatusesApi { + StatusesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// List all Statuses + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future listAllStatusesWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/statuses'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List all Statuses + /// + /// + Future listAllStatuses() async { + final response = await listAllStatusesWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View Status + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Status id + Future viewStatusWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/statuses/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Status + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Status id + Future viewStatus(int id,) async { + final response = await viewStatusWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StatusModel',) as StatusModel; + + } + return null; + } +} diff --git a/lib/api/time_entries_api.dart b/lib/api/time_entries_api.dart new file mode 100644 index 0000000..1b99dbc --- /dev/null +++ b/lib/api/time_entries_api.dart @@ -0,0 +1,517 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class TimeEntriesApi { + TimeEntriesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Available projects for time entries + /// + /// Gets a list of projects in which a time entry can be created in or be assigned to on update. The list contains all projects in which the user issuing the request has the necessary permissions. + /// + /// Note: This method returns the HTTP [Response]. + Future availableProjectsForTimeEntriesWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/time_entries/available_projects'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Available projects for time entries + /// + /// Gets a list of projects in which a time entry can be created in or be assigned to on update. The list contains all projects in which the user issuing the request has the necessary permissions. + Future availableProjectsForTimeEntries() async { + final response = await availableProjectsForTimeEntriesWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Create time entry + /// + /// Creates a new time entry applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a time entries' attributes and are accepted by the endpoint. + /// + /// Note: This method returns the HTTP [Response]. + Future createTimeEntryWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/time_entries'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create time entry + /// + /// Creates a new time entry applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a time entries' attributes and are accepted by the endpoint. + Future createTimeEntry() async { + final response = await createTimeEntryWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TimeEntryModel',) as TimeEntryModel; + + } + return null; + } + + /// Delete time entry + /// + /// Permanently deletes the specified time entry. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Time entry id + Future deleteTimeEntryWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/time_entries/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Delete time entry + /// + /// Permanently deletes the specified time entry. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Time entry id + Future deleteTimeEntry(int id,) async { + final response = await deleteTimeEntryWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Get time entry + /// + /// Retrieves a single time entry identified by the given id. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// time entry id + Future getTimeEntryWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/time_entries/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get time entry + /// + /// Retrieves a single time entry identified by the given id. + /// + /// Parameters: + /// + /// * [int] id (required): + /// time entry id + Future getTimeEntry(int id,) async { + final response = await getTimeEntryWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TimeEntryModel',) as TimeEntryModel; + + } + return null; + } + + /// List time entries + /// + /// Lists time entries. The time entries returned depend on the filters provided and also on the permission of the requesting user. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + hours: Sort by logged hours + spent_on: Sort by spent on date + created_at: Sort by time entry creation datetime + updated_at: Sort by the time the time entry was updated last + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + work_package: Filter time entries by work package + project: Filter time entries by project + user: Filter time entries by users + ongoing: Filter for your ongoing timers + spent_on: Filter time entries by spent on date + created_at: Filter time entries by creation datetime + updated_at: Filter time entries by the last time they where updated + activity: Filter time entries by time entry activity + Future listTimeEntriesWithHttpInfo({ int? offset, int? pageSize, String? sortBy, String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/time_entries'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (offset != null) { + queryParams.addAll(_queryParams('', 'offset', offset)); + } + if (pageSize != null) { + queryParams.addAll(_queryParams('', 'pageSize', pageSize)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List time entries + /// + /// Lists time entries. The time entries returned depend on the filters provided and also on the permission of the requesting user. + /// + /// Parameters: + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + id: Sort by primary key + hours: Sort by logged hours + spent_on: Sort by spent on date + created_at: Sort by time entry creation datetime + updated_at: Sort by the time the time entry was updated last + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + work_package: Filter time entries by work package + project: Filter time entries by project + user: Filter time entries by users + ongoing: Filter for your ongoing timers + spent_on: Filter time entries by spent on date + created_at: Filter time entries by creation datetime + updated_at: Filter time entries by the last time they where updated + activity: Filter time entries by time entry activity + Future listTimeEntries({ int? offset, int? pageSize, String? sortBy, String? filters, }) async { + final response = await listTimeEntriesWithHttpInfo( offset: offset, pageSize: pageSize, sortBy: sortBy, filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TimeEntryCollectionModel',) as TimeEntryCollectionModel; + + } + return null; + } + + /// Time entry create form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future timeEntryCreateFormWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/time_entries/form'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Time entry create form + /// + /// + Future timeEntryCreateForm() async { + final response = await timeEntryCreateFormWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Time entry update form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Time entries activity id + /// + /// * [int] body (required): + /// Time entries activity id + Future timeEntryUpdateFormWithHttpInfo(int id, int body,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/time_entries/{id}/form' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = body; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Time entry update form + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Time entries activity id + /// + /// * [int] body (required): + /// Time entries activity id + Future timeEntryUpdateForm(int id, int body,) async { + final response = await timeEntryUpdateFormWithHttpInfo(id, body,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// update time entry + /// + /// Updates the given time entry by applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a time entries' attributes and are accepted by the endpoint. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Time entry id + Future updateTimeEntryWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/time_entries/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// update time entry + /// + /// Updates the given time entry by applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a time entries' attributes and are accepted by the endpoint. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Time entry id + Future updateTimeEntry(int id,) async { + final response = await updateTimeEntryWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TimeEntryModel',) as TimeEntryModel; + + } + return null; + } + + /// View time entry schema + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future viewTimeEntrySchemaWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/time_entries/schema'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View time entry schema + /// + /// + Future viewTimeEntrySchema() async { + final response = await viewTimeEntrySchemaWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } +} diff --git a/lib/api/time_entry_activities_api.dart b/lib/api/time_entry_activities_api.dart new file mode 100644 index 0000000..8cb1e43 --- /dev/null +++ b/lib/api/time_entry_activities_api.dart @@ -0,0 +1,77 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class TimeEntryActivitiesApi { + TimeEntryActivitiesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// View time entries activity + /// + /// Fetches the time entry activity resource by the given id. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Time entries activity id + Future getTimeEntriesActivityWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/time_entries/activity/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View time entries activity + /// + /// Fetches the time entry activity resource by the given id. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Time entries activity id + Future getTimeEntriesActivity(int id,) async { + final response = await getTimeEntriesActivityWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TimeEntryActivityModel',) as TimeEntryActivityModel; + + } + return null; + } +} diff --git a/lib/api/types_api.dart b/lib/api/types_api.dart new file mode 100644 index 0000000..e86940e --- /dev/null +++ b/lib/api/types_api.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class TypesApi { + TypesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// List all Types + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future listAllTypesWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/types'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List all Types + /// + /// + Future listAllTypes() async { + final response = await listAllTypesWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// List types available in a project + /// + /// This endpoint lists the types that are *available* in a given project. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the project whose types will be listed + Future listTypesAvailableInAProjectWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/types' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List types available in a project + /// + /// This endpoint lists the types that are *available* in a given project. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the project whose types will be listed + Future listTypesAvailableInAProject(int id,) async { + final response = await listTypesAvailableInAProjectWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// View Type + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Type id + Future viewTypeWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/types/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Type + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Type id + Future viewType(int id,) async { + final response = await viewTypeWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TypeModel',) as TypeModel; + + } + return null; + } +} diff --git a/lib/api/user_preferences_api.dart b/lib/api/user_preferences_api.dart new file mode 100644 index 0000000..fc7f85a --- /dev/null +++ b/lib/api/user_preferences_api.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class UserPreferencesApi { + UserPreferencesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Show my preferences + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future showMyPreferencesWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/my_preferences'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Show my preferences + /// + /// + Future showMyPreferences() async { + final response = await showMyPreferencesWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Update my preferences + /// + /// When calling this endpoint the client provides a single object, containing the properties that it wants to change, in the body. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [UpdateUserPreferencesRequest] updateUserPreferencesRequest: + Future updateUserPreferencesWithHttpInfo({ UpdateUserPreferencesRequest? updateUserPreferencesRequest, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/my_preferences'; + + // ignore: prefer_final_locals + Object? postBody = updateUserPreferencesRequest; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Update my preferences + /// + /// When calling this endpoint the client provides a single object, containing the properties that it wants to change, in the body. + /// + /// Parameters: + /// + /// * [UpdateUserPreferencesRequest] updateUserPreferencesRequest: + Future updateUserPreferences({ UpdateUserPreferencesRequest? updateUserPreferencesRequest, }) async { + final response = await updateUserPreferencesWithHttpInfo( updateUserPreferencesRequest: updateUserPreferencesRequest, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } +} diff --git a/lib/api/users_api.dart b/lib/api/users_api.dart new file mode 100644 index 0000000..67f4a34 --- /dev/null +++ b/lib/api/users_api.dart @@ -0,0 +1,554 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class UsersApi { + UsersApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Create User + /// + /// Creates a new user. Only administrators and users with manage_user global permission are allowed to do so. When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. Valid values for `status`: 1) \"active\" - In this case a password has to be provided in addition to the other attributes. 2) \"invited\" - In this case nothing but the email address is required. The rest is optional. An invitation will be sent to the user. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [UserCreateModel] userCreateModel: + Future createUserWithHttpInfo({ UserCreateModel? userCreateModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/users'; + + // ignore: prefer_final_locals + Object? postBody = userCreateModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create User + /// + /// Creates a new user. Only administrators and users with manage_user global permission are allowed to do so. When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. Valid values for `status`: 1) \"active\" - In this case a password has to be provided in addition to the other attributes. 2) \"invited\" - In this case nothing but the email address is required. The rest is optional. An invitation will be sent to the user. + /// + /// Parameters: + /// + /// * [UserCreateModel] userCreateModel: + Future createUser({ UserCreateModel? userCreateModel, }) async { + final response = await createUserWithHttpInfo( userCreateModel: userCreateModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserModel',) as UserModel; + + } + return null; + } + + /// Delete user + /// + /// Permanently deletes the specified user account. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// User id + Future deleteUserWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/users/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Delete user + /// + /// Permanently deletes the specified user account. + /// + /// Parameters: + /// + /// * [int] id (required): + /// User id + Future deleteUser(int id,) async { + final response = await deleteUserWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// List Users + /// + /// Lists users. Only administrators or users with manage_user global permission have permission to do this. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + status: Status the user has + group: Name of the group in which to-be-listed users are members. + name: Filter users in whose first or last names, or email addresses the given string occurs. + login: User's login + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + /// + /// * [String] select: + /// Comma separated list of properties to include. + Future listUsersWithHttpInfo({ int? offset, int? pageSize, String? filters, String? sortBy, String? select, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/users'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (offset != null) { + queryParams.addAll(_queryParams('', 'offset', offset)); + } + if (pageSize != null) { + queryParams.addAll(_queryParams('', 'pageSize', pageSize)); + } + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + if (select != null) { + queryParams.addAll(_queryParams('', 'select', select)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List Users + /// + /// Lists users. Only administrators or users with manage_user global permission have permission to do this. + /// + /// Parameters: + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + status: Status the user has + group: Name of the group in which to-be-listed users are members. + name: Filter users in whose first or last names, or email addresses the given string occurs. + login: User's login + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + /// + /// * [String] select: + /// Comma separated list of properties to include. + Future listUsers({ int? offset, int? pageSize, String? filters, String? sortBy, String? select, }) async { + final response = await listUsersWithHttpInfo( offset: offset, pageSize: pageSize, filters: filters, sortBy: sortBy, select: select, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserCollectionModel',) as UserCollectionModel; + + } + return null; + } + + /// Lock user + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// User id + Future lockUserWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/users/{id}/lock' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Lock user + /// + /// Parameters: + /// + /// * [int] id (required): + /// User id + Future lockUser(int id,) async { + final response = await lockUserWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserModel',) as UserModel; + + } + return null; + } + + /// Unlock user + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// User id + Future unlockUserWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/users/{id}/lock' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Unlock user + /// + /// Parameters: + /// + /// * [int] id (required): + /// User id + Future unlockUser(int id,) async { + final response = await unlockUserWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserModel',) as UserModel; + + } + return null; + } + + /// Update user + /// + /// Updates the user's writable attributes. When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// User id + /// + /// * [UserCreateModel] userCreateModel: + Future updateUserWithHttpInfo(int id, { UserCreateModel? userCreateModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/users/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = userCreateModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Update user + /// + /// Updates the user's writable attributes. When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. + /// + /// Parameters: + /// + /// * [int] id (required): + /// User id + /// + /// * [UserCreateModel] userCreateModel: + Future updateUser(int id, { UserCreateModel? userCreateModel, }) async { + final response = await updateUserWithHttpInfo(id, userCreateModel: userCreateModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserModel',) as UserModel; + + } + return null; + } + + /// User update form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// User id + Future userUpdateFormWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/users/{id}/form' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// User update form + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// User id + Future userUpdateForm(int id,) async { + final response = await userUpdateFormWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// View user + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] id (required): + /// User id. Use `me` to reference current user, if any. + Future viewUserWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/users/{id}' + .replaceAll('{id}', id); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View user + /// + /// + /// + /// Parameters: + /// + /// * [String] id (required): + /// User id. Use `me` to reference current user, if any. + Future viewUser(String id,) async { + final response = await viewUserWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserModel',) as UserModel; + + } + return null; + } + + /// View user schema + /// + /// The schema response use two exemplary custom fields that extend the schema response. Depending on your instance and custom field configuration, the response will look somewhat different. + /// + /// Note: This method returns the HTTP [Response]. + Future viewUserSchemaWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/users/schema'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View user schema + /// + /// The schema response use two exemplary custom fields that extend the schema response. Depending on your instance and custom field configuration, the response will look somewhat different. + Future viewUserSchema() async { + final response = await viewUserSchemaWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } +} diff --git a/lib/api/values_property_api.dart b/lib/api/values_property_api.dart new file mode 100644 index 0000000..e1e5de6 --- /dev/null +++ b/lib/api/values_property_api.dart @@ -0,0 +1,143 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class ValuesPropertyApi { + ValuesPropertyApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Get a notification detail + /// + /// Returns an individual detail of a notification identified by the notification id and the id of the detail. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] notificationId (required): + /// notification id + /// + /// * [int] id (required): + /// detail id + Future viewNotificationDetailWithHttpInfo(int notificationId, int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/notifications/{notification_id}/details/{id}' + .replaceAll('{notification_id}', notificationId.toString()) + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get a notification detail + /// + /// Returns an individual detail of a notification identified by the notification id and the id of the detail. + /// + /// Parameters: + /// + /// * [int] notificationId (required): + /// notification id + /// + /// * [int] id (required): + /// detail id + Future viewNotificationDetail(int notificationId, int id,) async { + final response = await viewNotificationDetailWithHttpInfo(notificationId, id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ValuesPropertyModel',) as ValuesPropertyModel; + + } + return null; + } + + /// View Values schema + /// + /// The schema of a `Values` resource. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] id (required): + /// The identifier of the value. This is typically the value of the `property` property of the `Values` resource. It should be in lower camelcase format. + Future viewValuesSchemaWithHttpInfo(String id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/values/schema/{id}' + .replaceAll('{id}', id); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Values schema + /// + /// The schema of a `Values` resource. + /// + /// Parameters: + /// + /// * [String] id (required): + /// The identifier of the value. This is typically the value of the `property` property of the `Values` resource. It should be in lower camelcase format. + Future viewValuesSchema(String id,) async { + final response = await viewValuesSchemaWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SchemaModel',) as SchemaModel; + + } + return null; + } +} diff --git a/lib/api/versions_api.dart b/lib/api/versions_api.dart new file mode 100644 index 0000000..3774357 --- /dev/null +++ b/lib/api/versions_api.dart @@ -0,0 +1,543 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class VersionsApi { + VersionsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Available projects for versions + /// + /// Gets a list of projects in which a version can be created in. The list contains all projects in which the user issuing the request has the manage versions permissions. + /// + /// Note: This method returns the HTTP [Response]. + Future availableProjectsForVersionsWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/versions/available_projects'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Available projects for versions + /// + /// Gets a list of projects in which a version can be created in. The list contains all projects in which the user issuing the request has the manage versions permissions. + Future availableProjectsForVersions() async { + final response = await availableProjectsForVersionsWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Create version + /// + /// Creates a new version applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a version's attributes and are accepted by the endpoint. You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation. + /// + /// Note: This method returns the HTTP [Response]. + Future createVersionWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/versions'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create version + /// + /// Creates a new version applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a version's attributes and are accepted by the endpoint. You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation. + Future createVersion() async { + final response = await createVersionWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'VersionModel',) as VersionModel; + + } + return null; + } + + /// Delete version + /// + /// Deletes the version. Work packages associated to the version will no longer be assigned to it. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Version id + Future deleteVersionWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/versions/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Delete version + /// + /// Deletes the version. Work packages associated to the version will no longer be assigned to it. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Version id + Future deleteVersion(int id,) async { + final response = await deleteVersionWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// List versions + /// + /// Returns a collection of versions. The client can choose to filter the versions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain versions, for which the requesting client has sufficient permissions (*view_work_packages*). + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + sharing: filters versions by how they are shared within the server (*none*, *descendants*, *hierarchy*, *tree*, *system*). + Future listVersionsWithHttpInfo({ String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/versions'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List versions + /// + /// Returns a collection of versions. The client can choose to filter the versions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain versions, for which the requesting client has sufficient permissions (*view_work_packages*). + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + sharing: filters versions by how they are shared within the server (*none*, *descendants*, *hierarchy*, *tree*, *system*). + Future listVersions({ String? filters, }) async { + final response = await listVersionsWithHttpInfo( filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// List versions available in a project + /// + /// This endpoint lists the versions that are *available* in a given project. Note that due to sharing this might be more than the versions *defined* by that project. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the project whose versions will be listed + Future listVersionsAvailableInAProjectWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/versions' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List versions available in a project + /// + /// This endpoint lists the versions that are *available* in a given project. Note that due to sharing this might be more than the versions *defined* by that project. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the project whose versions will be listed + Future listVersionsAvailableInAProject(int id,) async { + final response = await listVersionsAvailableInAProjectWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Update Version + /// + /// Updates the given version by applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a version's attributes and are accepted by the endpoint. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Version id + Future updateVersionWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/versions/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Update Version + /// + /// Updates the given version by applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a version's attributes and are accepted by the endpoint. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Version id + Future updateVersion(int id,) async { + final response = await updateVersionWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'VersionModel',) as VersionModel; + + } + return null; + } + + /// Version create form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future versionCreateFormWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/versions/form'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Version create form + /// + /// + Future versionCreateForm() async { + final response = await versionCreateFormWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Version update form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future versionUpdateFormWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/versions/{id}/form' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Version update form + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future versionUpdateForm(int id,) async { + final response = await versionUpdateFormWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// View version + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Version id + Future viewVersionWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/versions/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View version + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Version id + Future viewVersion(int id,) async { + final response = await viewVersionWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'VersionModel',) as VersionModel; + + } + return null; + } + + /// View version schema + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future viewVersionSchemaWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/versions/schema'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View version schema + /// + /// + Future viewVersionSchema() async { + final response = await viewVersionSchemaWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } +} diff --git a/lib/api/views_api.dart b/lib/api/views_api.dart new file mode 100644 index 0000000..900d918 --- /dev/null +++ b/lib/api/views_api.dart @@ -0,0 +1,186 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class ViewsApi { + ViewsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Create view + /// + /// When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a View can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. There are different subtypes of `Views` (e.g. `Views::WorkPackagesTable`) with each having its own endpoint for creating that subtype e.g. * `/api/v3/views/work_packages_table` for `Views::WorkPackagesTable` * `/api/v3/views/team_planner` for `Views::TeamPlanner` * `/api/v3/views/work_packages_calendar` for `Views::WorkPackagesCalendar` **Not yet implemented** To get the list of available subtypes and by that the endpoints for creating a subtype, use the ``` /api/v3/views/schemas ``` endpoint. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] id (required): + /// The view identifier + /// + /// * [CreateViewsRequest] createViewsRequest: + Future createViewsWithHttpInfo(String id, { CreateViewsRequest? createViewsRequest, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/views/{id}' + .replaceAll('{id}', id); + + // ignore: prefer_final_locals + Object? postBody = createViewsRequest; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create view + /// + /// When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a View can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. There are different subtypes of `Views` (e.g. `Views::WorkPackagesTable`) with each having its own endpoint for creating that subtype e.g. * `/api/v3/views/work_packages_table` for `Views::WorkPackagesTable` * `/api/v3/views/team_planner` for `Views::TeamPlanner` * `/api/v3/views/work_packages_calendar` for `Views::WorkPackagesCalendar` **Not yet implemented** To get the list of available subtypes and by that the endpoints for creating a subtype, use the ``` /api/v3/views/schemas ``` endpoint. + /// + /// Parameters: + /// + /// * [String] id (required): + /// The view identifier + /// + /// * [CreateViewsRequest] createViewsRequest: + Future createViews(String id, { CreateViewsRequest? createViewsRequest, }) async { + final response = await createViewsWithHttpInfo(id, createViewsRequest: createViewsRequest, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// List views + /// + /// Returns a collection of Views. The collection can be filtered via query parameters similar to how work packages are filtered. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Currently supported filters are: + project: filters views by the project their associated query is assigned to. If the project filter is passed with the `!*` (not any) operator, global views are returned. + id: filters views based on their id + type: filters views based on their type + Future listViewsWithHttpInfo({ String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/views'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List views + /// + /// Returns a collection of Views. The collection can be filtered via query parameters similar to how work packages are filtered. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Currently supported filters are: + project: filters views by the project their associated query is assigned to. If the project filter is passed with the `!*` (not any) operator, global views are returned. + id: filters views based on their id + type: filters views based on their type + Future listViews({ String? filters, }) async { + final response = await listViewsWithHttpInfo( filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// View view + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// View id + Future viewViewWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/views/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View view + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// View id + Future viewView(int id,) async { + final response = await viewViewWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } +} diff --git a/lib/api/wiki_pages_api.dart b/lib/api/wiki_pages_api.dart new file mode 100644 index 0000000..85e80da --- /dev/null +++ b/lib/api/wiki_pages_api.dart @@ -0,0 +1,77 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class WikiPagesApi { + WikiPagesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// View Wiki Page + /// + /// Retrieve an individual wiki page as identified by the id parameter + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Wiki page identifier + Future viewWikiPageWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/wiki_pages/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Wiki Page + /// + /// Retrieve an individual wiki page as identified by the id parameter + /// + /// Parameters: + /// + /// * [int] id (required): + /// Wiki page identifier + Future viewWikiPage(int id,) async { + final response = await viewWikiPageWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WikiPageModel',) as WikiPageModel; + + } + return null; + } +} diff --git a/lib/api/work_packages_api.dart b/lib/api/work_packages_api.dart new file mode 100644 index 0000000..803a1b2 --- /dev/null +++ b/lib/api/work_packages_api.dart @@ -0,0 +1,1781 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class WorkPackagesApi { + WorkPackagesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Add watcher + /// + /// Adds a watcher to the specified work package. The request is expected to contain a single JSON object, that contains a link object under the `user` key. The response will be user added as watcher. In case the user was already watching the work package an `HTTP 200` is returned, an `HTTP 201` if the user was added as a new watcher. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [AddWatcherRequest] addWatcherRequest: + Future addWatcherWithHttpInfo(int id, { AddWatcherRequest? addWatcherRequest, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/watchers' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = addWatcherRequest; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Add watcher + /// + /// Adds a watcher to the specified work package. The request is expected to contain a single JSON object, that contains a link object under the `user` key. The response will be user added as watcher. In case the user was already watching the work package an `HTTP 200` is returned, an `HTTP 201` if the user was added as a new watcher. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [AddWatcherRequest] addWatcherRequest: + Future addWatcher(int id, { AddWatcherRequest? addWatcherRequest, }) async { + final response = await addWatcherWithHttpInfo(id, addWatcherRequest: addWatcherRequest, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Available assignees + /// + /// Gets a list of users that can be assigned to work packages in the given project. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future availableAssigneesWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/available_assignees' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Available assignees + /// + /// Gets a list of users that can be assigned to work packages in the given project. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future availableAssignees(int id,) async { + final response = await availableAssigneesWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Available projects for work package + /// + /// Gets a list of projects that are available as projects to which the work package can be moved. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// work package id + Future availableProjectsForWorkPackageWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/available_projects' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Available projects for work package + /// + /// Gets a list of projects that are available as projects to which the work package can be moved. + /// + /// Parameters: + /// + /// * [int] id (required): + /// work package id + Future availableProjectsForWorkPackage(int id,) async { + final response = await availableProjectsForWorkPackageWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Available responsibles + /// + /// Gets a list of users that can be assigned as the responsible of a work package in the given project. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future availableResponsiblesWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/available_responsibles' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Available responsibles + /// + /// Gets a list of users that can be assigned as the responsible of a work package in the given project. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + Future availableResponsibles(int id,) async { + final response = await availableResponsiblesWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Available watchers + /// + /// Gets a list of users that are able to be watchers of the specified work package. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// work package id + Future availableWatchersWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/available_watchers' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Available watchers + /// + /// Gets a list of users that are able to be watchers of the specified work package. + /// + /// Parameters: + /// + /// * [int] id (required): + /// work package id + Future availableWatchers(int id,) async { + final response = await availableWatchersWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Comment work package + /// + /// Creates an activity for the selected work package and, on success, returns the updated activity. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [bool] notify: + /// Indicates whether change notifications (e.g. via E-Mail) should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. + /// + /// * [CommentWorkPackageRequest] commentWorkPackageRequest: + Future commentWorkPackageWithHttpInfo(int id, { bool? notify, CommentWorkPackageRequest? commentWorkPackageRequest, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/activities' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = commentWorkPackageRequest; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (notify != null) { + queryParams.addAll(_queryParams('', 'notify', notify)); + } + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Comment work package + /// + /// Creates an activity for the selected work package and, on success, returns the updated activity. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [bool] notify: + /// Indicates whether change notifications (e.g. via E-Mail) should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. + /// + /// * [CommentWorkPackageRequest] commentWorkPackageRequest: + Future commentWorkPackage(int id, { bool? notify, CommentWorkPackageRequest? commentWorkPackageRequest, }) async { + final response = await commentWorkPackageWithHttpInfo(id, notify: notify, commentWorkPackageRequest: commentWorkPackageRequest, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Create work package in project + /// + /// When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a WorkPackage can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + /// + /// * [bool] notify: + /// Indicates whether change notifications (e.g. via E-Mail) should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. + Future createProjectWorkPackageWithHttpInfo(int id, { bool? notify, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/work_packages' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (notify != null) { + queryParams.addAll(_queryParams('', 'notify', notify)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create work package in project + /// + /// When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a WorkPackage can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + /// + /// * [bool] notify: + /// Indicates whether change notifications (e.g. via E-Mail) should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. + Future createProjectWorkPackage(int id, { bool? notify, }) async { + final response = await createProjectWorkPackageWithHttpInfo(id, notify: notify, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkPackageModel',) as WorkPackageModel; + + } + return null; + } + + /// Create Relation + /// + /// When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a Relation can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + Future createRelationWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/relations' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create Relation + /// + /// When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a Relation can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + Future createRelation(int id,) async { + final response = await createRelationWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Create Work Package + /// + /// When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a WorkPackage can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. A project link must be set when creating work packages through this route. When setting start date, finish date, and duration together, their correctness will be checked and a 422 error will be returned if one value does not match with the two others. You can make the server compute a value: set only two values in the request and the third one will be computed and returned in the response. For instance, when sending `{ \"startDate\": \"2022-08-23\", duration: \"P2D\" }`, the response will include `{ \"dueDate\": \"2022-08-24\" }`. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [bool] notify: + /// Indicates whether change notifications (e.g. via E-Mail) should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. + /// + /// * [WorkPackageModel] workPackageModel: + Future createWorkPackageWithHttpInfo({ bool? notify, WorkPackageModel? workPackageModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages'; + + // ignore: prefer_final_locals + Object? postBody = workPackageModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (notify != null) { + queryParams.addAll(_queryParams('', 'notify', notify)); + } + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create Work Package + /// + /// When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a WorkPackage can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. A project link must be set when creating work packages through this route. When setting start date, finish date, and duration together, their correctness will be checked and a 422 error will be returned if one value does not match with the two others. You can make the server compute a value: set only two values in the request and the third one will be computed and returned in the response. For instance, when sending `{ \"startDate\": \"2022-08-23\", duration: \"P2D\" }`, the response will include `{ \"dueDate\": \"2022-08-24\" }`. + /// + /// Parameters: + /// + /// * [bool] notify: + /// Indicates whether change notifications (e.g. via E-Mail) should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. + /// + /// * [WorkPackageModel] workPackageModel: + Future createWorkPackage({ bool? notify, WorkPackageModel? workPackageModel, }) async { + final response = await createWorkPackageWithHttpInfo( notify: notify, workPackageModel: workPackageModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkPackageModel',) as WorkPackageModel; + + } + return null; + } + + /// Creates file links. + /// + /// Creates file links on a work package. The request is interpreted as a bulk insert, where every element of the collection is validated separately. Each element contains the origin meta data and a link to the storage, the file link is about to point to. The storage link can be provided as a resource link with id or as the host url. The file's id and name are considered mandatory information. The rest of the origin meta data SHOULD be provided by the client. The _mimeType_ SHOULD be a standard mime type. An empty mime type will be handled as unknown. To link a folder, the custom mime type `application/x-op-directory` MUST be used. Up to 20 file links can be submitted at once. If any element data is invalid, no file links will be created. If a file link with matching origin id, work package, and storage already exists, then it will not create an additional file link or update the meta data. Instead the information from the existing file link will be returned. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [FileLinkCollectionWriteModel] fileLinkCollectionWriteModel: + Future createWorkPackageFileLinkWithHttpInfo(int id, { FileLinkCollectionWriteModel? fileLinkCollectionWriteModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/file_links' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = fileLinkCollectionWriteModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Creates file links. + /// + /// Creates file links on a work package. The request is interpreted as a bulk insert, where every element of the collection is validated separately. Each element contains the origin meta data and a link to the storage, the file link is about to point to. The storage link can be provided as a resource link with id or as the host url. The file's id and name are considered mandatory information. The rest of the origin meta data SHOULD be provided by the client. The _mimeType_ SHOULD be a standard mime type. An empty mime type will be handled as unknown. To link a folder, the custom mime type `application/x-op-directory` MUST be used. Up to 20 file links can be submitted at once. If any element data is invalid, no file links will be created. If a file link with matching origin id, work package, and storage already exists, then it will not create an additional file link or update the meta data. Instead the information from the existing file link will be returned. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [FileLinkCollectionWriteModel] fileLinkCollectionWriteModel: + Future createWorkPackageFileLink(int id, { FileLinkCollectionWriteModel? fileLinkCollectionWriteModel, }) async { + final response = await createWorkPackageFileLinkWithHttpInfo(id, fileLinkCollectionWriteModel: fileLinkCollectionWriteModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'FileLinkCollectionReadModel',) as FileLinkCollectionReadModel; + + } + return null; + } + + /// Delete Work Package + /// + /// Deletes the work package, as well as: - all associated time entries - its hierarchy of child work packages + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + Future deleteWorkPackageWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Delete Work Package + /// + /// Deletes the work package, as well as: - all associated time entries - its hierarchy of child work packages + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + Future deleteWorkPackage(int id,) async { + final response = await deleteWorkPackageWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Get work packages of project + /// + /// Returns the collection of work packages that are related to the given project. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. If no filter is to be applied, the client should send an empty array (`[]`). + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + /// + /// * [String] groupBy: + /// The column to group by. + /// + /// * [bool] showSums: + /// Indicates whether properties should be summed up if they support it. + /// + /// * [String] select: + /// Comma separated list of properties to include. + Future getProjectWorkPackageCollectionWithHttpInfo(int id, { int? offset, int? pageSize, String? filters, String? sortBy, String? groupBy, bool? showSums, String? select, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/work_packages' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (offset != null) { + queryParams.addAll(_queryParams('', 'offset', offset)); + } + if (pageSize != null) { + queryParams.addAll(_queryParams('', 'pageSize', pageSize)); + } + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + if (groupBy != null) { + queryParams.addAll(_queryParams('', 'groupBy', groupBy)); + } + if (showSums != null) { + queryParams.addAll(_queryParams('', 'showSums', showSums)); + } + if (select != null) { + queryParams.addAll(_queryParams('', 'select', select)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get work packages of project + /// + /// Returns the collection of work packages that are related to the given project. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. If no filter is to be applied, the client should send an empty array (`[]`). + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + /// + /// * [String] groupBy: + /// The column to group by. + /// + /// * [bool] showSums: + /// Indicates whether properties should be summed up if they support it. + /// + /// * [String] select: + /// Comma separated list of properties to include. + Future getProjectWorkPackageCollection(int id, { int? offset, int? pageSize, String? filters, String? sortBy, String? groupBy, bool? showSums, String? select, }) async { + final response = await getProjectWorkPackageCollectionWithHttpInfo(id, offset: offset, pageSize: pageSize, filters: filters, sortBy: sortBy, groupBy: groupBy, showSums: showSums, select: select, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkPackagesModel',) as WorkPackagesModel; + + } + return null; + } + + /// Available relation candidates + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + /// + /// * [int] pageSize: + /// Maximum number of candidates to list (default 10) + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same filters as the [work packages](https://www.openproject.org/docs/api/endpoints/work-packages/) endpoint. + /// + /// * [String] query: + /// Shortcut for filtering by ID or subject + /// + /// * [String] type: + /// Type of relation to find candidates for (default \"relates\") + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same sort criteria as the [work packages](https://www.openproject.org/docs/api/endpoints/work-packages/) endpoint. + Future listAvailableRelationCandidatesWithHttpInfo(int id, { int? pageSize, String? filters, String? query, String? type, String? sortBy, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/available_relation_candidates' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (pageSize != null) { + queryParams.addAll(_queryParams('', 'pageSize', pageSize)); + } + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + if (query != null) { + queryParams.addAll(_queryParams('', 'query', query)); + } + if (type != null) { + queryParams.addAll(_queryParams('', 'type', type)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Available relation candidates + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Project id + /// + /// * [int] pageSize: + /// Maximum number of candidates to list (default 10) + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same filters as the [work packages](https://www.openproject.org/docs/api/endpoints/work-packages/) endpoint. + /// + /// * [String] query: + /// Shortcut for filtering by ID or subject + /// + /// * [String] type: + /// Type of relation to find candidates for (default \"relates\") + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same sort criteria as the [work packages](https://www.openproject.org/docs/api/endpoints/work-packages/) endpoint. + Future listAvailableRelationCandidates(int id, { int? pageSize, String? filters, String? query, String? type, String? sortBy, }) async { + final response = await listAvailableRelationCandidatesWithHttpInfo(id, pageSize: pageSize, filters: filters, query: query, type: type, sortBy: sortBy, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// List relations + /// + /// Lists all relations this work package is involved in. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + Future listRelationsWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/relations' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List relations + /// + /// Lists all relations this work package is involved in. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + Future listRelations(int id,) async { + final response = await listRelationsWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// List watchers + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + Future listWatchersWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/watchers' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List watchers + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + Future listWatchers(int id,) async { + final response = await listWatchersWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WatchersModel',) as WatchersModel; + + } + return null; + } + + /// List work package activities + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + Future listWorkPackageActivitiesWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/activities' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List work package activities + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + Future listWorkPackageActivities(int id,) async { + final response = await listWorkPackageActivitiesWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Gets all file links of a work package + /// + /// Gets all file links of a work package. As a side effect, for every file link a request is sent to the storage's origin to fetch live data and patch the file link's data before returning, as well as retrieving permissions of the user on this origin file. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. The following filters are supported: - storage + Future listWorkPackageFileLinksWithHttpInfo(int id, { String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/file_links' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Gets all file links of a work package + /// + /// Gets all file links of a work package. As a side effect, for every file link a request is sent to the storage's origin to fetch live data and patch the file link's data before returning, as well as retrieving permissions of the user on this origin file. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. The following filters are supported: - storage + Future listWorkPackageFileLinks(int id, { String? filters, }) async { + final response = await listWorkPackageFileLinksWithHttpInfo(id, filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'FileLinkCollectionReadModel',) as FileLinkCollectionReadModel; + + } + return null; + } + + /// List Work Package Schemas + /// + /// List work package schemas. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters (required): + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: The schema's id Schema id has the form `project_id-work_package_type_id`. + Future listWorkPackageSchemasWithHttpInfo(String filters,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/schemas'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + queryParams.addAll(_queryParams('', 'filters', filters)); + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List Work Package Schemas + /// + /// List work package schemas. + /// + /// Parameters: + /// + /// * [String] filters (required): + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + id: The schema's id Schema id has the form `project_id-work_package_type_id`. + Future listWorkPackageSchemas(String filters,) async { + final response = await listWorkPackageSchemasWithHttpInfo(filters,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// List work packages + /// + /// Returns a collection of work packages. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. If no filter is to be applied, the client should send an empty array (`[]`), otherwise a default filter is applied. A Currently supported filters are (there are additional filters added by modules): - assigned_to - assignee_or_group - attachment_base - attachment_content - attachment_file_name - author - blocked - blocks - category - comment - created_at - custom_field - dates_interval - description - done_ratio - due_date - duplicated - duplicates - duration - estimated_hours - file_link_origin_id - follows - group - id - includes - linkable_to_storage_id - linkable_to_storage_url - manual_sort - milestone - only_subproject - parent - partof - precedes - principal_base - priority - project - relatable - relates - required - requires - responsible - role - search - start_date - status - storage_id - storage_url - subject - subject_or_id - subproject - type - typeahead - updated_at - version - watcher - work_package + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + /// + /// * [String] groupBy: + /// The column to group by. + /// + /// * [bool] showSums: + /// Indicates whether properties should be summed up if they support it. + /// + /// * [String] select: + /// Comma separated list of properties to include. + /// + /// * [String] timestamps: + /// In order to perform a [baseline comparison](/docs/api/baseline-comparisons), you may provide one or several timestamps in ISO-8601 format as comma-separated list. The timestamps may be absolute or relative, such as ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Usually, the first timestamp is the baseline date, the last timestamp is the current date. Values older than 1 day are accepted only with valid Enterprise Token available. + Future listWorkPackagesWithHttpInfo({ int? offset, int? pageSize, String? filters, String? sortBy, String? groupBy, bool? showSums, String? select, String? timestamps, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (offset != null) { + queryParams.addAll(_queryParams('', 'offset', offset)); + } + if (pageSize != null) { + queryParams.addAll(_queryParams('', 'pageSize', pageSize)); + } + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + if (sortBy != null) { + queryParams.addAll(_queryParams('', 'sortBy', sortBy)); + } + if (groupBy != null) { + queryParams.addAll(_queryParams('', 'groupBy', groupBy)); + } + if (showSums != null) { + queryParams.addAll(_queryParams('', 'showSums', showSums)); + } + if (select != null) { + queryParams.addAll(_queryParams('', 'select', select)); + } + if (timestamps != null) { + queryParams.addAll(_queryParams('', 'timestamps', timestamps)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// List work packages + /// + /// Returns a collection of work packages. + /// + /// Parameters: + /// + /// * [int] offset: + /// Page number inside the requested collection. + /// + /// * [int] pageSize: + /// Number of elements to display per page. + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. If no filter is to be applied, the client should send an empty array (`[]`), otherwise a default filter is applied. A Currently supported filters are (there are additional filters added by modules): - assigned_to - assignee_or_group - attachment_base - attachment_content - attachment_file_name - author - blocked - blocks - category - comment - created_at - custom_field - dates_interval - description - done_ratio - due_date - duplicated - duplicates - duration - estimated_hours - file_link_origin_id - follows - group - id - includes - linkable_to_storage_id - linkable_to_storage_url - manual_sort - milestone - only_subproject - parent - partof - precedes - principal_base - priority - project - relatable - relates - required - requires - responsible - role - search - start_date - status - storage_id - storage_url - subject - subject_or_id - subproject - type - typeahead - updated_at - version - watcher - work_package + /// + /// * [String] sortBy: + /// JSON specifying sort criteria. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + /// + /// * [String] groupBy: + /// The column to group by. + /// + /// * [bool] showSums: + /// Indicates whether properties should be summed up if they support it. + /// + /// * [String] select: + /// Comma separated list of properties to include. + /// + /// * [String] timestamps: + /// In order to perform a [baseline comparison](/docs/api/baseline-comparisons), you may provide one or several timestamps in ISO-8601 format as comma-separated list. The timestamps may be absolute or relative, such as ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Usually, the first timestamp is the baseline date, the last timestamp is the current date. Values older than 1 day are accepted only with valid Enterprise Token available. + Future listWorkPackages({ int? offset, int? pageSize, String? filters, String? sortBy, String? groupBy, bool? showSums, String? select, String? timestamps, }) async { + final response = await listWorkPackagesWithHttpInfo( offset: offset, pageSize: pageSize, filters: filters, sortBy: sortBy, groupBy: groupBy, showSums: showSums, select: select, timestamps: timestamps, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkPackagesModel',) as WorkPackagesModel; + + } + return null; + } + + /// Remove watcher + /// + /// Removes the specified user from the list of watchers for the given work package. If the request succeeds, the specified user is not watching the work package anymore. *Note: This might also be the case, if the specified user did not watch the work package prior to the request.* + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [int] userId (required): + /// User id + Future removeWatcherWithHttpInfo(int id, int userId,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/watchers/{user_id}' + .replaceAll('{id}', id.toString()) + .replaceAll('{user_id}', userId.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Remove watcher + /// + /// Removes the specified user from the list of watchers for the given work package. If the request succeeds, the specified user is not watching the work package anymore. *Note: This might also be the case, if the specified user did not watch the work package prior to the request.* + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [int] userId (required): + /// User id + Future removeWatcher(int id, int userId,) async { + final response = await removeWatcherWithHttpInfo(id, userId,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Revisions + /// + /// Gets a list of revisions that are linked to this work package, e.g., because it is referenced in the commit message of the revision. Only linked revisions from repositories are shown if the user has the view changesets permission in the defining project. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + Future revisionsWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/revisions' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Revisions + /// + /// Gets a list of revisions that are linked to this work package, e.g., because it is referenced in the commit message of the revision. Only linked revisions from repositories are shown if the user has the view changesets permission in the defining project. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + Future revisions(int id,) async { + final response = await revisionsWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object; + + } + return null; + } + + /// Update a Work Package + /// + /// When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body. Note that it is only allowed to provide properties or links supporting the **write** operation. Additionally to the fields the client wants to change, it is mandatory to provide the value of `lockVersion` which was received by the `GET` request this change originates from. The value of `lockVersion` is used to implement [optimistic locking](https://en.wikipedia.org/wiki/Optimistic_concurrency_control). + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [bool] notify: + /// Indicates whether change notifications should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. + /// + /// * [WorkPackageModel] workPackageModel: + Future updateWorkPackageWithHttpInfo(int id, { bool? notify, WorkPackageModel? workPackageModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = workPackageModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (notify != null) { + queryParams.addAll(_queryParams('', 'notify', notify)); + } + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Update a Work Package + /// + /// When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body. Note that it is only allowed to provide properties or links supporting the **write** operation. Additionally to the fields the client wants to change, it is mandatory to provide the value of `lockVersion` which was received by the `GET` request this change originates from. The value of `lockVersion` is used to implement [optimistic locking](https://en.wikipedia.org/wiki/Optimistic_concurrency_control). + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [bool] notify: + /// Indicates whether change notifications should be sent. Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. + /// + /// * [WorkPackageModel] workPackageModel: + Future updateWorkPackage(int id, { bool? notify, WorkPackageModel? workPackageModel, }) async { + final response = await updateWorkPackageWithHttpInfo(id, notify: notify, workPackageModel: workPackageModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkPackagePatchModel',) as WorkPackagePatchModel; + + } + return null; + } + + /// View Work Package + /// + /// Returns the specified work package. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [String] timestamps: + /// In order to perform a [baseline comparison](/docs/api/baseline-comparisons) of the work-package attributes, you may provide one or several timestamps in ISO-8601 format as comma-separated list. The timestamps may be absolute or relative, such as ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Usually, the first timestamp is the baseline date, the last timestamp is the current date. Values older than 1 day are accepted only with valid Enterprise Token available. + Future viewWorkPackageWithHttpInfo(int id, { String? timestamps, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (timestamps != null) { + queryParams.addAll(_queryParams('', 'timestamps', timestamps)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Work Package + /// + /// Returns the specified work package. + /// + /// Parameters: + /// + /// * [int] id (required): + /// Work package id + /// + /// * [String] timestamps: + /// In order to perform a [baseline comparison](/docs/api/baseline-comparisons) of the work-package attributes, you may provide one or several timestamps in ISO-8601 format as comma-separated list. The timestamps may be absolute or relative, such as ISO8601 dates, ISO8601 durations and the following relative date keywords: \"oneDayAgo@HH:MM+HH:MM\", \"lastWorkingDay@HH:MM+HH:MM\", \"oneWeekAgo@HH:MM+HH:MM\", \"oneMonthAgo@HH:MM+HH:MM\". The first \"HH:MM\" part represents the zero paded hours and minutes. The last \"+HH:MM\" part represents the timezone offset from UTC associated with the time, the offset can be positive or negative e.g.\"oneDayAgo@01:00+01:00\", \"oneDayAgo@01:00-01:00\". Usually, the first timestamp is the baseline date, the last timestamp is the current date. Values older than 1 day are accepted only with valid Enterprise Token available. + Future viewWorkPackage(int id, { String? timestamps, }) async { + final response = await viewWorkPackageWithHttpInfo(id, timestamps: timestamps, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkPackageModel',) as WorkPackageModel; + + } + return null; + } + + /// View Work Package Schema + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] identifier (required): + /// Identifier of the schema + Future viewWorkPackageSchemaWithHttpInfo(String identifier,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/schemas/{identifier}' + .replaceAll('{identifier}', identifier); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View Work Package Schema + /// + /// + /// + /// Parameters: + /// + /// * [String] identifier (required): + /// Identifier of the schema + Future viewWorkPackageSchema(String identifier,) async { + final response = await viewWorkPackageSchemaWithHttpInfo(identifier,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Work Package Create Form + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future workPackageCreateFormWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/form'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Work Package Create Form + /// + /// + Future workPackageCreateForm() async { + final response = await workPackageCreateFormWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Work Package Create Form For Project + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the project in which the work package will be created + Future workPackageCreateFormForProjectWithHttpInfo(int id,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/projects/{id}/work_packages/form' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Work Package Create Form For Project + /// + /// + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the project in which the work package will be created + Future workPackageCreateFormForProject(int id,) async { + final response = await workPackageCreateFormForProjectWithHttpInfo(id,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Work Package Edit Form + /// + /// When calling this endpoint, the client provides a single object containing the properties and links to be edited, in the body. Note that it is only allowed to provide properties or links supporting the write operation. When setting start date, finish date, and duration together, their correctness will be checked and a 422 error will be returned if one value does not match with the two others. You can make the server compute a value: set only two values in the request and the third one will be computed and returned in the response. For instance, when sending `{ \"startDate\": \"2022-08-23\", duration: \"P2D\" }`, the response will include `{ \"dueDate\": \"2022-08-24\" }`. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the work package being modified + /// + /// * [WorkPackageModel] workPackageModel: + Future workPackageEditFormWithHttpInfo(int id, { WorkPackageModel? workPackageModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/work_packages/{id}/form' + .replaceAll('{id}', id.toString()); + + // ignore: prefer_final_locals + Object? postBody = workPackageModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Work Package Edit Form + /// + /// When calling this endpoint, the client provides a single object containing the properties and links to be edited, in the body. Note that it is only allowed to provide properties or links supporting the write operation. When setting start date, finish date, and duration together, their correctness will be checked and a 422 error will be returned if one value does not match with the two others. You can make the server compute a value: set only two values in the request and the third one will be computed and returned in the response. For instance, when sending `{ \"startDate\": \"2022-08-23\", duration: \"P2D\" }`, the response will include `{ \"dueDate\": \"2022-08-24\" }`. + /// + /// Parameters: + /// + /// * [int] id (required): + /// ID of the work package being modified + /// + /// * [WorkPackageModel] workPackageModel: + Future workPackageEditForm(int id, { WorkPackageModel? workPackageModel, }) async { + final response = await workPackageEditFormWithHttpInfo(id, workPackageModel: workPackageModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } +} diff --git a/lib/api/work_schedule_api.dart b/lib/api/work_schedule_api.dart new file mode 100644 index 0000000..7a141eb --- /dev/null +++ b/lib/api/work_schedule_api.dart @@ -0,0 +1,656 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class WorkScheduleApi { + WorkScheduleApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Creates a non-working day (NOT IMPLEMENTED) + /// + /// **(NOT IMPLEMENTED)** Marks a day as being a non-working day. Note: creating a non-working day will not affect the start and finish dates of work packages but will affect their duration. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [NonWorkingDayModel] nonWorkingDayModel: + Future createNonWorkingDayWithHttpInfo({ NonWorkingDayModel? nonWorkingDayModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/days/non_working'; + + // ignore: prefer_final_locals + Object? postBody = nonWorkingDayModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Creates a non-working day (NOT IMPLEMENTED) + /// + /// **(NOT IMPLEMENTED)** Marks a day as being a non-working day. Note: creating a non-working day will not affect the start and finish dates of work packages but will affect their duration. + /// + /// Parameters: + /// + /// * [NonWorkingDayModel] nonWorkingDayModel: + Future createNonWorkingDay({ NonWorkingDayModel? nonWorkingDayModel, }) async { + final response = await createNonWorkingDayWithHttpInfo( nonWorkingDayModel: nonWorkingDayModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NonWorkingDayModel',) as NonWorkingDayModel; + + } + return null; + } + + /// Removes a non-working day (NOT IMPLEMENTED) + /// + /// **(NOT IMPLEMENTED)** Removes the non-working day at the given date. Note: deleting a non-working day will not affect the start and finish dates of work packages but will affect their duration. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [DateTime] date (required): + /// The date of the non-working day to view in ISO 8601 format. + Future deleteNonWorkingDayWithHttpInfo(DateTime date,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/days/non_working/{date}' + .replaceAll('{date}', date.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Removes a non-working day (NOT IMPLEMENTED) + /// + /// **(NOT IMPLEMENTED)** Removes the non-working day at the given date. Note: deleting a non-working day will not affect the start and finish dates of work packages but will affect their duration. + /// + /// Parameters: + /// + /// * [DateTime] date (required): + /// The date of the non-working day to view in ISO 8601 format. + Future deleteNonWorkingDay(DateTime date,) async { + final response = await deleteNonWorkingDayWithHttpInfo(date,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Lists days + /// + /// Lists days information for a given date interval. All days from the beginning of current month to the end of following month are returned by default. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + date: the inclusive date interval to scope days to look up. When unspecified, default is from the beginning of current month to the end of following month. Example: `{ \"date\": { \"operator\": \"<>d\", \"values\": [\"2022-05-02\",\"2022-05-26\"] } }` would return days between May 5 and May 26 2022, inclusive. + working: when `true`, returns only the working days. When `false`, returns only the non-working days (weekend days and non-working days). When unspecified, returns both working and non-working days. Example: `{ \"working\": { \"operator\": \"=\", \"values\": [\"t\"] } }` would exclude non-working days from the response. + Future listDaysWithHttpInfo({ String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/days'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Lists days + /// + /// Lists days information for a given date interval. All days from the beginning of current month to the end of following month are returned by default. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + date: the inclusive date interval to scope days to look up. When unspecified, default is from the beginning of current month to the end of following month. Example: `{ \"date\": { \"operator\": \"<>d\", \"values\": [\"2022-05-02\",\"2022-05-26\"] } }` would return days between May 5 and May 26 2022, inclusive. + working: when `true`, returns only the working days. When `false`, returns only the non-working days (weekend days and non-working days). When unspecified, returns both working and non-working days. Example: `{ \"working\": { \"operator\": \"=\", \"values\": [\"t\"] } }` would exclude non-working days from the response. + Future listDays({ String? filters, }) async { + final response = await listDaysWithHttpInfo( filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DayCollectionModel',) as DayCollectionModel; + + } + return null; + } + + /// Lists all non working days + /// + /// Lists all one-time non working days, such as holidays. It does not lists the non working weekdays, such as each Saturday, Sunday. For listing the weekends, the `/api/v3/days` endpoint should be used. All days from current year are returned by default. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + date: the inclusive date interval to scope days to look up. When unspecified, default is from the beginning to the end of current year. Example: `{ \"date\": { \"operator\": \"<>d\", \"values\": [\"2022-05-02\",\"2022-05-26\"] } }` would return days between May 5 and May 26 2022, inclusive. + Future listNonWorkingDaysWithHttpInfo({ String? filters, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/days/non_working'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (filters != null) { + queryParams.addAll(_queryParams('', 'filters', filters)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Lists all non working days + /// + /// Lists all one-time non working days, such as holidays. It does not lists the non working weekdays, such as each Saturday, Sunday. For listing the weekends, the `/api/v3/days` endpoint should be used. All days from current year are returned by default. + /// + /// Parameters: + /// + /// * [String] filters: + /// JSON specifying filter conditions. Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + date: the inclusive date interval to scope days to look up. When unspecified, default is from the beginning to the end of current year. Example: `{ \"date\": { \"operator\": \"<>d\", \"values\": [\"2022-05-02\",\"2022-05-26\"] } }` would return days between May 5 and May 26 2022, inclusive. + Future listNonWorkingDays({ String? filters, }) async { + final response = await listNonWorkingDaysWithHttpInfo( filters: filters, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NonWorkingDayCollectionModel',) as NonWorkingDayCollectionModel; + + } + return null; + } + + /// Lists week days + /// + /// Lists week days with work schedule information. + /// + /// Note: This method returns the HTTP [Response]. + Future listWeekDaysWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/v3/days/week'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Lists week days + /// + /// Lists week days with work schedule information. + Future listWeekDays() async { + final response = await listWeekDaysWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WeekDayCollectionModel',) as WeekDayCollectionModel; + + } + return null; + } + + /// Update a non-working day attributes (NOT IMPLEMENTED) + /// + /// **(NOT IMPLEMENTED)** Update the non-working day information for a given date. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [DateTime] date (required): + /// The date of the non-working day to view in ISO 8601 format. + /// + /// * [NonWorkingDayModel] nonWorkingDayModel: + Future updateNonWorkingDayWithHttpInfo(DateTime date, { NonWorkingDayModel? nonWorkingDayModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/days/non_working/{date}' + .replaceAll('{date}', date.toString()); + + // ignore: prefer_final_locals + Object? postBody = nonWorkingDayModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Update a non-working day attributes (NOT IMPLEMENTED) + /// + /// **(NOT IMPLEMENTED)** Update the non-working day information for a given date. + /// + /// Parameters: + /// + /// * [DateTime] date (required): + /// The date of the non-working day to view in ISO 8601 format. + /// + /// * [NonWorkingDayModel] nonWorkingDayModel: + Future updateNonWorkingDay(DateTime date, { NonWorkingDayModel? nonWorkingDayModel, }) async { + final response = await updateNonWorkingDayWithHttpInfo(date, nonWorkingDayModel: nonWorkingDayModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NonWorkingDayModel',) as NonWorkingDayModel; + + } + return null; + } + + /// Update a week day attributes (NOT IMPLEMENTED) + /// + /// **(NOT IMPLEMENTED)** Makes a week day a working or non-working day. Note: changing a week day working attribute will not affect the start and finish dates of work packages but will affect their duration attribute. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] day (required): + /// The week day from 1 to 7. 1 is Monday. 7 is Sunday. + /// + /// * [WeekDayWriteModel] weekDayWriteModel: + Future updateWeekDayWithHttpInfo(int day, { WeekDayWriteModel? weekDayWriteModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/days/week/{day}' + .replaceAll('{day}', day.toString()); + + // ignore: prefer_final_locals + Object? postBody = weekDayWriteModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Update a week day attributes (NOT IMPLEMENTED) + /// + /// **(NOT IMPLEMENTED)** Makes a week day a working or non-working day. Note: changing a week day working attribute will not affect the start and finish dates of work packages but will affect their duration attribute. + /// + /// Parameters: + /// + /// * [int] day (required): + /// The week day from 1 to 7. 1 is Monday. 7 is Sunday. + /// + /// * [WeekDayWriteModel] weekDayWriteModel: + Future updateWeekDay(int day, { WeekDayWriteModel? weekDayWriteModel, }) async { + final response = await updateWeekDayWithHttpInfo(day, weekDayWriteModel: weekDayWriteModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WeekDayModel',) as WeekDayModel; + + } + return null; + } + + /// Update week days (NOT IMPLEMENTED) + /// + /// **(NOT IMPLEMENTED)** Update multiple week days with work schedule information. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [WeekDayCollectionWriteModel] weekDayCollectionWriteModel: + Future updateWeekDaysWithHttpInfo({ WeekDayCollectionWriteModel? weekDayCollectionWriteModel, }) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/days/week'; + + // ignore: prefer_final_locals + Object? postBody = weekDayCollectionWriteModel; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Update week days (NOT IMPLEMENTED) + /// + /// **(NOT IMPLEMENTED)** Update multiple week days with work schedule information. + /// + /// Parameters: + /// + /// * [WeekDayCollectionWriteModel] weekDayCollectionWriteModel: + Future updateWeekDays({ WeekDayCollectionWriteModel? weekDayCollectionWriteModel, }) async { + final response = await updateWeekDaysWithHttpInfo( weekDayCollectionWriteModel: weekDayCollectionWriteModel, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WeekDayCollectionModel',) as WeekDayCollectionModel; + + } + return null; + } + + /// View day + /// + /// View the day information for a given date. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [DateTime] date (required): + /// The date of the non-working day to view in ISO 8601 format. + Future viewDayWithHttpInfo(DateTime date,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/days/{date}' + .replaceAll('{date}', date.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View day + /// + /// View the day information for a given date. + /// + /// Parameters: + /// + /// * [DateTime] date (required): + /// The date of the non-working day to view in ISO 8601 format. + Future viewDay(DateTime date,) async { + final response = await viewDayWithHttpInfo(date,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DayModel',) as DayModel; + + } + return null; + } + + /// View a non-working day + /// + /// Returns the non-working day information for a given date. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [DateTime] date (required): + /// The date of the non-working day to view in ISO 8601 format. + Future viewNonWorkingDayWithHttpInfo(DateTime date,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/days/non_working/{date}' + .replaceAll('{date}', date.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View a non-working day + /// + /// Returns the non-working day information for a given date. + /// + /// Parameters: + /// + /// * [DateTime] date (required): + /// The date of the non-working day to view in ISO 8601 format. + Future viewNonWorkingDay(DateTime date,) async { + final response = await viewNonWorkingDayWithHttpInfo(date,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NonWorkingDayModel',) as NonWorkingDayModel; + + } + return null; + } + + /// View a week day + /// + /// View a week day and its attributes. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] day (required): + /// The week day from 1 to 7. 1 is Monday. 7 is Sunday. + Future viewWeekDayWithHttpInfo(int day,) async { + // ignore: prefer_const_declarations + final path = r'/api/v3/days/week/{day}' + .replaceAll('{day}', day.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// View a week day + /// + /// View a week day and its attributes. + /// + /// Parameters: + /// + /// * [int] day (required): + /// The week day from 1 to 7. 1 is Monday. 7 is Sunday. + Future viewWeekDay(int day,) async { + final response = await viewWeekDayWithHttpInfo(day,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WeekDayModel',) as WeekDayModel; + + } + return null; + } +} diff --git a/lib/api_client.dart b/lib/api_client.dart new file mode 100644 index 0000000..89b8a02 --- /dev/null +++ b/lib/api_client.dart @@ -0,0 +1,1030 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ApiClient { + ApiClient({this.basePath = 'https://community.openproject.org', this.authentication,}); + + final String basePath; + final Authentication? authentication; + + var _client = Client(); + final _defaultHeaderMap = {}; + + /// Returns the current HTTP [Client] instance to use in this class. + /// + /// The return value is guaranteed to never be null. + Client get client => _client; + + /// Requests to use a new HTTP [Client] in this class. + set client(Client newClient) { + _client = newClient; + } + + Map get defaultHeaderMap => _defaultHeaderMap; + + void addDefaultHeader(String key, String value) { + _defaultHeaderMap[key] = value; + } + + // We don't use a Map for queryParams. + // If collectionFormat is 'multi', a key might appear multiple times. + Future invokeAPI( + String path, + String method, + List queryParams, + Object? body, + Map headerParams, + Map formParams, + String? contentType, + ) async { + await authentication?.applyToParams(queryParams, headerParams); + + headerParams.addAll(_defaultHeaderMap); + if (contentType != null) { + headerParams['Content-Type'] = contentType; + } + + final urlEncodedQueryParams = queryParams.map((param) => '$param'); + final queryString = urlEncodedQueryParams.isNotEmpty ? '?${urlEncodedQueryParams.join('&')}' : ''; + final uri = Uri.parse('$basePath$path$queryString'); + + try { + // Special case for uploading a single file which isn't a 'multipart/form-data'. + if ( + body is MultipartFile && (contentType == null || + !contentType.toLowerCase().startsWith('multipart/form-data')) + ) { + final request = StreamedRequest(method, uri); + request.headers.addAll(headerParams); + request.contentLength = body.length; + body.finalize().listen( + request.sink.add, + onDone: request.sink.close, + // ignore: avoid_types_on_closure_parameters + onError: (Object error, StackTrace trace) => request.sink.close(), + cancelOnError: true, + ); + final response = await _client.send(request); + return Response.fromStream(response); + } + + if (body is MultipartRequest) { + final request = MultipartRequest(method, uri); + request.fields.addAll(body.fields); + request.files.addAll(body.files); + request.headers.addAll(body.headers); + request.headers.addAll(headerParams); + final response = await _client.send(request); + return Response.fromStream(response); + } + + final msgBody = contentType == 'application/x-www-form-urlencoded' + ? formParams + : await serializeAsync(body); + final nullableHeaderParams = headerParams.isEmpty ? null : headerParams; + + switch(method) { + case 'POST': return await _client.post(uri, headers: nullableHeaderParams, body: msgBody,); + case 'PUT': return await _client.put(uri, headers: nullableHeaderParams, body: msgBody,); + case 'DELETE': return await _client.delete(uri, headers: nullableHeaderParams, body: msgBody,); + case 'PATCH': return await _client.patch(uri, headers: nullableHeaderParams, body: msgBody,); + case 'HEAD': return await _client.head(uri, headers: nullableHeaderParams,); + case 'GET': return await _client.get(uri, headers: nullableHeaderParams,); + } + } on SocketException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'Socket operation failed: $method $path', + error, + trace, + ); + } on TlsException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'TLS/SSL communication failed: $method $path', + error, + trace, + ); + } on IOException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'I/O operation failed: $method $path', + error, + trace, + ); + } on ClientException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'HTTP connection failed: $method $path', + error, + trace, + ); + } on Exception catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'Exception occurred: $method $path', + error, + trace, + ); + } + + throw ApiException( + HttpStatus.badRequest, + 'Invalid HTTP operation: $method $path', + ); + } + + Future deserializeAsync(String value, String targetType, {bool growable = false,}) async => + // ignore: deprecated_member_use_from_same_package + deserialize(value, targetType, growable: growable); + + @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.') + dynamic deserialize(String value, String targetType, {bool growable = false,}) { + // Remove all spaces. Necessary for regular expressions as well. + targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments + + // If the expected target type is String, nothing to do... + return targetType == 'String' + ? value + : fromJson(json.decode(value), targetType, growable: growable); + } + + // ignore: deprecated_member_use_from_same_package + Future serializeAsync(Object? value) async => serialize(value); + + @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.') + String serialize(Object? value) => value == null ? '' : json.encode(value); + + /// Returns a native instance of an OpenAPI class matching the [specified type][targetType]. + static dynamic fromJson(dynamic value, String targetType, {bool growable = false,}) { + try { + switch (targetType) { + case 'String': + return value is String ? value : value.toString(); + case 'int': + return value is int ? value : int.parse('$value'); + case 'double': + return value is double ? value : double.parse('$value'); + case 'bool': + if (value is bool) { + return value; + } + final valueString = '$value'.toLowerCase(); + return valueString == 'true' || valueString == '1'; + case 'DateTime': + return value is DateTime ? value : DateTime.tryParse(value); + case 'ActivityModel': + return ActivityModel.fromJson(value); + case 'ActivityModelComment': + return ActivityModelComment.fromJson(value); + case 'AddWatcherRequest': + return AddWatcherRequest.fromJson(value); + case 'AttachmentModel': + return AttachmentModel.fromJson(value); + case 'AttachmentModelDescription': + return AttachmentModelDescription.fromJson(value); + case 'AttachmentModelLinks': + return AttachmentModelLinks.fromJson(value); + case 'AttachmentModelLinksAuthor': + return AttachmentModelLinksAuthor.fromJson(value); + case 'AttachmentModelLinksContainer': + return AttachmentModelLinksContainer.fromJson(value); + case 'AttachmentModelLinksDelete': + return AttachmentModelLinksDelete.fromJson(value); + case 'AttachmentModelLinksDownloadLocation': + return AttachmentModelLinksDownloadLocation.fromJson(value); + case 'AttachmentModelLinksSelf': + return AttachmentModelLinksSelf.fromJson(value); + case 'AttachmentsModel': + return AttachmentsModel.fromJson(value); + case 'AttachmentsModelAllOfEmbedded': + return AttachmentsModelAllOfEmbedded.fromJson(value); + case 'AttachmentsModelAllOfEmbeddedElementsInner': + return AttachmentsModelAllOfEmbeddedElementsInner.fromJson(value); + case 'AttachmentsModelAllOfLinks': + return AttachmentsModelAllOfLinks.fromJson(value); + case 'AttachmentsModelAllOfLinksSelf': + return AttachmentsModelAllOfLinksSelf.fromJson(value); + case 'BudgetModel': + return BudgetModel.fromJson(value); + case 'BudgetModelLinks': + return BudgetModelLinks.fromJson(value); + case 'BudgetModelLinksSelf': + return BudgetModelLinksSelf.fromJson(value); + case 'CategoryModel': + return CategoryModel.fromJson(value); + case 'CategoryModelLinks': + return CategoryModelLinks.fromJson(value); + case 'CategoryModelLinksDefaultAssignee': + return CategoryModelLinksDefaultAssignee.fromJson(value); + case 'CategoryModelLinksProject': + return CategoryModelLinksProject.fromJson(value); + case 'CategoryModelLinksSelf': + return CategoryModelLinksSelf.fromJson(value); + case 'CollectionModel': + return CollectionModel.fromJson(value); + case 'CollectionModelLinks': + return CollectionModelLinks.fromJson(value); + case 'CollectionModelLinksSelf': + return CollectionModelLinksSelf.fromJson(value); + case 'CommentWorkPackageRequest': + return CommentWorkPackageRequest.fromJson(value); + case 'ConfigurationModel': + return ConfigurationModel.fromJson(value); + case 'CreateViewsRequest': + return CreateViewsRequest.fromJson(value); + case 'CreateViewsRequestLinks': + return CreateViewsRequestLinks.fromJson(value); + case 'CreateViewsRequestLinksQuery': + return CreateViewsRequestLinksQuery.fromJson(value); + case 'CustomActionModel': + return CustomActionModel.fromJson(value); + case 'CustomActionModelLinks': + return CustomActionModelLinks.fromJson(value); + case 'CustomActionModelLinksExecuteImmediately': + return CustomActionModelLinksExecuteImmediately.fromJson(value); + case 'CustomActionModelLinksSelf': + return CustomActionModelLinksSelf.fromJson(value); + case 'CustomOptionModel': + return CustomOptionModel.fromJson(value); + case 'CustomOptionModelLinks': + return CustomOptionModelLinks.fromJson(value); + case 'CustomOptionModelLinksSelf': + return CustomOptionModelLinksSelf.fromJson(value); + case 'DayCollectionModel': + return DayCollectionModel.fromJson(value); + case 'DayCollectionModelAllOfEmbedded': + return DayCollectionModelAllOfEmbedded.fromJson(value); + case 'DayCollectionModelAllOfLinks': + return DayCollectionModelAllOfLinks.fromJson(value); + case 'DayCollectionModelAllOfLinksSelf': + return DayCollectionModelAllOfLinksSelf.fromJson(value); + case 'DayModel': + return DayModel.fromJson(value); + case 'DayModelLinks': + return DayModelLinks.fromJson(value); + case 'DayModelLinksWeekDay': + return DayModelLinksWeekDay.fromJson(value); + case 'DocumentModel': + return DocumentModel.fromJson(value); + case 'DocumentModelLinks': + return DocumentModelLinks.fromJson(value); + case 'DocumentModelLinksAttachments': + return DocumentModelLinksAttachments.fromJson(value); + case 'DocumentModelLinksProject': + return DocumentModelLinksProject.fromJson(value); + case 'DocumentModelLinksSelf': + return DocumentModelLinksSelf.fromJson(value); + case 'ErrorResponse': + return ErrorResponse.fromJson(value); + case 'ErrorResponseEmbedded': + return ErrorResponseEmbedded.fromJson(value); + case 'ErrorResponseEmbeddedDetails': + return ErrorResponseEmbeddedDetails.fromJson(value); + case 'ExecuteCustomActionRequest': + return ExecuteCustomActionRequest.fromJson(value); + case 'ExecuteCustomActionRequestLinks': + return ExecuteCustomActionRequestLinks.fromJson(value); + case 'ExecuteCustomActionRequestLinksWorkPackage': + return ExecuteCustomActionRequestLinksWorkPackage.fromJson(value); + case 'FileLinkCollectionReadModel': + return FileLinkCollectionReadModel.fromJson(value); + case 'FileLinkCollectionReadModelAllOfEmbedded': + return FileLinkCollectionReadModelAllOfEmbedded.fromJson(value); + case 'FileLinkCollectionReadModelAllOfLinks': + return FileLinkCollectionReadModelAllOfLinks.fromJson(value); + case 'FileLinkCollectionReadModelAllOfLinksSelf': + return FileLinkCollectionReadModelAllOfLinksSelf.fromJson(value); + case 'FileLinkCollectionWriteModel': + return FileLinkCollectionWriteModel.fromJson(value); + case 'FileLinkCollectionWriteModelAllOfEmbedded': + return FileLinkCollectionWriteModelAllOfEmbedded.fromJson(value); + case 'FileLinkOriginDataModel': + return FileLinkOriginDataModel.fromJson(value); + case 'FileLinkReadModel': + return FileLinkReadModel.fromJson(value); + case 'FileLinkReadModelEmbedded': + return FileLinkReadModelEmbedded.fromJson(value); + case 'FileLinkReadModelLinks': + return FileLinkReadModelLinks.fromJson(value); + case 'FileLinkReadModelLinksContainer': + return FileLinkReadModelLinksContainer.fromJson(value); + case 'FileLinkReadModelLinksCreator': + return FileLinkReadModelLinksCreator.fromJson(value); + case 'FileLinkReadModelLinksDelete': + return FileLinkReadModelLinksDelete.fromJson(value); + case 'FileLinkReadModelLinksOriginOpen': + return FileLinkReadModelLinksOriginOpen.fromJson(value); + case 'FileLinkReadModelLinksOriginOpenLocation': + return FileLinkReadModelLinksOriginOpenLocation.fromJson(value); + case 'FileLinkReadModelLinksPermission': + return FileLinkReadModelLinksPermission.fromJson(value); + case 'FileLinkReadModelLinksSelf': + return FileLinkReadModelLinksSelf.fromJson(value); + case 'FileLinkReadModelLinksStaticOriginDownload': + return FileLinkReadModelLinksStaticOriginDownload.fromJson(value); + case 'FileLinkReadModelLinksStaticOriginOpen': + return FileLinkReadModelLinksStaticOriginOpen.fromJson(value); + case 'FileLinkReadModelLinksStaticOriginOpenLocation': + return FileLinkReadModelLinksStaticOriginOpenLocation.fromJson(value); + case 'FileLinkReadModelLinksStorage': + return FileLinkReadModelLinksStorage.fromJson(value); + case 'FileLinkWriteModel': + return FileLinkWriteModel.fromJson(value); + case 'Formattable': + return Formattable.fromJson(value); + case 'GridCollectionModel': + return GridCollectionModel.fromJson(value); + case 'GridCollectionModelAllOfEmbedded': + return GridCollectionModelAllOfEmbedded.fromJson(value); + case 'GridReadModel': + return GridReadModel.fromJson(value); + case 'GridReadModelLinks': + return GridReadModelLinks.fromJson(value); + case 'GridReadModelLinksAddAttachment': + return GridReadModelLinksAddAttachment.fromJson(value); + case 'GridReadModelLinksAttachments': + return GridReadModelLinksAttachments.fromJson(value); + case 'GridReadModelLinksDelete': + return GridReadModelLinksDelete.fromJson(value); + case 'GridReadModelLinksScope': + return GridReadModelLinksScope.fromJson(value); + case 'GridReadModelLinksSelf': + return GridReadModelLinksSelf.fromJson(value); + case 'GridReadModelLinksUpdate': + return GridReadModelLinksUpdate.fromJson(value); + case 'GridReadModelLinksUpdateImmediately': + return GridReadModelLinksUpdateImmediately.fromJson(value); + case 'GridWidgetModel': + return GridWidgetModel.fromJson(value); + case 'GridWriteModel': + return GridWriteModel.fromJson(value); + case 'GridWriteModelLinks': + return GridWriteModelLinks.fromJson(value); + case 'GroupCollectionModel': + return GroupCollectionModel.fromJson(value); + case 'GroupCollectionModelAllOfEmbedded': + return GroupCollectionModelAllOfEmbedded.fromJson(value); + case 'GroupCollectionModelAllOfLinks': + return GroupCollectionModelAllOfLinks.fromJson(value); + case 'GroupCollectionModelAllOfLinksSelf': + return GroupCollectionModelAllOfLinksSelf.fromJson(value); + case 'GroupModel': + return GroupModel.fromJson(value); + case 'GroupModelLinks': + return GroupModelLinks.fromJson(value); + case 'GroupModelLinksDelete': + return GroupModelLinksDelete.fromJson(value); + case 'GroupModelLinksMembersInner': + return GroupModelLinksMembersInner.fromJson(value); + case 'GroupModelLinksMemberships': + return GroupModelLinksMemberships.fromJson(value); + case 'GroupModelLinksSelf': + return GroupModelLinksSelf.fromJson(value); + case 'GroupModelLinksUpdateImmediately': + return GroupModelLinksUpdateImmediately.fromJson(value); + case 'GroupWriteModel': + return GroupWriteModel.fromJson(value); + case 'GroupWriteModelLinks': + return GroupWriteModelLinks.fromJson(value); + case 'GroupWriteModelLinksMembersInner': + return GroupWriteModelLinksMembersInner.fromJson(value); + case 'HelpTextCollectionModel': + return HelpTextCollectionModel.fromJson(value); + case 'HelpTextCollectionModelAllOfEmbedded': + return HelpTextCollectionModelAllOfEmbedded.fromJson(value); + case 'HelpTextCollectionModelAllOfLinks': + return HelpTextCollectionModelAllOfLinks.fromJson(value); + case 'HelpTextCollectionModelAllOfLinksSelf': + return HelpTextCollectionModelAllOfLinksSelf.fromJson(value); + case 'HelpTextModel': + return HelpTextModel.fromJson(value); + case 'HelpTextModelLinks': + return HelpTextModelLinks.fromJson(value); + case 'HelpTextModelLinksAddAttachment': + return HelpTextModelLinksAddAttachment.fromJson(value); + case 'HelpTextModelLinksAttachments': + return HelpTextModelLinksAttachments.fromJson(value); + case 'HelpTextModelLinksEditText': + return HelpTextModelLinksEditText.fromJson(value); + case 'HelpTextModelLinksSelf': + return HelpTextModelLinksSelf.fromJson(value); + case 'Link': + return Link.fromJson(value); + case 'NewsModel': + return NewsModel.fromJson(value); + case 'NewsModelLinks': + return NewsModelLinks.fromJson(value); + case 'NewsModelLinksAuthor': + return NewsModelLinksAuthor.fromJson(value); + case 'NewsModelLinksProject': + return NewsModelLinksProject.fromJson(value); + case 'NewsModelLinksSelf': + return NewsModelLinksSelf.fromJson(value); + case 'NonWorkingDayCollectionModel': + return NonWorkingDayCollectionModel.fromJson(value); + case 'NonWorkingDayCollectionModelAllOfEmbedded': + return NonWorkingDayCollectionModelAllOfEmbedded.fromJson(value); + case 'NonWorkingDayCollectionModelAllOfLinks': + return NonWorkingDayCollectionModelAllOfLinks.fromJson(value); + case 'NonWorkingDayCollectionModelAllOfLinksSelf': + return NonWorkingDayCollectionModelAllOfLinksSelf.fromJson(value); + case 'NonWorkingDayModel': + return NonWorkingDayModel.fromJson(value); + case 'NonWorkingDayModelLinks': + return NonWorkingDayModelLinks.fromJson(value); + case 'NonWorkingDayModelLinksSelf': + return NonWorkingDayModelLinksSelf.fromJson(value); + case 'NotificationCollectionModel': + return NotificationCollectionModel.fromJson(value); + case 'NotificationCollectionModelAllOfEmbedded': + return NotificationCollectionModelAllOfEmbedded.fromJson(value); + case 'NotificationCollectionModelAllOfLinks': + return NotificationCollectionModelAllOfLinks.fromJson(value); + case 'NotificationCollectionModelAllOfLinksChangeSize': + return NotificationCollectionModelAllOfLinksChangeSize.fromJson(value); + case 'NotificationCollectionModelAllOfLinksJumpTo': + return NotificationCollectionModelAllOfLinksJumpTo.fromJson(value); + case 'NotificationCollectionModelAllOfLinksSelf': + return NotificationCollectionModelAllOfLinksSelf.fromJson(value); + case 'NotificationModel': + return NotificationModel.fromJson(value); + case 'NotificationModelDetailsInner': + return NotificationModelDetailsInner.fromJson(value); + case 'NotificationModelEmbedded': + return NotificationModelEmbedded.fromJson(value); + case 'NotificationModelEmbeddedResource': + return NotificationModelEmbeddedResource.fromJson(value); + case 'NotificationModelLinks': + return NotificationModelLinks.fromJson(value); + case 'NotificationModelLinksActivity': + return NotificationModelLinksActivity.fromJson(value); + case 'NotificationModelLinksActor': + return NotificationModelLinksActor.fromJson(value); + case 'NotificationModelLinksDetailsInner': + return NotificationModelLinksDetailsInner.fromJson(value); + case 'NotificationModelLinksProject': + return NotificationModelLinksProject.fromJson(value); + case 'NotificationModelLinksReadIAN': + return NotificationModelLinksReadIAN.fromJson(value); + case 'NotificationModelLinksResource': + return NotificationModelLinksResource.fromJson(value); + case 'NotificationModelLinksSelf': + return NotificationModelLinksSelf.fromJson(value); + case 'NotificationModelLinksUnreadIAN': + return NotificationModelLinksUnreadIAN.fromJson(value); + case 'OAuthApplicationReadModel': + return OAuthApplicationReadModel.fromJson(value); + case 'OAuthApplicationReadModelLinks': + return OAuthApplicationReadModelLinks.fromJson(value); + case 'OAuthApplicationReadModelLinksIntegration': + return OAuthApplicationReadModelLinksIntegration.fromJson(value); + case 'OAuthApplicationReadModelLinksOwner': + return OAuthApplicationReadModelLinksOwner.fromJson(value); + case 'OAuthApplicationReadModelLinksRedirectUri': + return OAuthApplicationReadModelLinksRedirectUri.fromJson(value); + case 'OAuthApplicationReadModelLinksSelf': + return OAuthApplicationReadModelLinksSelf.fromJson(value); + case 'OAuthClientCredentialsReadModel': + return OAuthClientCredentialsReadModel.fromJson(value); + case 'OAuthClientCredentialsReadModelLinks': + return OAuthClientCredentialsReadModelLinks.fromJson(value); + case 'OAuthClientCredentialsReadModelLinksIntegration': + return OAuthClientCredentialsReadModelLinksIntegration.fromJson(value); + case 'OAuthClientCredentialsReadModelLinksSelf': + return OAuthClientCredentialsReadModelLinksSelf.fromJson(value); + case 'OAuthClientCredentialsWriteModel': + return OAuthClientCredentialsWriteModel.fromJson(value); + case 'PaginatedCollectionModel': + return PaginatedCollectionModel.fromJson(value); + case 'PaginatedCollectionModelAllOfLinks': + return PaginatedCollectionModelAllOfLinks.fromJson(value); + case 'PaginatedCollectionModelAllOfLinksChangeSize': + return PaginatedCollectionModelAllOfLinksChangeSize.fromJson(value); + case 'PaginatedCollectionModelAllOfLinksJumpTo': + return PaginatedCollectionModelAllOfLinksJumpTo.fromJson(value); + case 'PostModel': + return PostModel.fromJson(value); + case 'PostModelLinks': + return PostModelLinks.fromJson(value); + case 'PostModelLinksAddAttachment': + return PostModelLinksAddAttachment.fromJson(value); + case 'PriorityModel': + return PriorityModel.fromJson(value); + case 'PriorityModelLinks': + return PriorityModelLinks.fromJson(value); + case 'PriorityModelLinksSelf': + return PriorityModelLinksSelf.fromJson(value); + case 'ProjectModel': + return ProjectModel.fromJson(value); + case 'ProjectModelLinks': + return ProjectModelLinks.fromJson(value); + case 'ProjectModelLinksCategories': + return ProjectModelLinksCategories.fromJson(value); + case 'ProjectModelLinksCreateWorkPackage': + return ProjectModelLinksCreateWorkPackage.fromJson(value); + case 'ProjectModelLinksCreateWorkPackageImmediately': + return ProjectModelLinksCreateWorkPackageImmediately.fromJson(value); + case 'ProjectModelLinksDelete': + return ProjectModelLinksDelete.fromJson(value); + case 'ProjectModelLinksMemberships': + return ProjectModelLinksMemberships.fromJson(value); + case 'ProjectModelLinksParent': + return ProjectModelLinksParent.fromJson(value); + case 'ProjectModelLinksSelf': + return ProjectModelLinksSelf.fromJson(value); + case 'ProjectModelLinksStatus': + return ProjectModelLinksStatus.fromJson(value); + case 'ProjectModelLinksStoragesInner': + return ProjectModelLinksStoragesInner.fromJson(value); + case 'ProjectModelLinksTypes': + return ProjectModelLinksTypes.fromJson(value); + case 'ProjectModelLinksUpdate': + return ProjectModelLinksUpdate.fromJson(value); + case 'ProjectModelLinksUpdateImmediately': + return ProjectModelLinksUpdateImmediately.fromJson(value); + case 'ProjectModelLinksVersions': + return ProjectModelLinksVersions.fromJson(value); + case 'ProjectModelLinksWorkPackages': + return ProjectModelLinksWorkPackages.fromJson(value); + case 'ProjectModelStatusExplanation': + return ProjectModelStatusExplanation.fromJson(value); + case 'ProjectStorageCollectionModel': + return ProjectStorageCollectionModel.fromJson(value); + case 'ProjectStorageCollectionModelAllOfEmbedded': + return ProjectStorageCollectionModelAllOfEmbedded.fromJson(value); + case 'ProjectStorageCollectionModelAllOfLinks': + return ProjectStorageCollectionModelAllOfLinks.fromJson(value); + case 'ProjectStorageCollectionModelAllOfLinksSelf': + return ProjectStorageCollectionModelAllOfLinksSelf.fromJson(value); + case 'ProjectStorageModel': + return ProjectStorageModel.fromJson(value); + case 'ProjectStorageModelLinks': + return ProjectStorageModelLinks.fromJson(value); + case 'ProjectStorageModelLinksCreator': + return ProjectStorageModelLinksCreator.fromJson(value); + case 'ProjectStorageModelLinksProject': + return ProjectStorageModelLinksProject.fromJson(value); + case 'ProjectStorageModelLinksProjectFolder': + return ProjectStorageModelLinksProjectFolder.fromJson(value); + case 'ProjectStorageModelLinksSelf': + return ProjectStorageModelLinksSelf.fromJson(value); + case 'ProjectStorageModelLinksStorage': + return ProjectStorageModelLinksStorage.fromJson(value); + case 'QueryColumnModel': + return QueryColumnModel.fromJson(value); + case 'QueryCreateForm': + return QueryCreateForm.fromJson(value); + case 'QueryFilterInstanceSchemaModel': + return QueryFilterInstanceSchemaModel.fromJson(value); + case 'QueryFilterInstanceSchemaModelLinks': + return QueryFilterInstanceSchemaModelLinks.fromJson(value); + case 'QueryFilterInstanceSchemaModelLinksFilter': + return QueryFilterInstanceSchemaModelLinksFilter.fromJson(value); + case 'QueryFilterInstanceSchemaModelLinksSelf': + return QueryFilterInstanceSchemaModelLinksSelf.fromJson(value); + case 'QueryFilterModel': + return QueryFilterModel.fromJson(value); + case 'QueryModel': + return QueryModel.fromJson(value); + case 'QueryModelLinks': + return QueryModelLinks.fromJson(value); + case 'QueryModelLinksStar': + return QueryModelLinksStar.fromJson(value); + case 'QueryModelLinksUnstar': + return QueryModelLinksUnstar.fromJson(value); + case 'QueryModelLinksUpdate': + return QueryModelLinksUpdate.fromJson(value); + case 'QueryModelLinksUpdateImmediately': + return QueryModelLinksUpdateImmediately.fromJson(value); + case 'QueryOperatorModel': + return QueryOperatorModel.fromJson(value); + case 'QuerySortByModel': + return QuerySortByModel.fromJson(value); + case 'QueryUpdateForm': + return QueryUpdateForm.fromJson(value); + case 'RelationModel': + return RelationModel.fromJson(value); + case 'RelationModelLinks': + return RelationModelLinks.fromJson(value); + case 'RelationModelLinksDelete': + return RelationModelLinksDelete.fromJson(value); + case 'RelationModelLinksFrom': + return RelationModelLinksFrom.fromJson(value); + case 'RelationModelLinksSchema': + return RelationModelLinksSchema.fromJson(value); + case 'RelationModelLinksSelf': + return RelationModelLinksSelf.fromJson(value); + case 'RelationModelLinksTo': + return RelationModelLinksTo.fromJson(value); + case 'RelationModelLinksUpdate': + return RelationModelLinksUpdate.fromJson(value); + case 'RelationModelLinksUpdateImmediately': + return RelationModelLinksUpdateImmediately.fromJson(value); + case 'RevisionModel': + return RevisionModel.fromJson(value); + case 'RevisionModelLinks': + return RevisionModelLinks.fromJson(value); + case 'RevisionModelLinksAuthor': + return RevisionModelLinksAuthor.fromJson(value); + case 'RevisionModelLinksProject': + return RevisionModelLinksProject.fromJson(value); + case 'RevisionModelLinksSelf': + return RevisionModelLinksSelf.fromJson(value); + case 'RevisionModelLinksShowRevision': + return RevisionModelLinksShowRevision.fromJson(value); + case 'RevisionModelMessage': + return RevisionModelMessage.fromJson(value); + case 'RoleModel': + return RoleModel.fromJson(value); + case 'RoleModelLinks': + return RoleModelLinks.fromJson(value); + case 'RoleModelLinksSelf': + return RoleModelLinksSelf.fromJson(value); + case 'RootModel': + return RootModel.fromJson(value); + case 'RootModelLinks': + return RootModelLinks.fromJson(value); + case 'RootModelLinksConfiguration': + return RootModelLinksConfiguration.fromJson(value); + case 'RootModelLinksMemberships': + return RootModelLinksMemberships.fromJson(value); + case 'RootModelLinksPriorities': + return RootModelLinksPriorities.fromJson(value); + case 'RootModelLinksRelations': + return RootModelLinksRelations.fromJson(value); + case 'RootModelLinksSelf': + return RootModelLinksSelf.fromJson(value); + case 'RootModelLinksStatuses': + return RootModelLinksStatuses.fromJson(value); + case 'RootModelLinksTimeEntries': + return RootModelLinksTimeEntries.fromJson(value); + case 'RootModelLinksTypes': + return RootModelLinksTypes.fromJson(value); + case 'RootModelLinksUser': + return RootModelLinksUser.fromJson(value); + case 'RootModelLinksUserPreferences': + return RootModelLinksUserPreferences.fromJson(value); + case 'RootModelLinksWorkPackages': + return RootModelLinksWorkPackages.fromJson(value); + case 'SchemaModel': + return SchemaModel.fromJson(value); + case 'SchemaModelLinks': + return SchemaModelLinks.fromJson(value); + case 'SchemaModelLinksSelf': + return SchemaModelLinksSelf.fromJson(value); + case 'ShowOrValidateFormRequest': + return ShowOrValidateFormRequest.fromJson(value); + case 'StatusModel': + return StatusModel.fromJson(value); + case 'StatusModelLinks': + return StatusModelLinks.fromJson(value); + case 'StatusModelLinksSelf': + return StatusModelLinksSelf.fromJson(value); + case 'StorageFileModel': + return StorageFileModel.fromJson(value); + case 'StorageFileModelAllOfLinks': + return StorageFileModelAllOfLinks.fromJson(value); + case 'StorageFileModelAllOfLinksSelf': + return StorageFileModelAllOfLinksSelf.fromJson(value); + case 'StorageFileUploadLinkModel': + return StorageFileUploadLinkModel.fromJson(value); + case 'StorageFileUploadLinkModelLinks': + return StorageFileUploadLinkModelLinks.fromJson(value); + case 'StorageFileUploadLinkModelLinksDestination': + return StorageFileUploadLinkModelLinksDestination.fromJson(value); + case 'StorageFileUploadLinkModelLinksSelf': + return StorageFileUploadLinkModelLinksSelf.fromJson(value); + case 'StorageFileUploadPreparationModel': + return StorageFileUploadPreparationModel.fromJson(value); + case 'StorageFilesModel': + return StorageFilesModel.fromJson(value); + case 'StorageFilesModelParent': + return StorageFilesModelParent.fromJson(value); + case 'StorageReadModel': + return StorageReadModel.fromJson(value); + case 'StorageReadModelEmbedded': + return StorageReadModelEmbedded.fromJson(value); + case 'StorageReadModelLinks': + return StorageReadModelLinks.fromJson(value); + case 'StorageReadModelLinksAuthorizationState': + return StorageReadModelLinksAuthorizationState.fromJson(value); + case 'StorageReadModelLinksAuthorize': + return StorageReadModelLinksAuthorize.fromJson(value); + case 'StorageReadModelLinksOauthApplication': + return StorageReadModelLinksOauthApplication.fromJson(value); + case 'StorageReadModelLinksOauthClientCredentials': + return StorageReadModelLinksOauthClientCredentials.fromJson(value); + case 'StorageReadModelLinksOpen': + return StorageReadModelLinksOpen.fromJson(value); + case 'StorageReadModelLinksOrigin': + return StorageReadModelLinksOrigin.fromJson(value); + case 'StorageReadModelLinksSelf': + return StorageReadModelLinksSelf.fromJson(value); + case 'StorageReadModelLinksType': + return StorageReadModelLinksType.fromJson(value); + case 'StorageWriteModel': + return StorageWriteModel.fromJson(value); + case 'StorageWriteModelLinks': + return StorageWriteModelLinks.fromJson(value); + case 'StorageWriteModelLinksOrigin': + return StorageWriteModelLinksOrigin.fromJson(value); + case 'StorageWriteModelLinksType': + return StorageWriteModelLinksType.fromJson(value); + case 'TimeEntryActivityModel': + return TimeEntryActivityModel.fromJson(value); + case 'TimeEntryActivityModelEmbedded': + return TimeEntryActivityModelEmbedded.fromJson(value); + case 'TimeEntryActivityModelLinks': + return TimeEntryActivityModelLinks.fromJson(value); + case 'TimeEntryActivityModelLinksSelf': + return TimeEntryActivityModelLinksSelf.fromJson(value); + case 'TimeEntryCollectionModel': + return TimeEntryCollectionModel.fromJson(value); + case 'TimeEntryCollectionModelAllOfEmbedded': + return TimeEntryCollectionModelAllOfEmbedded.fromJson(value); + case 'TimeEntryCollectionModelAllOfLinks': + return TimeEntryCollectionModelAllOfLinks.fromJson(value); + case 'TimeEntryCollectionModelAllOfLinksSelf': + return TimeEntryCollectionModelAllOfLinksSelf.fromJson(value); + case 'TimeEntryModel': + return TimeEntryModel.fromJson(value); + case 'TimeEntryModelComment': + return TimeEntryModelComment.fromJson(value); + case 'TimeEntryModelLinks': + return TimeEntryModelLinks.fromJson(value); + case 'TimeEntryModelLinksActivity': + return TimeEntryModelLinksActivity.fromJson(value); + case 'TimeEntryModelLinksDelete': + return TimeEntryModelLinksDelete.fromJson(value); + case 'TimeEntryModelLinksProject': + return TimeEntryModelLinksProject.fromJson(value); + case 'TimeEntryModelLinksSchema': + return TimeEntryModelLinksSchema.fromJson(value); + case 'TimeEntryModelLinksSelf': + return TimeEntryModelLinksSelf.fromJson(value); + case 'TimeEntryModelLinksUpdate': + return TimeEntryModelLinksUpdate.fromJson(value); + case 'TimeEntryModelLinksUpdateImmediately': + return TimeEntryModelLinksUpdateImmediately.fromJson(value); + case 'TimeEntryModelLinksUser': + return TimeEntryModelLinksUser.fromJson(value); + case 'TimeEntryModelLinksWorkPackage': + return TimeEntryModelLinksWorkPackage.fromJson(value); + case 'TypeModel': + return TypeModel.fromJson(value); + case 'TypeModelLinks': + return TypeModelLinks.fromJson(value); + case 'TypeModelLinksSelf': + return TypeModelLinksSelf.fromJson(value); + case 'UpdateActivityRequest': + return UpdateActivityRequest.fromJson(value); + case 'UpdateActivityRequestComment': + return UpdateActivityRequestComment.fromJson(value); + case 'UpdateUserPreferencesRequest': + return UpdateUserPreferencesRequest.fromJson(value); + case 'UserCollectionModel': + return UserCollectionModel.fromJson(value); + case 'UserCollectionModelAllOfEmbedded': + return UserCollectionModelAllOfEmbedded.fromJson(value); + case 'UserCollectionModelAllOfLinks': + return UserCollectionModelAllOfLinks.fromJson(value); + case 'UserCollectionModelAllOfLinksSelf': + return UserCollectionModelAllOfLinksSelf.fromJson(value); + case 'UserCreateModel': + return UserCreateModel.fromJson(value); + case 'UserModel': + return UserModel.fromJson(value); + case 'UserModelLinks': + return UserModelLinks.fromJson(value); + case 'UserModelLinksDelete': + return UserModelLinksDelete.fromJson(value); + case 'UserModelLinksLock': + return UserModelLinksLock.fromJson(value); + case 'UserModelLinksMemberships': + return UserModelLinksMemberships.fromJson(value); + case 'UserModelLinksSelf': + return UserModelLinksSelf.fromJson(value); + case 'UserModelLinksShowUser': + return UserModelLinksShowUser.fromJson(value); + case 'UserModelLinksUnlock': + return UserModelLinksUnlock.fromJson(value); + case 'UserModelLinksUpdateImmediately': + return UserModelLinksUpdateImmediately.fromJson(value); + case 'ValuesPropertyModel': + return ValuesPropertyModel.fromJson(value); + case 'ValuesPropertyModelLinks': + return ValuesPropertyModelLinks.fromJson(value); + case 'ValuesPropertyModelLinksSchema': + return ValuesPropertyModelLinksSchema.fromJson(value); + case 'ValuesPropertyModelLinksSelf': + return ValuesPropertyModelLinksSelf.fromJson(value); + case 'VersionModel': + return VersionModel.fromJson(value); + case 'VersionModelLinks': + return VersionModelLinks.fromJson(value); + case 'VersionModelLinksAvailableInProjects': + return VersionModelLinksAvailableInProjects.fromJson(value); + case 'VersionModelLinksDefiningProject': + return VersionModelLinksDefiningProject.fromJson(value); + case 'VersionModelLinksSelf': + return VersionModelLinksSelf.fromJson(value); + case 'VersionModelLinksUpdate': + return VersionModelLinksUpdate.fromJson(value); + case 'VersionModelLinksUpdateImmediately': + return VersionModelLinksUpdateImmediately.fromJson(value); + case 'WatchersModel': + return WatchersModel.fromJson(value); + case 'WatchersModelAllOfEmbedded': + return WatchersModelAllOfEmbedded.fromJson(value); + case 'WatchersModelAllOfLinks': + return WatchersModelAllOfLinks.fromJson(value); + case 'WatchersModelAllOfLinksSelf': + return WatchersModelAllOfLinksSelf.fromJson(value); + case 'WeekDayCollectionModel': + return WeekDayCollectionModel.fromJson(value); + case 'WeekDayCollectionModelAllOfEmbedded': + return WeekDayCollectionModelAllOfEmbedded.fromJson(value); + case 'WeekDayCollectionModelAllOfLinks': + return WeekDayCollectionModelAllOfLinks.fromJson(value); + case 'WeekDayCollectionModelAllOfLinksSelf': + return WeekDayCollectionModelAllOfLinksSelf.fromJson(value); + case 'WeekDayCollectionWriteModel': + return WeekDayCollectionWriteModel.fromJson(value); + case 'WeekDayCollectionWriteModelEmbedded': + return WeekDayCollectionWriteModelEmbedded.fromJson(value); + case 'WeekDayModel': + return WeekDayModel.fromJson(value); + case 'WeekDaySelfLinkModel': + return WeekDaySelfLinkModel.fromJson(value); + case 'WeekDaySelfLinkModelSelf': + return WeekDaySelfLinkModelSelf.fromJson(value); + case 'WeekDayWriteModel': + return WeekDayWriteModel.fromJson(value); + case 'WikiPageModel': + return WikiPageModel.fromJson(value); + case 'WikiPageModelLinks': + return WikiPageModelLinks.fromJson(value); + case 'WikiPageModelLinksAddAttachment': + return WikiPageModelLinksAddAttachment.fromJson(value); + case 'WorkPackageModel': + return WorkPackageModel.fromJson(value); + case 'WorkPackageModelDescription': + return WorkPackageModelDescription.fromJson(value); + case 'WorkPackageModelLinks': + return WorkPackageModelLinks.fromJson(value); + case 'WorkPackageModelLinksAddAttachment': + return WorkPackageModelLinksAddAttachment.fromJson(value); + case 'WorkPackageModelLinksAddComment': + return WorkPackageModelLinksAddComment.fromJson(value); + case 'WorkPackageModelLinksAddFileLink': + return WorkPackageModelLinksAddFileLink.fromJson(value); + case 'WorkPackageModelLinksAddRelation': + return WorkPackageModelLinksAddRelation.fromJson(value); + case 'WorkPackageModelLinksAddWatcher': + return WorkPackageModelLinksAddWatcher.fromJson(value); + case 'WorkPackageModelLinksAssignee': + return WorkPackageModelLinksAssignee.fromJson(value); + case 'WorkPackageModelLinksAttachments': + return WorkPackageModelLinksAttachments.fromJson(value); + case 'WorkPackageModelLinksAuthor': + return WorkPackageModelLinksAuthor.fromJson(value); + case 'WorkPackageModelLinksAvailableWatchers': + return WorkPackageModelLinksAvailableWatchers.fromJson(value); + case 'WorkPackageModelLinksBudget': + return WorkPackageModelLinksBudget.fromJson(value); + case 'WorkPackageModelLinksCategory': + return WorkPackageModelLinksCategory.fromJson(value); + case 'WorkPackageModelLinksFileLinks': + return WorkPackageModelLinksFileLinks.fromJson(value); + case 'WorkPackageModelLinksParent': + return WorkPackageModelLinksParent.fromJson(value); + case 'WorkPackageModelLinksPreviewMarkup': + return WorkPackageModelLinksPreviewMarkup.fromJson(value); + case 'WorkPackageModelLinksPriority': + return WorkPackageModelLinksPriority.fromJson(value); + case 'WorkPackageModelLinksProject': + return WorkPackageModelLinksProject.fromJson(value); + case 'WorkPackageModelLinksRelations': + return WorkPackageModelLinksRelations.fromJson(value); + case 'WorkPackageModelLinksRemoveWatcher': + return WorkPackageModelLinksRemoveWatcher.fromJson(value); + case 'WorkPackageModelLinksResponsible': + return WorkPackageModelLinksResponsible.fromJson(value); + case 'WorkPackageModelLinksRevisions': + return WorkPackageModelLinksRevisions.fromJson(value); + case 'WorkPackageModelLinksSchema': + return WorkPackageModelLinksSchema.fromJson(value); + case 'WorkPackageModelLinksSelf': + return WorkPackageModelLinksSelf.fromJson(value); + case 'WorkPackageModelLinksStatus': + return WorkPackageModelLinksStatus.fromJson(value); + case 'WorkPackageModelLinksTimeEntries': + return WorkPackageModelLinksTimeEntries.fromJson(value); + case 'WorkPackageModelLinksType': + return WorkPackageModelLinksType.fromJson(value); + case 'WorkPackageModelLinksUnwatch': + return WorkPackageModelLinksUnwatch.fromJson(value); + case 'WorkPackageModelLinksUpdate': + return WorkPackageModelLinksUpdate.fromJson(value); + case 'WorkPackageModelLinksUpdateImmediately': + return WorkPackageModelLinksUpdateImmediately.fromJson(value); + case 'WorkPackageModelLinksVersion': + return WorkPackageModelLinksVersion.fromJson(value); + case 'WorkPackageModelLinksWatch': + return WorkPackageModelLinksWatch.fromJson(value); + case 'WorkPackageModelLinksWatchers': + return WorkPackageModelLinksWatchers.fromJson(value); + case 'WorkPackagePatchModel': + return WorkPackagePatchModel.fromJson(value); + case 'WorkPackagePatchModelLinks': + return WorkPackagePatchModelLinks.fromJson(value); + case 'WorkPackagesModel': + return WorkPackagesModel.fromJson(value); + case 'WorkPackagesModelAllOfEmbedded': + return WorkPackagesModelAllOfEmbedded.fromJson(value); + case 'WorkPackagesModelAllOfLinks': + return WorkPackagesModelAllOfLinks.fromJson(value); + case 'WorkPackagesModelAllOfLinksSelf': + return WorkPackagesModelAllOfLinksSelf.fromJson(value); + default: + dynamic match; + if (value is List && (match = _regList.firstMatch(targetType)?.group(1)) != null) { + return value + .map((dynamic v) => fromJson(v, match, growable: growable,)) + .toList(growable: growable); + } + if (value is Set && (match = _regSet.firstMatch(targetType)?.group(1)) != null) { + return value + .map((dynamic v) => fromJson(v, match, growable: growable,)) + .toSet(); + } + if (value is Map && (match = _regMap.firstMatch(targetType)?.group(1)) != null) { + return Map.fromIterables( + value.keys.cast(), + value.values.map((dynamic v) => fromJson(v, match, growable: growable,)), + ); + } + } + } on Exception catch (error, trace) { + throw ApiException.withInner(HttpStatus.internalServerError, 'Exception during deserialization.', error, trace,); + } + throw ApiException(HttpStatus.internalServerError, 'Could not find a suitable class for deserialization',); + } +} + +/// Primarily intended for use in an isolate. +class DeserializationMessage { + const DeserializationMessage({ + required this.json, + required this.targetType, + this.growable = false, + }); + + /// The JSON value to deserialize. + final String json; + + /// Target type to deserialize to. + final String targetType; + + /// Whether to make deserialized lists or maps growable. + final bool growable; +} + +/// Primarily intended for use in an isolate. +Future decodeAsync(DeserializationMessage message) async { + // Remove all spaces. Necessary for regular expressions as well. + final targetType = message.targetType.replaceAll(' ', ''); + + // If the expected target type is String, nothing to do... + return targetType == 'String' + ? message.json + : json.decode(message.json); +} + +/// Primarily intended for use in an isolate. +Future deserializeAsync(DeserializationMessage message) async { + // Remove all spaces. Necessary for regular expressions as well. + final targetType = message.targetType.replaceAll(' ', ''); + + // If the expected target type is String, nothing to do... + return targetType == 'String' + ? message.json + : ApiClient.fromJson( + json.decode(message.json), + targetType, + growable: message.growable, + ); +} + +/// Primarily intended for use in an isolate. +Future serializeAsync(Object? value) async => value == null ? '' : json.encode(value); diff --git a/lib/api_exception.dart b/lib/api_exception.dart new file mode 100644 index 0000000..796f7f7 --- /dev/null +++ b/lib/api_exception.dart @@ -0,0 +1,33 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ApiException implements Exception { + ApiException(this.code, this.message); + + ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace); + + int code = 0; + String? message; + Exception? innerException; + StackTrace? stackTrace; + + @override + String toString() { + if (message == null) { + return 'ApiException'; + } + if (innerException == null) { + return 'ApiException $code: $message'; + } + return 'ApiException $code: $message (Inner exception: $innerException)\n\n$stackTrace'; + } +} diff --git a/lib/api_helper.dart b/lib/api_helper.dart new file mode 100644 index 0000000..b0d6358 --- /dev/null +++ b/lib/api_helper.dart @@ -0,0 +1,101 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryParam { + const QueryParam(this.name, this.value); + + final String name; + final String value; + + @override + String toString() => '${Uri.encodeQueryComponent(name)}=${Uri.encodeQueryComponent(value)}'; +} + +// Ported from the Java version. +Iterable _queryParams(String collectionFormat, String name, dynamic value,) { + // Assertions to run in debug mode only. + assert(name.isNotEmpty, 'Parameter cannot be an empty string.'); + + final params = []; + + if (value is List) { + if (collectionFormat == 'multi') { + return value.map((dynamic v) => QueryParam(name, parameterToString(v)),); + } + + // Default collection format is 'csv'. + if (collectionFormat.isEmpty) { + collectionFormat = 'csv'; // ignore: parameter_assignments + } + + final delimiter = _delimiters[collectionFormat] ?? ','; + + params.add(QueryParam(name, value.map(parameterToString).join(delimiter),)); + } else if (value != null) { + params.add(QueryParam(name, parameterToString(value))); + } + + return params; +} + +/// Format the given parameter object into a [String]. +String parameterToString(dynamic value) { + if (value == null) { + return ''; + } + if (value is DateTime) { + return value.toUtc().toIso8601String(); + } + return value.toString(); +} + +/// Returns the decoded body as UTF-8 if the given headers indicate an 'application/json' +/// content type. Otherwise, returns the decoded body as decoded by dart:http package. +Future _decodeBodyBytes(Response response) async { + final contentType = response.headers['content-type']; + return contentType != null && contentType.toLowerCase().startsWith('application/json') + ? response.bodyBytes.isEmpty ? '' : utf8.decode(response.bodyBytes) + : response.body; +} + +/// Returns a valid [T] value found at the specified Map [key], null otherwise. +T? mapValueOfType(dynamic map, String key) { + final dynamic value = map is Map ? map[key] : null; + return value is T ? value : null; +} + +/// Returns a valid Map found at the specified Map [key], null otherwise. +Map? mapCastOfType(dynamic map, String key) { + final dynamic value = map is Map ? map[key] : null; + return value is Map ? value.cast() : null; +} + +/// Returns a valid [DateTime] found at the specified Map [key], null otherwise. +DateTime? mapDateTime(dynamic map, String key, [String? pattern]) { + final dynamic value = map is Map ? map[key] : null; + if (value != null) { + int? millis; + if (value is int) { + millis = value; + } else if (value is String) { + if (_isEpochMarker(pattern)) { + millis = int.tryParse(value); + } else { + return DateTime.tryParse(value); + } + } + if (millis != null) { + return DateTime.fromMillisecondsSinceEpoch(millis, isUtc: true); + } + } + return null; +} diff --git a/lib/auth/api_key_auth.dart b/lib/auth/api_key_auth.dart new file mode 100644 index 0000000..84dc295 --- /dev/null +++ b/lib/auth/api_key_auth.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ApiKeyAuth implements Authentication { + ApiKeyAuth(this.location, this.paramName); + + final String location; + final String paramName; + + String apiKeyPrefix = ''; + String apiKey = ''; + + @override + Future applyToParams(List queryParams, Map headerParams,) async { + final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey'; + + if (paramValue.isNotEmpty) { + if (location == 'query') { + queryParams.add(QueryParam(paramName, paramValue)); + } else if (location == 'header') { + headerParams[paramName] = paramValue; + } else if (location == 'cookie') { + headerParams.update( + 'Cookie', + (existingCookie) => '$existingCookie; $paramName=$paramValue', + ifAbsent: () => '$paramName=$paramValue', + ); + } + } + } +} diff --git a/lib/auth/authentication.dart b/lib/auth/authentication.dart new file mode 100644 index 0000000..1b1b8ae --- /dev/null +++ b/lib/auth/authentication.dart @@ -0,0 +1,17 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +// ignore: one_member_abstracts +abstract class Authentication { + /// Apply authentication settings to header and query params. + Future applyToParams(List queryParams, Map headerParams); +} diff --git a/lib/auth/http_basic_auth.dart b/lib/auth/http_basic_auth.dart new file mode 100644 index 0000000..dfedaa5 --- /dev/null +++ b/lib/auth/http_basic_auth.dart @@ -0,0 +1,26 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class HttpBasicAuth implements Authentication { + HttpBasicAuth({this.username = '', this.password = ''}); + + String username; + String password; + + @override + Future applyToParams(List queryParams, Map headerParams,) async { + if (username.isNotEmpty && password.isNotEmpty) { + final credentials = '$username:$password'; + headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; + } + } +} diff --git a/lib/auth/http_bearer_auth.dart b/lib/auth/http_bearer_auth.dart new file mode 100644 index 0000000..eddf3a5 --- /dev/null +++ b/lib/auth/http_bearer_auth.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +typedef HttpBearerAuthProvider = String Function(); + +class HttpBearerAuth implements Authentication { + HttpBearerAuth(); + + dynamic _accessToken; + + dynamic get accessToken => _accessToken; + + set accessToken(dynamic accessToken) { + if (accessToken is! String && accessToken is! HttpBearerAuthProvider) { + throw ArgumentError('accessToken value must be either a String or a String Function().'); + } + _accessToken = accessToken; + } + + @override + Future applyToParams(List queryParams, Map headerParams,) async { + if (_accessToken == null) { + return; + } + + String accessToken; + + if (_accessToken is String) { + accessToken = _accessToken; + } else if (_accessToken is HttpBearerAuthProvider) { + accessToken = _accessToken!(); + } else { + return; + } + + if (accessToken.isNotEmpty) { + headerParams['Authorization'] = 'Bearer $accessToken'; + } + } +} diff --git a/lib/auth/oauth.dart b/lib/auth/oauth.dart new file mode 100644 index 0000000..e9e7d78 --- /dev/null +++ b/lib/auth/oauth.dart @@ -0,0 +1,24 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OAuth implements Authentication { + OAuth({this.accessToken = ''}); + + String accessToken; + + @override + Future applyToParams(List queryParams, Map headerParams,) async { + if (accessToken.isNotEmpty) { + headerParams['Authorization'] = 'Bearer $accessToken'; + } + } +} diff --git a/lib/model/activity_model.dart b/lib/model/activity_model.dart new file mode 100644 index 0000000..205d750 --- /dev/null +++ b/lib/model/activity_model.dart @@ -0,0 +1,197 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ActivityModel { + /// Returns a new [ActivityModel] instance. + ActivityModel({ + this.id, + this.version, + this.comment, + this.details = const [], + this.createdAt, + this.updatedAt, + }); + + /// Activity id + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// Activity version + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? version; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ActivityModelComment? comment; + + List details; + + /// Time of creation + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? createdAt; + + /// Time of update + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? updatedAt; + + @override + bool operator ==(Object other) => identical(this, other) || other is ActivityModel && + other.id == id && + other.version == version && + other.comment == comment && + _deepEquality.equals(other.details, details) && + other.createdAt == createdAt && + other.updatedAt == updatedAt; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (version == null ? 0 : version!.hashCode) + + (comment == null ? 0 : comment!.hashCode) + + (details.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode); + + @override + String toString() => 'ActivityModel[id=$id, version=$version, comment=$comment, details=$details, createdAt=$createdAt, updatedAt=$updatedAt]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.version != null) { + json[r'version'] = this.version; + } else { + json[r'version'] = null; + } + if (this.comment != null) { + json[r'comment'] = this.comment; + } else { + json[r'comment'] = null; + } + json[r'details'] = this.details; + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String(); + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt!.toUtc().toIso8601String(); + } else { + json[r'updatedAt'] = null; + } + return json; + } + + /// Returns a new [ActivityModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ActivityModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ActivityModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ActivityModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ActivityModel( + id: mapValueOfType(json, r'id'), + version: mapValueOfType(json, r'version'), + comment: ActivityModelComment.fromJson(json[r'comment']), + details: Formattable.listFromJson(json[r'details']), + createdAt: mapDateTime(json, r'createdAt', r''), + updatedAt: mapDateTime(json, r'updatedAt', r''), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ActivityModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ActivityModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ActivityModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ActivityModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/activity_model_comment.dart b/lib/model/activity_model_comment.dart new file mode 100644 index 0000000..42820a1 --- /dev/null +++ b/lib/model/activity_model_comment.dart @@ -0,0 +1,223 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ActivityModelComment { + /// Returns a new [ActivityModelComment] instance. + ActivityModelComment({ + required this.format, + this.raw, + this.html, + }); + + /// Indicates the formatting language of the raw text + ActivityModelCommentFormatEnum format; + + /// The raw text, as entered by the user + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? raw; + + /// The text converted to HTML according to the format + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? html; + + @override + bool operator ==(Object other) => identical(this, other) || other is ActivityModelComment && + other.format == format && + other.raw == raw && + other.html == html; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (format.hashCode) + + (raw == null ? 0 : raw!.hashCode) + + (html == null ? 0 : html!.hashCode); + + @override + String toString() => 'ActivityModelComment[format=$format, raw=$raw, html=$html]'; + + Map toJson() { + final json = {}; + json[r'format'] = this.format; + if (this.raw != null) { + json[r'raw'] = this.raw; + } else { + json[r'raw'] = null; + } + if (this.html != null) { + json[r'html'] = this.html; + } else { + json[r'html'] = null; + } + return json; + } + + /// Returns a new [ActivityModelComment] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ActivityModelComment? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ActivityModelComment[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ActivityModelComment[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ActivityModelComment( + format: ActivityModelCommentFormatEnum.fromJson(json[r'format'])!, + raw: mapValueOfType(json, r'raw'), + html: mapValueOfType(json, r'html'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ActivityModelComment.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ActivityModelComment.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ActivityModelComment-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ActivityModelComment.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'format', + }; +} + +/// Indicates the formatting language of the raw text +class ActivityModelCommentFormatEnum { + /// Instantiate a new enum with the provided [value]. + const ActivityModelCommentFormatEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const plain = ActivityModelCommentFormatEnum._(r'plain'); + static const markdown = ActivityModelCommentFormatEnum._(r'markdown'); + static const custom = ActivityModelCommentFormatEnum._(r'custom'); + + /// List of all possible values in this [enum][ActivityModelCommentFormatEnum]. + static const values = [ + plain, + markdown, + custom, + ]; + + static ActivityModelCommentFormatEnum? fromJson(dynamic value) => ActivityModelCommentFormatEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ActivityModelCommentFormatEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [ActivityModelCommentFormatEnum] to String, +/// and [decode] dynamic data back to [ActivityModelCommentFormatEnum]. +class ActivityModelCommentFormatEnumTypeTransformer { + factory ActivityModelCommentFormatEnumTypeTransformer() => _instance ??= const ActivityModelCommentFormatEnumTypeTransformer._(); + + const ActivityModelCommentFormatEnumTypeTransformer._(); + + String encode(ActivityModelCommentFormatEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a ActivityModelCommentFormatEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + ActivityModelCommentFormatEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'plain': return ActivityModelCommentFormatEnum.plain; + case r'markdown': return ActivityModelCommentFormatEnum.markdown; + case r'custom': return ActivityModelCommentFormatEnum.custom; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [ActivityModelCommentFormatEnumTypeTransformer] instance. + static ActivityModelCommentFormatEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/add_watcher_request.dart b/lib/model/add_watcher_request.dart new file mode 100644 index 0000000..ef84060 --- /dev/null +++ b/lib/model/add_watcher_request.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AddWatcherRequest { + /// Returns a new [AddWatcherRequest] instance. + AddWatcherRequest({ + this.user, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ExecuteCustomActionRequestLinksWorkPackage? user; + + @override + bool operator ==(Object other) => identical(this, other) || other is AddWatcherRequest && + other.user == user; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (user == null ? 0 : user!.hashCode); + + @override + String toString() => 'AddWatcherRequest[user=$user]'; + + Map toJson() { + final json = {}; + if (this.user != null) { + json[r'user'] = this.user; + } else { + json[r'user'] = null; + } + return json; + } + + /// Returns a new [AddWatcherRequest] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AddWatcherRequest? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AddWatcherRequest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AddWatcherRequest[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AddWatcherRequest( + user: ExecuteCustomActionRequestLinksWorkPackage.fromJson(json[r'user']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AddWatcherRequest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AddWatcherRequest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AddWatcherRequest-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AddWatcherRequest.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/attachment_model.dart b/lib/model/attachment_model.dart new file mode 100644 index 0000000..080d76b --- /dev/null +++ b/lib/model/attachment_model.dart @@ -0,0 +1,211 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AttachmentModel { + /// Returns a new [AttachmentModel] instance. + AttachmentModel({ + this.id, + required this.title, + required this.fileName, + this.fileSize, + required this.description, + required this.contentType, + required this.digest, + required this.createdAt, + this.links, + }); + + /// Attachment's id + /// + /// Minimum value: 1 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// The name of the file + String title; + + /// The name of the uploaded file + String fileName; + + /// The size of the uploaded file in Bytes + /// + /// Minimum value: 0 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? fileSize; + + AttachmentModelDescription description; + + /// The files MIME-Type as determined by the server + String contentType; + + /// A checksum for the files content + String digest; + + /// Time of creation + DateTime createdAt; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + AttachmentModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is AttachmentModel && + other.id == id && + other.title == title && + other.fileName == fileName && + other.fileSize == fileSize && + other.description == description && + other.contentType == contentType && + other.digest == digest && + other.createdAt == createdAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (title.hashCode) + + (fileName.hashCode) + + (fileSize == null ? 0 : fileSize!.hashCode) + + (description.hashCode) + + (contentType.hashCode) + + (digest.hashCode) + + (createdAt.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'AttachmentModel[id=$id, title=$title, fileName=$fileName, fileSize=$fileSize, description=$description, contentType=$contentType, digest=$digest, createdAt=$createdAt, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + json[r'title'] = this.title; + json[r'fileName'] = this.fileName; + if (this.fileSize != null) { + json[r'fileSize'] = this.fileSize; + } else { + json[r'fileSize'] = null; + } + json[r'description'] = this.description; + json[r'contentType'] = this.contentType; + json[r'digest'] = this.digest; + json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [AttachmentModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AttachmentModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AttachmentModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AttachmentModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AttachmentModel( + id: mapValueOfType(json, r'id'), + title: mapValueOfType(json, r'title')!, + fileName: mapValueOfType(json, r'fileName')!, + fileSize: mapValueOfType(json, r'fileSize'), + description: AttachmentModelDescription.fromJson(json[r'description'])!, + contentType: mapValueOfType(json, r'contentType')!, + digest: mapValueOfType(json, r'digest')!, + createdAt: mapDateTime(json, r'createdAt', r'')!, + links: AttachmentModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AttachmentModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AttachmentModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AttachmentModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'title', + 'fileName', + 'description', + 'contentType', + 'digest', + 'createdAt', + }; +} + diff --git a/lib/model/attachment_model_description.dart b/lib/model/attachment_model_description.dart new file mode 100644 index 0000000..ca1e7de --- /dev/null +++ b/lib/model/attachment_model_description.dart @@ -0,0 +1,223 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AttachmentModelDescription { + /// Returns a new [AttachmentModelDescription] instance. + AttachmentModelDescription({ + required this.format, + this.raw, + this.html, + }); + + /// Indicates the formatting language of the raw text + AttachmentModelDescriptionFormatEnum format; + + /// The raw text, as entered by the user + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? raw; + + /// The text converted to HTML according to the format + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? html; + + @override + bool operator ==(Object other) => identical(this, other) || other is AttachmentModelDescription && + other.format == format && + other.raw == raw && + other.html == html; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (format.hashCode) + + (raw == null ? 0 : raw!.hashCode) + + (html == null ? 0 : html!.hashCode); + + @override + String toString() => 'AttachmentModelDescription[format=$format, raw=$raw, html=$html]'; + + Map toJson() { + final json = {}; + json[r'format'] = this.format; + if (this.raw != null) { + json[r'raw'] = this.raw; + } else { + json[r'raw'] = null; + } + if (this.html != null) { + json[r'html'] = this.html; + } else { + json[r'html'] = null; + } + return json; + } + + /// Returns a new [AttachmentModelDescription] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AttachmentModelDescription? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AttachmentModelDescription[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AttachmentModelDescription[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AttachmentModelDescription( + format: AttachmentModelDescriptionFormatEnum.fromJson(json[r'format'])!, + raw: mapValueOfType(json, r'raw'), + html: mapValueOfType(json, r'html'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentModelDescription.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AttachmentModelDescription.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AttachmentModelDescription-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AttachmentModelDescription.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'format', + }; +} + +/// Indicates the formatting language of the raw text +class AttachmentModelDescriptionFormatEnum { + /// Instantiate a new enum with the provided [value]. + const AttachmentModelDescriptionFormatEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const plain = AttachmentModelDescriptionFormatEnum._(r'plain'); + static const markdown = AttachmentModelDescriptionFormatEnum._(r'markdown'); + static const custom = AttachmentModelDescriptionFormatEnum._(r'custom'); + + /// List of all possible values in this [enum][AttachmentModelDescriptionFormatEnum]. + static const values = [ + plain, + markdown, + custom, + ]; + + static AttachmentModelDescriptionFormatEnum? fromJson(dynamic value) => AttachmentModelDescriptionFormatEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentModelDescriptionFormatEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [AttachmentModelDescriptionFormatEnum] to String, +/// and [decode] dynamic data back to [AttachmentModelDescriptionFormatEnum]. +class AttachmentModelDescriptionFormatEnumTypeTransformer { + factory AttachmentModelDescriptionFormatEnumTypeTransformer() => _instance ??= const AttachmentModelDescriptionFormatEnumTypeTransformer._(); + + const AttachmentModelDescriptionFormatEnumTypeTransformer._(); + + String encode(AttachmentModelDescriptionFormatEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a AttachmentModelDescriptionFormatEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + AttachmentModelDescriptionFormatEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'plain': return AttachmentModelDescriptionFormatEnum.plain; + case r'markdown': return AttachmentModelDescriptionFormatEnum.markdown; + case r'custom': return AttachmentModelDescriptionFormatEnum.custom; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [AttachmentModelDescriptionFormatEnumTypeTransformer] instance. + static AttachmentModelDescriptionFormatEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/attachment_model_links.dart b/lib/model/attachment_model_links.dart new file mode 100644 index 0000000..dace9fe --- /dev/null +++ b/lib/model/attachment_model_links.dart @@ -0,0 +1,150 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AttachmentModelLinks { + /// Returns a new [AttachmentModelLinks] instance. + AttachmentModelLinks({ + this.delete, + required this.self, + required this.container, + required this.author, + required this.downloadLocation, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + AttachmentModelLinksDelete? delete; + + AttachmentModelLinksSelf self; + + AttachmentModelLinksContainer container; + + AttachmentModelLinksAuthor author; + + AttachmentModelLinksDownloadLocation downloadLocation; + + @override + bool operator ==(Object other) => identical(this, other) || other is AttachmentModelLinks && + other.delete == delete && + other.self == self && + other.container == container && + other.author == author && + other.downloadLocation == downloadLocation; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (delete == null ? 0 : delete!.hashCode) + + (self.hashCode) + + (container.hashCode) + + (author.hashCode) + + (downloadLocation.hashCode); + + @override + String toString() => 'AttachmentModelLinks[delete=$delete, self=$self, container=$container, author=$author, downloadLocation=$downloadLocation]'; + + Map toJson() { + final json = {}; + if (this.delete != null) { + json[r'delete'] = this.delete; + } else { + json[r'delete'] = null; + } + json[r'self'] = this.self; + json[r'container'] = this.container; + json[r'author'] = this.author; + json[r'downloadLocation'] = this.downloadLocation; + return json; + } + + /// Returns a new [AttachmentModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AttachmentModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AttachmentModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AttachmentModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AttachmentModelLinks( + delete: AttachmentModelLinksDelete.fromJson(json[r'delete']), + self: AttachmentModelLinksSelf.fromJson(json[r'self'])!, + container: AttachmentModelLinksContainer.fromJson(json[r'container'])!, + author: AttachmentModelLinksAuthor.fromJson(json[r'author'])!, + downloadLocation: AttachmentModelLinksDownloadLocation.fromJson(json[r'downloadLocation'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AttachmentModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AttachmentModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AttachmentModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'container', + 'author', + 'downloadLocation', + }; +} + diff --git a/lib/model/attachment_model_links_author.dart b/lib/model/attachment_model_links_author.dart new file mode 100644 index 0000000..0caa2f5 --- /dev/null +++ b/lib/model/attachment_model_links_author.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AttachmentModelLinksAuthor { + /// Returns a new [AttachmentModelLinksAuthor] instance. + AttachmentModelLinksAuthor({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is AttachmentModelLinksAuthor && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'AttachmentModelLinksAuthor[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [AttachmentModelLinksAuthor] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AttachmentModelLinksAuthor? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AttachmentModelLinksAuthor[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AttachmentModelLinksAuthor[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AttachmentModelLinksAuthor( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentModelLinksAuthor.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AttachmentModelLinksAuthor.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AttachmentModelLinksAuthor-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AttachmentModelLinksAuthor.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/attachment_model_links_container.dart b/lib/model/attachment_model_links_container.dart new file mode 100644 index 0000000..9cd4508 --- /dev/null +++ b/lib/model/attachment_model_links_container.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AttachmentModelLinksContainer { + /// Returns a new [AttachmentModelLinksContainer] instance. + AttachmentModelLinksContainer({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is AttachmentModelLinksContainer && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'AttachmentModelLinksContainer[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [AttachmentModelLinksContainer] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AttachmentModelLinksContainer? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AttachmentModelLinksContainer[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AttachmentModelLinksContainer[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AttachmentModelLinksContainer( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentModelLinksContainer.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AttachmentModelLinksContainer.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AttachmentModelLinksContainer-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AttachmentModelLinksContainer.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/attachment_model_links_delete.dart b/lib/model/attachment_model_links_delete.dart new file mode 100644 index 0000000..88cd432 --- /dev/null +++ b/lib/model/attachment_model_links_delete.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AttachmentModelLinksDelete { + /// Returns a new [AttachmentModelLinksDelete] instance. + AttachmentModelLinksDelete({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is AttachmentModelLinksDelete && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'AttachmentModelLinksDelete[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [AttachmentModelLinksDelete] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AttachmentModelLinksDelete? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AttachmentModelLinksDelete[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AttachmentModelLinksDelete[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AttachmentModelLinksDelete( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentModelLinksDelete.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AttachmentModelLinksDelete.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AttachmentModelLinksDelete-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AttachmentModelLinksDelete.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/attachment_model_links_download_location.dart b/lib/model/attachment_model_links_download_location.dart new file mode 100644 index 0000000..b0cbf3e --- /dev/null +++ b/lib/model/attachment_model_links_download_location.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AttachmentModelLinksDownloadLocation { + /// Returns a new [AttachmentModelLinksDownloadLocation] instance. + AttachmentModelLinksDownloadLocation({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is AttachmentModelLinksDownloadLocation && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'AttachmentModelLinksDownloadLocation[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [AttachmentModelLinksDownloadLocation] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AttachmentModelLinksDownloadLocation? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AttachmentModelLinksDownloadLocation[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AttachmentModelLinksDownloadLocation[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AttachmentModelLinksDownloadLocation( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentModelLinksDownloadLocation.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AttachmentModelLinksDownloadLocation.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AttachmentModelLinksDownloadLocation-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AttachmentModelLinksDownloadLocation.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/attachment_model_links_self.dart b/lib/model/attachment_model_links_self.dart new file mode 100644 index 0000000..434a5e3 --- /dev/null +++ b/lib/model/attachment_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AttachmentModelLinksSelf { + /// Returns a new [AttachmentModelLinksSelf] instance. + AttachmentModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is AttachmentModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'AttachmentModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [AttachmentModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AttachmentModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AttachmentModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AttachmentModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AttachmentModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AttachmentModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AttachmentModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AttachmentModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/attachments_model.dart b/lib/model/attachments_model.dart new file mode 100644 index 0000000..1ac0e80 --- /dev/null +++ b/lib/model/attachments_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AttachmentsModel { + /// Returns a new [AttachmentsModel] instance. + AttachmentsModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.embedded, + }); + + AttachmentsModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + AttachmentsModelAllOfLinks links; + + AttachmentsModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is AttachmentsModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'AttachmentsModel[type=$type, total=$total, count=$count, links=$links, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [AttachmentsModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AttachmentsModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AttachmentsModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AttachmentsModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AttachmentsModel( + type: AttachmentsModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: AttachmentsModelAllOfLinks.fromJson(json[r'_links'])!, + embedded: AttachmentsModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentsModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AttachmentsModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AttachmentsModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AttachmentsModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + '_embedded', + }; +} + + +class AttachmentsModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const AttachmentsModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = AttachmentsModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][AttachmentsModelTypeEnum]. + static const values = [ + collection, + ]; + + static AttachmentsModelTypeEnum? fromJson(dynamic value) => AttachmentsModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentsModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [AttachmentsModelTypeEnum] to String, +/// and [decode] dynamic data back to [AttachmentsModelTypeEnum]. +class AttachmentsModelTypeEnumTypeTransformer { + factory AttachmentsModelTypeEnumTypeTransformer() => _instance ??= const AttachmentsModelTypeEnumTypeTransformer._(); + + const AttachmentsModelTypeEnumTypeTransformer._(); + + String encode(AttachmentsModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a AttachmentsModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + AttachmentsModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return AttachmentsModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [AttachmentsModelTypeEnumTypeTransformer] instance. + static AttachmentsModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/attachments_model_all_of_embedded.dart b/lib/model/attachments_model_all_of_embedded.dart new file mode 100644 index 0000000..f507756 --- /dev/null +++ b/lib/model/attachments_model_all_of_embedded.dart @@ -0,0 +1,108 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AttachmentsModelAllOfEmbedded { + /// Returns a new [AttachmentsModelAllOfEmbedded] instance. + AttachmentsModelAllOfEmbedded({ + this.elements = const [], + }); + + List elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is AttachmentsModelAllOfEmbedded && + _deepEquality.equals(other.elements, elements); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements.hashCode); + + @override + String toString() => 'AttachmentsModelAllOfEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + json[r'elements'] = this.elements; + return json; + } + + /// Returns a new [AttachmentsModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AttachmentsModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AttachmentsModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AttachmentsModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AttachmentsModelAllOfEmbedded( + elements: AttachmentsModelAllOfEmbeddedElementsInner.listFromJson(json[r'elements']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentsModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AttachmentsModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AttachmentsModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AttachmentsModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/attachments_model_all_of_embedded_elements_inner.dart b/lib/model/attachments_model_all_of_embedded_elements_inner.dart new file mode 100644 index 0000000..243d018 --- /dev/null +++ b/lib/model/attachments_model_all_of_embedded_elements_inner.dart @@ -0,0 +1,211 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AttachmentsModelAllOfEmbeddedElementsInner { + /// Returns a new [AttachmentsModelAllOfEmbeddedElementsInner] instance. + AttachmentsModelAllOfEmbeddedElementsInner({ + this.id, + required this.title, + required this.fileName, + this.fileSize, + required this.description, + required this.contentType, + required this.digest, + required this.createdAt, + this.links, + }); + + /// Attachment's id + /// + /// Minimum value: 1 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// The name of the file + String title; + + /// The name of the uploaded file + String fileName; + + /// The size of the uploaded file in Bytes + /// + /// Minimum value: 0 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? fileSize; + + AttachmentModelDescription description; + + /// The files MIME-Type as determined by the server + String contentType; + + /// A checksum for the files content + String digest; + + /// Time of creation + DateTime createdAt; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + AttachmentModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is AttachmentsModelAllOfEmbeddedElementsInner && + other.id == id && + other.title == title && + other.fileName == fileName && + other.fileSize == fileSize && + other.description == description && + other.contentType == contentType && + other.digest == digest && + other.createdAt == createdAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (title.hashCode) + + (fileName.hashCode) + + (fileSize == null ? 0 : fileSize!.hashCode) + + (description.hashCode) + + (contentType.hashCode) + + (digest.hashCode) + + (createdAt.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'AttachmentsModelAllOfEmbeddedElementsInner[id=$id, title=$title, fileName=$fileName, fileSize=$fileSize, description=$description, contentType=$contentType, digest=$digest, createdAt=$createdAt, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + json[r'title'] = this.title; + json[r'fileName'] = this.fileName; + if (this.fileSize != null) { + json[r'fileSize'] = this.fileSize; + } else { + json[r'fileSize'] = null; + } + json[r'description'] = this.description; + json[r'contentType'] = this.contentType; + json[r'digest'] = this.digest; + json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [AttachmentsModelAllOfEmbeddedElementsInner] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AttachmentsModelAllOfEmbeddedElementsInner? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AttachmentsModelAllOfEmbeddedElementsInner[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AttachmentsModelAllOfEmbeddedElementsInner[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AttachmentsModelAllOfEmbeddedElementsInner( + id: mapValueOfType(json, r'id'), + title: mapValueOfType(json, r'title')!, + fileName: mapValueOfType(json, r'fileName')!, + fileSize: mapValueOfType(json, r'fileSize'), + description: AttachmentModelDescription.fromJson(json[r'description'])!, + contentType: mapValueOfType(json, r'contentType')!, + digest: mapValueOfType(json, r'digest')!, + createdAt: mapDateTime(json, r'createdAt', r'')!, + links: AttachmentModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentsModelAllOfEmbeddedElementsInner.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AttachmentsModelAllOfEmbeddedElementsInner.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AttachmentsModelAllOfEmbeddedElementsInner-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AttachmentsModelAllOfEmbeddedElementsInner.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'title', + 'fileName', + 'description', + 'contentType', + 'digest', + 'createdAt', + }; +} + diff --git a/lib/model/attachments_model_all_of_links.dart b/lib/model/attachments_model_all_of_links.dart new file mode 100644 index 0000000..2ba7a05 --- /dev/null +++ b/lib/model/attachments_model_all_of_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AttachmentsModelAllOfLinks { + /// Returns a new [AttachmentsModelAllOfLinks] instance. + AttachmentsModelAllOfLinks({ + required this.self, + }); + + AttachmentsModelAllOfLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is AttachmentsModelAllOfLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'AttachmentsModelAllOfLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [AttachmentsModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AttachmentsModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AttachmentsModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AttachmentsModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AttachmentsModelAllOfLinks( + self: AttachmentsModelAllOfLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentsModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AttachmentsModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AttachmentsModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AttachmentsModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/attachments_model_all_of_links_self.dart b/lib/model/attachments_model_all_of_links_self.dart new file mode 100644 index 0000000..68308e0 --- /dev/null +++ b/lib/model/attachments_model_all_of_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AttachmentsModelAllOfLinksSelf { + /// Returns a new [AttachmentsModelAllOfLinksSelf] instance. + AttachmentsModelAllOfLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is AttachmentsModelAllOfLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'AttachmentsModelAllOfLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [AttachmentsModelAllOfLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AttachmentsModelAllOfLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AttachmentsModelAllOfLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AttachmentsModelAllOfLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AttachmentsModelAllOfLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AttachmentsModelAllOfLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AttachmentsModelAllOfLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AttachmentsModelAllOfLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AttachmentsModelAllOfLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/budget_model.dart b/lib/model/budget_model.dart new file mode 100644 index 0000000..f584a64 --- /dev/null +++ b/lib/model/budget_model.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class BudgetModel { + /// Returns a new [BudgetModel] instance. + BudgetModel({ + this.links, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + BudgetModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is BudgetModel && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'BudgetModel[links=$links]'; + + Map toJson() { + final json = {}; + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [BudgetModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static BudgetModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "BudgetModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "BudgetModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return BudgetModel( + links: BudgetModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = BudgetModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = BudgetModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of BudgetModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = BudgetModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/budget_model_links.dart b/lib/model/budget_model_links.dart new file mode 100644 index 0000000..698d6fd --- /dev/null +++ b/lib/model/budget_model_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class BudgetModelLinks { + /// Returns a new [BudgetModelLinks] instance. + BudgetModelLinks({ + required this.self, + }); + + BudgetModelLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is BudgetModelLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'BudgetModelLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [BudgetModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static BudgetModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "BudgetModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "BudgetModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return BudgetModelLinks( + self: BudgetModelLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = BudgetModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = BudgetModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of BudgetModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = BudgetModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/budget_model_links_self.dart b/lib/model/budget_model_links_self.dart new file mode 100644 index 0000000..fd0b1f4 --- /dev/null +++ b/lib/model/budget_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class BudgetModelLinksSelf { + /// Returns a new [BudgetModelLinksSelf] instance. + BudgetModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is BudgetModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'BudgetModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [BudgetModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static BudgetModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "BudgetModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "BudgetModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return BudgetModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = BudgetModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = BudgetModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of BudgetModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = BudgetModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/category_model.dart b/lib/model/category_model.dart new file mode 100644 index 0000000..04ef345 --- /dev/null +++ b/lib/model/category_model.dart @@ -0,0 +1,154 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CategoryModel { + /// Returns a new [CategoryModel] instance. + CategoryModel({ + this.id, + this.name, + this.links, + }); + + /// Category id + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// Category name + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? name; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + CategoryModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is CategoryModel && + other.id == id && + other.name == name && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'CategoryModel[id=$id, name=$name, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [CategoryModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CategoryModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CategoryModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CategoryModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CategoryModel( + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name'), + links: CategoryModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CategoryModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CategoryModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CategoryModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CategoryModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/category_model_links.dart b/lib/model/category_model_links.dart new file mode 100644 index 0000000..8eed241 --- /dev/null +++ b/lib/model/category_model_links.dart @@ -0,0 +1,134 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CategoryModelLinks { + /// Returns a new [CategoryModelLinks] instance. + CategoryModelLinks({ + required this.self, + required this.project, + this.defaultAssignee, + }); + + CategoryModelLinksSelf self; + + CategoryModelLinksProject project; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + CategoryModelLinksDefaultAssignee? defaultAssignee; + + @override + bool operator ==(Object other) => identical(this, other) || other is CategoryModelLinks && + other.self == self && + other.project == project && + other.defaultAssignee == defaultAssignee; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (project.hashCode) + + (defaultAssignee == null ? 0 : defaultAssignee!.hashCode); + + @override + String toString() => 'CategoryModelLinks[self=$self, project=$project, defaultAssignee=$defaultAssignee]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'project'] = this.project; + if (this.defaultAssignee != null) { + json[r'defaultAssignee'] = this.defaultAssignee; + } else { + json[r'defaultAssignee'] = null; + } + return json; + } + + /// Returns a new [CategoryModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CategoryModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CategoryModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CategoryModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CategoryModelLinks( + self: CategoryModelLinksSelf.fromJson(json[r'self'])!, + project: CategoryModelLinksProject.fromJson(json[r'project'])!, + defaultAssignee: CategoryModelLinksDefaultAssignee.fromJson(json[r'defaultAssignee']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CategoryModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CategoryModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CategoryModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CategoryModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'project', + }; +} + diff --git a/lib/model/category_model_links_default_assignee.dart b/lib/model/category_model_links_default_assignee.dart new file mode 100644 index 0000000..282298b --- /dev/null +++ b/lib/model/category_model_links_default_assignee.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CategoryModelLinksDefaultAssignee { + /// Returns a new [CategoryModelLinksDefaultAssignee] instance. + CategoryModelLinksDefaultAssignee({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is CategoryModelLinksDefaultAssignee && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'CategoryModelLinksDefaultAssignee[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [CategoryModelLinksDefaultAssignee] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CategoryModelLinksDefaultAssignee? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CategoryModelLinksDefaultAssignee[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CategoryModelLinksDefaultAssignee[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CategoryModelLinksDefaultAssignee( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CategoryModelLinksDefaultAssignee.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CategoryModelLinksDefaultAssignee.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CategoryModelLinksDefaultAssignee-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CategoryModelLinksDefaultAssignee.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/category_model_links_project.dart b/lib/model/category_model_links_project.dart new file mode 100644 index 0000000..62b3cdd --- /dev/null +++ b/lib/model/category_model_links_project.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CategoryModelLinksProject { + /// Returns a new [CategoryModelLinksProject] instance. + CategoryModelLinksProject({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is CategoryModelLinksProject && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'CategoryModelLinksProject[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [CategoryModelLinksProject] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CategoryModelLinksProject? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CategoryModelLinksProject[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CategoryModelLinksProject[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CategoryModelLinksProject( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CategoryModelLinksProject.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CategoryModelLinksProject.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CategoryModelLinksProject-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CategoryModelLinksProject.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/category_model_links_self.dart b/lib/model/category_model_links_self.dart new file mode 100644 index 0000000..1662713 --- /dev/null +++ b/lib/model/category_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CategoryModelLinksSelf { + /// Returns a new [CategoryModelLinksSelf] instance. + CategoryModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is CategoryModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'CategoryModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [CategoryModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CategoryModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CategoryModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CategoryModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CategoryModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CategoryModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CategoryModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CategoryModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CategoryModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/collection_model.dart b/lib/model/collection_model.dart new file mode 100644 index 0000000..7093231 --- /dev/null +++ b/lib/model/collection_model.dart @@ -0,0 +1,210 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CollectionModel { + /// Returns a new [CollectionModel] instance. + CollectionModel({ + required this.type, + required this.total, + required this.count, + required this.links, + }); + + CollectionModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + CollectionModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is CollectionModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode); + + @override + String toString() => 'CollectionModel[type=$type, total=$total, count=$count, links=$links]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [CollectionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CollectionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CollectionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CollectionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CollectionModel( + type: CollectionModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: CollectionModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CollectionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CollectionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CollectionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CollectionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + }; +} + + +class CollectionModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const CollectionModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = CollectionModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][CollectionModelTypeEnum]. + static const values = [ + collection, + ]; + + static CollectionModelTypeEnum? fromJson(dynamic value) => CollectionModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CollectionModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [CollectionModelTypeEnum] to String, +/// and [decode] dynamic data back to [CollectionModelTypeEnum]. +class CollectionModelTypeEnumTypeTransformer { + factory CollectionModelTypeEnumTypeTransformer() => _instance ??= const CollectionModelTypeEnumTypeTransformer._(); + + const CollectionModelTypeEnumTypeTransformer._(); + + String encode(CollectionModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a CollectionModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + CollectionModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return CollectionModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [CollectionModelTypeEnumTypeTransformer] instance. + static CollectionModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/collection_model_links.dart b/lib/model/collection_model_links.dart new file mode 100644 index 0000000..cb28931 --- /dev/null +++ b/lib/model/collection_model_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CollectionModelLinks { + /// Returns a new [CollectionModelLinks] instance. + CollectionModelLinks({ + required this.self, + }); + + CollectionModelLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is CollectionModelLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'CollectionModelLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [CollectionModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CollectionModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CollectionModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CollectionModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CollectionModelLinks( + self: CollectionModelLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CollectionModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CollectionModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CollectionModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CollectionModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/collection_model_links_self.dart b/lib/model/collection_model_links_self.dart new file mode 100644 index 0000000..751482f --- /dev/null +++ b/lib/model/collection_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CollectionModelLinksSelf { + /// Returns a new [CollectionModelLinksSelf] instance. + CollectionModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is CollectionModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'CollectionModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [CollectionModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CollectionModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CollectionModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CollectionModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CollectionModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CollectionModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CollectionModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CollectionModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CollectionModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/comment_work_package_request.dart b/lib/model/comment_work_package_request.dart new file mode 100644 index 0000000..d58047d --- /dev/null +++ b/lib/model/comment_work_package_request.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CommentWorkPackageRequest { + /// Returns a new [CommentWorkPackageRequest] instance. + CommentWorkPackageRequest({ + this.comment, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + UpdateActivityRequestComment? comment; + + @override + bool operator ==(Object other) => identical(this, other) || other is CommentWorkPackageRequest && + other.comment == comment; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (comment == null ? 0 : comment!.hashCode); + + @override + String toString() => 'CommentWorkPackageRequest[comment=$comment]'; + + Map toJson() { + final json = {}; + if (this.comment != null) { + json[r'comment'] = this.comment; + } else { + json[r'comment'] = null; + } + return json; + } + + /// Returns a new [CommentWorkPackageRequest] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CommentWorkPackageRequest? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CommentWorkPackageRequest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CommentWorkPackageRequest[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CommentWorkPackageRequest( + comment: UpdateActivityRequestComment.fromJson(json[r'comment']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CommentWorkPackageRequest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CommentWorkPackageRequest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CommentWorkPackageRequest-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CommentWorkPackageRequest.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/configuration_model.dart b/lib/model/configuration_model.dart new file mode 100644 index 0000000..6da4e4d --- /dev/null +++ b/lib/model/configuration_model.dart @@ -0,0 +1,155 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ConfigurationModel { + /// Returns a new [ConfigurationModel] instance. + ConfigurationModel({ + this.maximumAttachmentFileSize, + this.hostName, + this.perPageOptions = const [], + this.activeFeatureFlags = const [], + }); + + /// The maximum allowed size of an attachment in Bytes + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? maximumAttachmentFileSize; + + /// The host name configured for the system + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? hostName; + + List perPageOptions; + + List activeFeatureFlags; + + @override + bool operator ==(Object other) => identical(this, other) || other is ConfigurationModel && + other.maximumAttachmentFileSize == maximumAttachmentFileSize && + other.hostName == hostName && + _deepEquality.equals(other.perPageOptions, perPageOptions) && + _deepEquality.equals(other.activeFeatureFlags, activeFeatureFlags); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (maximumAttachmentFileSize == null ? 0 : maximumAttachmentFileSize!.hashCode) + + (hostName == null ? 0 : hostName!.hashCode) + + (perPageOptions.hashCode) + + (activeFeatureFlags.hashCode); + + @override + String toString() => 'ConfigurationModel[maximumAttachmentFileSize=$maximumAttachmentFileSize, hostName=$hostName, perPageOptions=$perPageOptions, activeFeatureFlags=$activeFeatureFlags]'; + + Map toJson() { + final json = {}; + if (this.maximumAttachmentFileSize != null) { + json[r'maximumAttachmentFileSize'] = this.maximumAttachmentFileSize; + } else { + json[r'maximumAttachmentFileSize'] = null; + } + if (this.hostName != null) { + json[r'hostName'] = this.hostName; + } else { + json[r'hostName'] = null; + } + json[r'perPageOptions'] = this.perPageOptions; + json[r'activeFeatureFlags'] = this.activeFeatureFlags; + return json; + } + + /// Returns a new [ConfigurationModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ConfigurationModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ConfigurationModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ConfigurationModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ConfigurationModel( + maximumAttachmentFileSize: mapValueOfType(json, r'maximumAttachmentFileSize'), + hostName: mapValueOfType(json, r'hostName'), + perPageOptions: json[r'perPageOptions'] is Iterable + ? (json[r'perPageOptions'] as Iterable).cast().toList(growable: false) + : const [], + activeFeatureFlags: json[r'activeFeatureFlags'] is Iterable + ? (json[r'activeFeatureFlags'] as Iterable).cast().toList(growable: false) + : const [], + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ConfigurationModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ConfigurationModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ConfigurationModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ConfigurationModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/create_views_request.dart b/lib/model/create_views_request.dart new file mode 100644 index 0000000..167d476 --- /dev/null +++ b/lib/model/create_views_request.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CreateViewsRequest { + /// Returns a new [CreateViewsRequest] instance. + CreateViewsRequest({ + this.links, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + CreateViewsRequestLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is CreateViewsRequest && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'CreateViewsRequest[links=$links]'; + + Map toJson() { + final json = {}; + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [CreateViewsRequest] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CreateViewsRequest? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CreateViewsRequest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CreateViewsRequest[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CreateViewsRequest( + links: CreateViewsRequestLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CreateViewsRequest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CreateViewsRequest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CreateViewsRequest-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CreateViewsRequest.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/create_views_request_links.dart b/lib/model/create_views_request_links.dart new file mode 100644 index 0000000..144b3af --- /dev/null +++ b/lib/model/create_views_request_links.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CreateViewsRequestLinks { + /// Returns a new [CreateViewsRequestLinks] instance. + CreateViewsRequestLinks({ + this.query, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + CreateViewsRequestLinksQuery? query; + + @override + bool operator ==(Object other) => identical(this, other) || other is CreateViewsRequestLinks && + other.query == query; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (query == null ? 0 : query!.hashCode); + + @override + String toString() => 'CreateViewsRequestLinks[query=$query]'; + + Map toJson() { + final json = {}; + if (this.query != null) { + json[r'query'] = this.query; + } else { + json[r'query'] = null; + } + return json; + } + + /// Returns a new [CreateViewsRequestLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CreateViewsRequestLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CreateViewsRequestLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CreateViewsRequestLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CreateViewsRequestLinks( + query: CreateViewsRequestLinksQuery.fromJson(json[r'query']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CreateViewsRequestLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CreateViewsRequestLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CreateViewsRequestLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CreateViewsRequestLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/create_views_request_links_query.dart b/lib/model/create_views_request_links_query.dart new file mode 100644 index 0000000..2d28b0c --- /dev/null +++ b/lib/model/create_views_request_links_query.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CreateViewsRequestLinksQuery { + /// Returns a new [CreateViewsRequestLinksQuery] instance. + CreateViewsRequestLinksQuery({ + this.href, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? href; + + @override + bool operator ==(Object other) => identical(this, other) || other is CreateViewsRequestLinksQuery && + other.href == href; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode); + + @override + String toString() => 'CreateViewsRequestLinksQuery[href=$href]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + return json; + } + + /// Returns a new [CreateViewsRequestLinksQuery] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CreateViewsRequestLinksQuery? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CreateViewsRequestLinksQuery[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CreateViewsRequestLinksQuery[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CreateViewsRequestLinksQuery( + href: mapValueOfType(json, r'href'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CreateViewsRequestLinksQuery.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CreateViewsRequestLinksQuery.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CreateViewsRequestLinksQuery-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CreateViewsRequestLinksQuery.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/custom_action_model.dart b/lib/model/custom_action_model.dart new file mode 100644 index 0000000..f6994b7 --- /dev/null +++ b/lib/model/custom_action_model.dart @@ -0,0 +1,236 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CustomActionModel { + /// Returns a new [CustomActionModel] instance. + CustomActionModel({ + this.type, + this.name, + this.description, + this.links, + }); + + CustomActionModelTypeEnum? type; + + /// The name of the custom action + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? name; + + /// The description for the custom action + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? description; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + CustomActionModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is CustomActionModel && + other.type == type && + other.name == name && + other.description == description && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'CustomActionModel[type=$type, name=$name, description=$description, links=$links]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [CustomActionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CustomActionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CustomActionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CustomActionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CustomActionModel( + type: CustomActionModelTypeEnum.fromJson(json[r'_type']), + name: mapValueOfType(json, r'name'), + description: mapValueOfType(json, r'description'), + links: CustomActionModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CustomActionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CustomActionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CustomActionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CustomActionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + + +class CustomActionModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const CustomActionModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const customAction = CustomActionModelTypeEnum._(r'CustomAction'); + + /// List of all possible values in this [enum][CustomActionModelTypeEnum]. + static const values = [ + customAction, + ]; + + static CustomActionModelTypeEnum? fromJson(dynamic value) => CustomActionModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CustomActionModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [CustomActionModelTypeEnum] to String, +/// and [decode] dynamic data back to [CustomActionModelTypeEnum]. +class CustomActionModelTypeEnumTypeTransformer { + factory CustomActionModelTypeEnumTypeTransformer() => _instance ??= const CustomActionModelTypeEnumTypeTransformer._(); + + const CustomActionModelTypeEnumTypeTransformer._(); + + String encode(CustomActionModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a CustomActionModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + CustomActionModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'CustomAction': return CustomActionModelTypeEnum.customAction; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [CustomActionModelTypeEnumTypeTransformer] instance. + static CustomActionModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/custom_action_model_links.dart b/lib/model/custom_action_model_links.dart new file mode 100644 index 0000000..9a0c085 --- /dev/null +++ b/lib/model/custom_action_model_links.dart @@ -0,0 +1,117 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CustomActionModelLinks { + /// Returns a new [CustomActionModelLinks] instance. + CustomActionModelLinks({ + required this.self, + required this.executeImmediately, + }); + + CustomActionModelLinksSelf self; + + CustomActionModelLinksExecuteImmediately executeImmediately; + + @override + bool operator ==(Object other) => identical(this, other) || other is CustomActionModelLinks && + other.self == self && + other.executeImmediately == executeImmediately; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (executeImmediately.hashCode); + + @override + String toString() => 'CustomActionModelLinks[self=$self, executeImmediately=$executeImmediately]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'executeImmediately'] = this.executeImmediately; + return json; + } + + /// Returns a new [CustomActionModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CustomActionModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CustomActionModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CustomActionModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CustomActionModelLinks( + self: CustomActionModelLinksSelf.fromJson(json[r'self'])!, + executeImmediately: CustomActionModelLinksExecuteImmediately.fromJson(json[r'executeImmediately'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CustomActionModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CustomActionModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CustomActionModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CustomActionModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'executeImmediately', + }; +} + diff --git a/lib/model/custom_action_model_links_execute_immediately.dart b/lib/model/custom_action_model_links_execute_immediately.dart new file mode 100644 index 0000000..c9226c4 --- /dev/null +++ b/lib/model/custom_action_model_links_execute_immediately.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CustomActionModelLinksExecuteImmediately { + /// Returns a new [CustomActionModelLinksExecuteImmediately] instance. + CustomActionModelLinksExecuteImmediately({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is CustomActionModelLinksExecuteImmediately && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'CustomActionModelLinksExecuteImmediately[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [CustomActionModelLinksExecuteImmediately] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CustomActionModelLinksExecuteImmediately? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CustomActionModelLinksExecuteImmediately[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CustomActionModelLinksExecuteImmediately[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CustomActionModelLinksExecuteImmediately( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CustomActionModelLinksExecuteImmediately.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CustomActionModelLinksExecuteImmediately.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CustomActionModelLinksExecuteImmediately-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CustomActionModelLinksExecuteImmediately.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/custom_action_model_links_self.dart b/lib/model/custom_action_model_links_self.dart new file mode 100644 index 0000000..796a17a --- /dev/null +++ b/lib/model/custom_action_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CustomActionModelLinksSelf { + /// Returns a new [CustomActionModelLinksSelf] instance. + CustomActionModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is CustomActionModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'CustomActionModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [CustomActionModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CustomActionModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CustomActionModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CustomActionModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CustomActionModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CustomActionModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CustomActionModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CustomActionModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CustomActionModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/custom_option_model.dart b/lib/model/custom_option_model.dart new file mode 100644 index 0000000..7f416c4 --- /dev/null +++ b/lib/model/custom_option_model.dart @@ -0,0 +1,154 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CustomOptionModel { + /// Returns a new [CustomOptionModel] instance. + CustomOptionModel({ + this.id, + this.value, + this.links, + }); + + /// The identifier + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// The value defined for this custom option + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? value; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + CustomOptionModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is CustomOptionModel && + other.id == id && + other.value == value && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (value == null ? 0 : value!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'CustomOptionModel[id=$id, value=$value, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.value != null) { + json[r'value'] = this.value; + } else { + json[r'value'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [CustomOptionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CustomOptionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CustomOptionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CustomOptionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CustomOptionModel( + id: mapValueOfType(json, r'id'), + value: mapValueOfType(json, r'value'), + links: CustomOptionModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CustomOptionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CustomOptionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CustomOptionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CustomOptionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/custom_option_model_links.dart b/lib/model/custom_option_model_links.dart new file mode 100644 index 0000000..13075ab --- /dev/null +++ b/lib/model/custom_option_model_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CustomOptionModelLinks { + /// Returns a new [CustomOptionModelLinks] instance. + CustomOptionModelLinks({ + required this.self, + }); + + CustomOptionModelLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is CustomOptionModelLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'CustomOptionModelLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [CustomOptionModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CustomOptionModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CustomOptionModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CustomOptionModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CustomOptionModelLinks( + self: CustomOptionModelLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CustomOptionModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CustomOptionModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CustomOptionModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CustomOptionModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/custom_option_model_links_self.dart b/lib/model/custom_option_model_links_self.dart new file mode 100644 index 0000000..8d8a985 --- /dev/null +++ b/lib/model/custom_option_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class CustomOptionModelLinksSelf { + /// Returns a new [CustomOptionModelLinksSelf] instance. + CustomOptionModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is CustomOptionModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'CustomOptionModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [CustomOptionModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CustomOptionModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CustomOptionModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CustomOptionModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CustomOptionModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CustomOptionModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CustomOptionModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CustomOptionModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CustomOptionModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/day_collection_model.dart b/lib/model/day_collection_model.dart new file mode 100644 index 0000000..cbb2cbf --- /dev/null +++ b/lib/model/day_collection_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class DayCollectionModel { + /// Returns a new [DayCollectionModel] instance. + DayCollectionModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.embedded, + }); + + DayCollectionModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + DayCollectionModelAllOfLinks links; + + DayCollectionModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is DayCollectionModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'DayCollectionModel[type=$type, total=$total, count=$count, links=$links, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [DayCollectionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DayCollectionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DayCollectionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DayCollectionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DayCollectionModel( + type: DayCollectionModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: DayCollectionModelAllOfLinks.fromJson(json[r'_links'])!, + embedded: DayCollectionModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DayCollectionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DayCollectionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DayCollectionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DayCollectionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + '_embedded', + }; +} + + +class DayCollectionModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const DayCollectionModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = DayCollectionModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][DayCollectionModelTypeEnum]. + static const values = [ + collection, + ]; + + static DayCollectionModelTypeEnum? fromJson(dynamic value) => DayCollectionModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DayCollectionModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [DayCollectionModelTypeEnum] to String, +/// and [decode] dynamic data back to [DayCollectionModelTypeEnum]. +class DayCollectionModelTypeEnumTypeTransformer { + factory DayCollectionModelTypeEnumTypeTransformer() => _instance ??= const DayCollectionModelTypeEnumTypeTransformer._(); + + const DayCollectionModelTypeEnumTypeTransformer._(); + + String encode(DayCollectionModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a DayCollectionModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + DayCollectionModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return DayCollectionModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [DayCollectionModelTypeEnumTypeTransformer] instance. + static DayCollectionModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/day_collection_model_all_of_embedded.dart b/lib/model/day_collection_model_all_of_embedded.dart new file mode 100644 index 0000000..4339f80 --- /dev/null +++ b/lib/model/day_collection_model_all_of_embedded.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class DayCollectionModelAllOfEmbedded { + /// Returns a new [DayCollectionModelAllOfEmbedded] instance. + DayCollectionModelAllOfEmbedded({ + this.elements = const [], + }); + + List elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is DayCollectionModelAllOfEmbedded && + _deepEquality.equals(other.elements, elements); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements.hashCode); + + @override + String toString() => 'DayCollectionModelAllOfEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + json[r'elements'] = this.elements; + return json; + } + + /// Returns a new [DayCollectionModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DayCollectionModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DayCollectionModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DayCollectionModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DayCollectionModelAllOfEmbedded( + elements: DayModel.listFromJson(json[r'elements']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DayCollectionModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DayCollectionModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DayCollectionModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DayCollectionModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'elements', + }; +} + diff --git a/lib/model/day_collection_model_all_of_links.dart b/lib/model/day_collection_model_all_of_links.dart new file mode 100644 index 0000000..a449c95 --- /dev/null +++ b/lib/model/day_collection_model_all_of_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class DayCollectionModelAllOfLinks { + /// Returns a new [DayCollectionModelAllOfLinks] instance. + DayCollectionModelAllOfLinks({ + required this.self, + }); + + DayCollectionModelAllOfLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is DayCollectionModelAllOfLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'DayCollectionModelAllOfLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [DayCollectionModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DayCollectionModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DayCollectionModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DayCollectionModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DayCollectionModelAllOfLinks( + self: DayCollectionModelAllOfLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DayCollectionModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DayCollectionModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DayCollectionModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DayCollectionModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/day_collection_model_all_of_links_self.dart b/lib/model/day_collection_model_all_of_links_self.dart new file mode 100644 index 0000000..2915dc2 --- /dev/null +++ b/lib/model/day_collection_model_all_of_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class DayCollectionModelAllOfLinksSelf { + /// Returns a new [DayCollectionModelAllOfLinksSelf] instance. + DayCollectionModelAllOfLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is DayCollectionModelAllOfLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'DayCollectionModelAllOfLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [DayCollectionModelAllOfLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DayCollectionModelAllOfLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DayCollectionModelAllOfLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DayCollectionModelAllOfLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DayCollectionModelAllOfLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DayCollectionModelAllOfLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DayCollectionModelAllOfLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DayCollectionModelAllOfLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DayCollectionModelAllOfLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/day_model.dart b/lib/model/day_model.dart new file mode 100644 index 0000000..59c3818 --- /dev/null +++ b/lib/model/day_model.dart @@ -0,0 +1,224 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class DayModel { + /// Returns a new [DayModel] instance. + DayModel({ + required this.type, + required this.date, + required this.name, + required this.working, + this.links, + }); + + DayModelTypeEnum type; + + /// Date of the day. + DateTime date; + + /// Descriptive name for the day. + String name; + + /// `true` for a working day, `false` otherwise. + bool working; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DayModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is DayModel && + other.type == type && + other.date == date && + other.name == name && + other.working == working && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (date.hashCode) + + (name.hashCode) + + (working.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'DayModel[type=$type, date=$date, name=$name, working=$working, links=$links]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'date'] = _dateFormatter.format(this.date.toUtc()); + json[r'name'] = this.name; + json[r'working'] = this.working; + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [DayModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DayModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DayModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DayModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DayModel( + type: DayModelTypeEnum.fromJson(json[r'_type'])!, + date: mapDateTime(json, r'date', r'')!, + name: mapValueOfType(json, r'name')!, + working: mapValueOfType(json, r'working')!, + links: DayModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DayModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DayModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DayModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DayModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'date', + 'name', + 'working', + }; +} + + +class DayModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const DayModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const day = DayModelTypeEnum._(r'Day'); + + /// List of all possible values in this [enum][DayModelTypeEnum]. + static const values = [ + day, + ]; + + static DayModelTypeEnum? fromJson(dynamic value) => DayModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DayModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [DayModelTypeEnum] to String, +/// and [decode] dynamic data back to [DayModelTypeEnum]. +class DayModelTypeEnumTypeTransformer { + factory DayModelTypeEnumTypeTransformer() => _instance ??= const DayModelTypeEnumTypeTransformer._(); + + const DayModelTypeEnumTypeTransformer._(); + + String encode(DayModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a DayModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + DayModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Day': return DayModelTypeEnum.day; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [DayModelTypeEnumTypeTransformer] instance. + static DayModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/day_model_links.dart b/lib/model/day_model_links.dart new file mode 100644 index 0000000..cd6e8f7 --- /dev/null +++ b/lib/model/day_model_links.dart @@ -0,0 +1,133 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class DayModelLinks { + /// Returns a new [DayModelLinks] instance. + DayModelLinks({ + required this.self, + this.nonWorkingReasons = const [], + this.weekDay, + }); + + Link self; + + List nonWorkingReasons; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DayModelLinksWeekDay? weekDay; + + @override + bool operator ==(Object other) => identical(this, other) || other is DayModelLinks && + other.self == self && + _deepEquality.equals(other.nonWorkingReasons, nonWorkingReasons) && + other.weekDay == weekDay; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (nonWorkingReasons.hashCode) + + (weekDay == null ? 0 : weekDay!.hashCode); + + @override + String toString() => 'DayModelLinks[self=$self, nonWorkingReasons=$nonWorkingReasons, weekDay=$weekDay]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'nonWorkingReasons'] = this.nonWorkingReasons; + if (this.weekDay != null) { + json[r'weekDay'] = this.weekDay; + } else { + json[r'weekDay'] = null; + } + return json; + } + + /// Returns a new [DayModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DayModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DayModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DayModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DayModelLinks( + self: Link.fromJson(json[r'self'])!, + nonWorkingReasons: Link.listFromJson(json[r'nonWorkingReasons']), + weekDay: DayModelLinksWeekDay.fromJson(json[r'weekDay']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DayModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DayModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DayModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DayModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/day_model_links_week_day.dart b/lib/model/day_model_links_week_day.dart new file mode 100644 index 0000000..3b1a9d9 --- /dev/null +++ b/lib/model/day_model_links_week_day.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class DayModelLinksWeekDay { + /// Returns a new [DayModelLinksWeekDay] instance. + DayModelLinksWeekDay({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is DayModelLinksWeekDay && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'DayModelLinksWeekDay[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [DayModelLinksWeekDay] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DayModelLinksWeekDay? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DayModelLinksWeekDay[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DayModelLinksWeekDay[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DayModelLinksWeekDay( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DayModelLinksWeekDay.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DayModelLinksWeekDay.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DayModelLinksWeekDay-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DayModelLinksWeekDay.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/document_model.dart b/lib/model/document_model.dart new file mode 100644 index 0000000..9603b93 --- /dev/null +++ b/lib/model/document_model.dart @@ -0,0 +1,190 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class DocumentModel { + /// Returns a new [DocumentModel] instance. + DocumentModel({ + this.id, + this.title, + this.description, + this.createdAt, + this.links, + }); + + /// Document's id + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// The title chosen for the collection of documents + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// A text describing the documents + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? description; + + /// The time the document was created at + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? createdAt; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DocumentModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is DocumentModel && + other.id == id && + other.title == title && + other.description == description && + other.createdAt == createdAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'DocumentModel[id=$id, title=$title, description=$description, createdAt=$createdAt, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String(); + } else { + json[r'createdAt'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [DocumentModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DocumentModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DocumentModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DocumentModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DocumentModel( + id: mapValueOfType(json, r'id'), + title: mapValueOfType(json, r'title'), + description: mapValueOfType(json, r'description'), + createdAt: mapDateTime(json, r'createdAt', r''), + links: DocumentModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DocumentModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DocumentModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DocumentModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DocumentModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/document_model_links.dart b/lib/model/document_model_links.dart new file mode 100644 index 0000000..8ef0141 --- /dev/null +++ b/lib/model/document_model_links.dart @@ -0,0 +1,125 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class DocumentModelLinks { + /// Returns a new [DocumentModelLinks] instance. + DocumentModelLinks({ + required this.self, + required this.project, + required this.attachments, + }); + + DocumentModelLinksSelf self; + + DocumentModelLinksProject project; + + DocumentModelLinksAttachments attachments; + + @override + bool operator ==(Object other) => identical(this, other) || other is DocumentModelLinks && + other.self == self && + other.project == project && + other.attachments == attachments; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (project.hashCode) + + (attachments.hashCode); + + @override + String toString() => 'DocumentModelLinks[self=$self, project=$project, attachments=$attachments]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'project'] = this.project; + json[r'attachments'] = this.attachments; + return json; + } + + /// Returns a new [DocumentModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DocumentModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DocumentModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DocumentModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DocumentModelLinks( + self: DocumentModelLinksSelf.fromJson(json[r'self'])!, + project: DocumentModelLinksProject.fromJson(json[r'project'])!, + attachments: DocumentModelLinksAttachments.fromJson(json[r'attachments'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DocumentModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DocumentModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DocumentModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DocumentModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'project', + 'attachments', + }; +} + diff --git a/lib/model/document_model_links_attachments.dart b/lib/model/document_model_links_attachments.dart new file mode 100644 index 0000000..4a84bc7 --- /dev/null +++ b/lib/model/document_model_links_attachments.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class DocumentModelLinksAttachments { + /// Returns a new [DocumentModelLinksAttachments] instance. + DocumentModelLinksAttachments({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is DocumentModelLinksAttachments && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'DocumentModelLinksAttachments[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [DocumentModelLinksAttachments] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DocumentModelLinksAttachments? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DocumentModelLinksAttachments[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DocumentModelLinksAttachments[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DocumentModelLinksAttachments( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DocumentModelLinksAttachments.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DocumentModelLinksAttachments.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DocumentModelLinksAttachments-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DocumentModelLinksAttachments.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/document_model_links_project.dart b/lib/model/document_model_links_project.dart new file mode 100644 index 0000000..cf3d244 --- /dev/null +++ b/lib/model/document_model_links_project.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class DocumentModelLinksProject { + /// Returns a new [DocumentModelLinksProject] instance. + DocumentModelLinksProject({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is DocumentModelLinksProject && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'DocumentModelLinksProject[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [DocumentModelLinksProject] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DocumentModelLinksProject? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DocumentModelLinksProject[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DocumentModelLinksProject[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DocumentModelLinksProject( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DocumentModelLinksProject.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DocumentModelLinksProject.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DocumentModelLinksProject-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DocumentModelLinksProject.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/document_model_links_self.dart b/lib/model/document_model_links_self.dart new file mode 100644 index 0000000..6ed1fd0 --- /dev/null +++ b/lib/model/document_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class DocumentModelLinksSelf { + /// Returns a new [DocumentModelLinksSelf] instance. + DocumentModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is DocumentModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'DocumentModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [DocumentModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DocumentModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DocumentModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DocumentModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DocumentModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DocumentModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DocumentModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DocumentModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DocumentModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/error_response.dart b/lib/model/error_response.dart new file mode 100644 index 0000000..545ea01 --- /dev/null +++ b/lib/model/error_response.dart @@ -0,0 +1,213 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ErrorResponse { + /// Returns a new [ErrorResponse] instance. + ErrorResponse({ + this.embedded, + required this.type, + required this.errorIdentifier, + required this.message, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ErrorResponseEmbedded? embedded; + + ErrorResponseTypeEnum type; + + String errorIdentifier; + + String message; + + @override + bool operator ==(Object other) => identical(this, other) || other is ErrorResponse && + other.embedded == embedded && + other.type == type && + other.errorIdentifier == errorIdentifier && + other.message == message; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (embedded == null ? 0 : embedded!.hashCode) + + (type.hashCode) + + (errorIdentifier.hashCode) + + (message.hashCode); + + @override + String toString() => 'ErrorResponse[embedded=$embedded, type=$type, errorIdentifier=$errorIdentifier, message=$message]'; + + Map toJson() { + final json = {}; + if (this.embedded != null) { + json[r'_embedded'] = this.embedded; + } else { + json[r'_embedded'] = null; + } + json[r'_type'] = this.type; + json[r'errorIdentifier'] = this.errorIdentifier; + json[r'message'] = this.message; + return json; + } + + /// Returns a new [ErrorResponse] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ErrorResponse? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ErrorResponse[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ErrorResponse[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ErrorResponse( + embedded: ErrorResponseEmbedded.fromJson(json[r'_embedded']), + type: ErrorResponseTypeEnum.fromJson(json[r'_type'])!, + errorIdentifier: mapValueOfType(json, r'errorIdentifier')!, + message: mapValueOfType(json, r'message')!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ErrorResponse.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ErrorResponse.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ErrorResponse-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ErrorResponse.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'errorIdentifier', + 'message', + }; +} + + +class ErrorResponseTypeEnum { + /// Instantiate a new enum with the provided [value]. + const ErrorResponseTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const error = ErrorResponseTypeEnum._(r'Error'); + + /// List of all possible values in this [enum][ErrorResponseTypeEnum]. + static const values = [ + error, + ]; + + static ErrorResponseTypeEnum? fromJson(dynamic value) => ErrorResponseTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ErrorResponseTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [ErrorResponseTypeEnum] to String, +/// and [decode] dynamic data back to [ErrorResponseTypeEnum]. +class ErrorResponseTypeEnumTypeTransformer { + factory ErrorResponseTypeEnumTypeTransformer() => _instance ??= const ErrorResponseTypeEnumTypeTransformer._(); + + const ErrorResponseTypeEnumTypeTransformer._(); + + String encode(ErrorResponseTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a ErrorResponseTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + ErrorResponseTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Error': return ErrorResponseTypeEnum.error; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [ErrorResponseTypeEnumTypeTransformer] instance. + static ErrorResponseTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/error_response_embedded.dart b/lib/model/error_response_embedded.dart new file mode 100644 index 0000000..2e52104 --- /dev/null +++ b/lib/model/error_response_embedded.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ErrorResponseEmbedded { + /// Returns a new [ErrorResponseEmbedded] instance. + ErrorResponseEmbedded({ + this.details, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ErrorResponseEmbeddedDetails? details; + + @override + bool operator ==(Object other) => identical(this, other) || other is ErrorResponseEmbedded && + other.details == details; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (details == null ? 0 : details!.hashCode); + + @override + String toString() => 'ErrorResponseEmbedded[details=$details]'; + + Map toJson() { + final json = {}; + if (this.details != null) { + json[r'details'] = this.details; + } else { + json[r'details'] = null; + } + return json; + } + + /// Returns a new [ErrorResponseEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ErrorResponseEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ErrorResponseEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ErrorResponseEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ErrorResponseEmbedded( + details: ErrorResponseEmbeddedDetails.fromJson(json[r'details']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ErrorResponseEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ErrorResponseEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ErrorResponseEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ErrorResponseEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/error_response_embedded_details.dart b/lib/model/error_response_embedded_details.dart new file mode 100644 index 0000000..32fadeb --- /dev/null +++ b/lib/model/error_response_embedded_details.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ErrorResponseEmbeddedDetails { + /// Returns a new [ErrorResponseEmbeddedDetails] instance. + ErrorResponseEmbeddedDetails({ + this.attribute, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? attribute; + + @override + bool operator ==(Object other) => identical(this, other) || other is ErrorResponseEmbeddedDetails && + other.attribute == attribute; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (attribute == null ? 0 : attribute!.hashCode); + + @override + String toString() => 'ErrorResponseEmbeddedDetails[attribute=$attribute]'; + + Map toJson() { + final json = {}; + if (this.attribute != null) { + json[r'attribute'] = this.attribute; + } else { + json[r'attribute'] = null; + } + return json; + } + + /// Returns a new [ErrorResponseEmbeddedDetails] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ErrorResponseEmbeddedDetails? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ErrorResponseEmbeddedDetails[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ErrorResponseEmbeddedDetails[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ErrorResponseEmbeddedDetails( + attribute: mapValueOfType(json, r'attribute'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ErrorResponseEmbeddedDetails.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ErrorResponseEmbeddedDetails.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ErrorResponseEmbeddedDetails-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ErrorResponseEmbeddedDetails.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/execute_custom_action_request.dart b/lib/model/execute_custom_action_request.dart new file mode 100644 index 0000000..f617390 --- /dev/null +++ b/lib/model/execute_custom_action_request.dart @@ -0,0 +1,135 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ExecuteCustomActionRequest { + /// Returns a new [ExecuteCustomActionRequest] instance. + ExecuteCustomActionRequest({ + this.links, + this.lockVersion, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ExecuteCustomActionRequestLinks? links; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? lockVersion; + + @override + bool operator ==(Object other) => identical(this, other) || other is ExecuteCustomActionRequest && + other.links == links && + other.lockVersion == lockVersion; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (links == null ? 0 : links!.hashCode) + + (lockVersion == null ? 0 : lockVersion!.hashCode); + + @override + String toString() => 'ExecuteCustomActionRequest[links=$links, lockVersion=$lockVersion]'; + + Map toJson() { + final json = {}; + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + if (this.lockVersion != null) { + json[r'lockVersion'] = this.lockVersion; + } else { + json[r'lockVersion'] = null; + } + return json; + } + + /// Returns a new [ExecuteCustomActionRequest] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ExecuteCustomActionRequest? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ExecuteCustomActionRequest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ExecuteCustomActionRequest[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ExecuteCustomActionRequest( + links: ExecuteCustomActionRequestLinks.fromJson(json[r'_links']), + lockVersion: mapValueOfType(json, r'lockVersion'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ExecuteCustomActionRequest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ExecuteCustomActionRequest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ExecuteCustomActionRequest-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ExecuteCustomActionRequest.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/execute_custom_action_request_links.dart b/lib/model/execute_custom_action_request_links.dart new file mode 100644 index 0000000..06e7d11 --- /dev/null +++ b/lib/model/execute_custom_action_request_links.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ExecuteCustomActionRequestLinks { + /// Returns a new [ExecuteCustomActionRequestLinks] instance. + ExecuteCustomActionRequestLinks({ + this.workPackage, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ExecuteCustomActionRequestLinksWorkPackage? workPackage; + + @override + bool operator ==(Object other) => identical(this, other) || other is ExecuteCustomActionRequestLinks && + other.workPackage == workPackage; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (workPackage == null ? 0 : workPackage!.hashCode); + + @override + String toString() => 'ExecuteCustomActionRequestLinks[workPackage=$workPackage]'; + + Map toJson() { + final json = {}; + if (this.workPackage != null) { + json[r'workPackage'] = this.workPackage; + } else { + json[r'workPackage'] = null; + } + return json; + } + + /// Returns a new [ExecuteCustomActionRequestLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ExecuteCustomActionRequestLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ExecuteCustomActionRequestLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ExecuteCustomActionRequestLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ExecuteCustomActionRequestLinks( + workPackage: ExecuteCustomActionRequestLinksWorkPackage.fromJson(json[r'workPackage']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ExecuteCustomActionRequestLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ExecuteCustomActionRequestLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ExecuteCustomActionRequestLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ExecuteCustomActionRequestLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/execute_custom_action_request_links_work_package.dart b/lib/model/execute_custom_action_request_links_work_package.dart new file mode 100644 index 0000000..547b2f7 --- /dev/null +++ b/lib/model/execute_custom_action_request_links_work_package.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ExecuteCustomActionRequestLinksWorkPackage { + /// Returns a new [ExecuteCustomActionRequestLinksWorkPackage] instance. + ExecuteCustomActionRequestLinksWorkPackage({ + this.href, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? href; + + @override + bool operator ==(Object other) => identical(this, other) || other is ExecuteCustomActionRequestLinksWorkPackage && + other.href == href; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode); + + @override + String toString() => 'ExecuteCustomActionRequestLinksWorkPackage[href=$href]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + return json; + } + + /// Returns a new [ExecuteCustomActionRequestLinksWorkPackage] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ExecuteCustomActionRequestLinksWorkPackage? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ExecuteCustomActionRequestLinksWorkPackage[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ExecuteCustomActionRequestLinksWorkPackage[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ExecuteCustomActionRequestLinksWorkPackage( + href: mapValueOfType(json, r'href'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ExecuteCustomActionRequestLinksWorkPackage.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ExecuteCustomActionRequestLinksWorkPackage.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ExecuteCustomActionRequestLinksWorkPackage-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ExecuteCustomActionRequestLinksWorkPackage.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/file_link_collection_read_model.dart b/lib/model/file_link_collection_read_model.dart new file mode 100644 index 0000000..fe257e4 --- /dev/null +++ b/lib/model/file_link_collection_read_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkCollectionReadModel { + /// Returns a new [FileLinkCollectionReadModel] instance. + FileLinkCollectionReadModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.embedded, + }); + + FileLinkCollectionReadModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + FileLinkCollectionReadModelAllOfLinks links; + + FileLinkCollectionReadModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkCollectionReadModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'FileLinkCollectionReadModel[type=$type, total=$total, count=$count, links=$links, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [FileLinkCollectionReadModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkCollectionReadModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkCollectionReadModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkCollectionReadModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkCollectionReadModel( + type: FileLinkCollectionReadModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: FileLinkCollectionReadModelAllOfLinks.fromJson(json[r'_links'])!, + embedded: FileLinkCollectionReadModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkCollectionReadModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkCollectionReadModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkCollectionReadModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkCollectionReadModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + '_embedded', + }; +} + + +class FileLinkCollectionReadModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const FileLinkCollectionReadModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = FileLinkCollectionReadModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][FileLinkCollectionReadModelTypeEnum]. + static const values = [ + collection, + ]; + + static FileLinkCollectionReadModelTypeEnum? fromJson(dynamic value) => FileLinkCollectionReadModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkCollectionReadModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [FileLinkCollectionReadModelTypeEnum] to String, +/// and [decode] dynamic data back to [FileLinkCollectionReadModelTypeEnum]. +class FileLinkCollectionReadModelTypeEnumTypeTransformer { + factory FileLinkCollectionReadModelTypeEnumTypeTransformer() => _instance ??= const FileLinkCollectionReadModelTypeEnumTypeTransformer._(); + + const FileLinkCollectionReadModelTypeEnumTypeTransformer._(); + + String encode(FileLinkCollectionReadModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a FileLinkCollectionReadModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + FileLinkCollectionReadModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return FileLinkCollectionReadModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [FileLinkCollectionReadModelTypeEnumTypeTransformer] instance. + static FileLinkCollectionReadModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/file_link_collection_read_model_all_of_embedded.dart b/lib/model/file_link_collection_read_model_all_of_embedded.dart new file mode 100644 index 0000000..49616fb --- /dev/null +++ b/lib/model/file_link_collection_read_model_all_of_embedded.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkCollectionReadModelAllOfEmbedded { + /// Returns a new [FileLinkCollectionReadModelAllOfEmbedded] instance. + FileLinkCollectionReadModelAllOfEmbedded({ + this.elements = const [], + }); + + List elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkCollectionReadModelAllOfEmbedded && + _deepEquality.equals(other.elements, elements); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements.hashCode); + + @override + String toString() => 'FileLinkCollectionReadModelAllOfEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + json[r'elements'] = this.elements; + return json; + } + + /// Returns a new [FileLinkCollectionReadModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkCollectionReadModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkCollectionReadModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkCollectionReadModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkCollectionReadModelAllOfEmbedded( + elements: FileLinkReadModel.listFromJson(json[r'elements']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkCollectionReadModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkCollectionReadModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkCollectionReadModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkCollectionReadModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'elements', + }; +} + diff --git a/lib/model/file_link_collection_read_model_all_of_links.dart b/lib/model/file_link_collection_read_model_all_of_links.dart new file mode 100644 index 0000000..69a56cd --- /dev/null +++ b/lib/model/file_link_collection_read_model_all_of_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkCollectionReadModelAllOfLinks { + /// Returns a new [FileLinkCollectionReadModelAllOfLinks] instance. + FileLinkCollectionReadModelAllOfLinks({ + required this.self, + }); + + FileLinkCollectionReadModelAllOfLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkCollectionReadModelAllOfLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'FileLinkCollectionReadModelAllOfLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [FileLinkCollectionReadModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkCollectionReadModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkCollectionReadModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkCollectionReadModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkCollectionReadModelAllOfLinks( + self: FileLinkCollectionReadModelAllOfLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkCollectionReadModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkCollectionReadModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkCollectionReadModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkCollectionReadModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/file_link_collection_read_model_all_of_links_self.dart b/lib/model/file_link_collection_read_model_all_of_links_self.dart new file mode 100644 index 0000000..4293f69 --- /dev/null +++ b/lib/model/file_link_collection_read_model_all_of_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkCollectionReadModelAllOfLinksSelf { + /// Returns a new [FileLinkCollectionReadModelAllOfLinksSelf] instance. + FileLinkCollectionReadModelAllOfLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkCollectionReadModelAllOfLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'FileLinkCollectionReadModelAllOfLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [FileLinkCollectionReadModelAllOfLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkCollectionReadModelAllOfLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkCollectionReadModelAllOfLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkCollectionReadModelAllOfLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkCollectionReadModelAllOfLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkCollectionReadModelAllOfLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkCollectionReadModelAllOfLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkCollectionReadModelAllOfLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkCollectionReadModelAllOfLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/file_link_collection_write_model.dart b/lib/model/file_link_collection_write_model.dart new file mode 100644 index 0000000..6264657 --- /dev/null +++ b/lib/model/file_link_collection_write_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkCollectionWriteModel { + /// Returns a new [FileLinkCollectionWriteModel] instance. + FileLinkCollectionWriteModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.embedded, + }); + + FileLinkCollectionWriteModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + CollectionModelLinks links; + + FileLinkCollectionWriteModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkCollectionWriteModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'FileLinkCollectionWriteModel[type=$type, total=$total, count=$count, links=$links, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [FileLinkCollectionWriteModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkCollectionWriteModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkCollectionWriteModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkCollectionWriteModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkCollectionWriteModel( + type: FileLinkCollectionWriteModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: CollectionModelLinks.fromJson(json[r'_links'])!, + embedded: FileLinkCollectionWriteModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkCollectionWriteModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkCollectionWriteModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkCollectionWriteModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkCollectionWriteModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + '_embedded', + }; +} + + +class FileLinkCollectionWriteModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const FileLinkCollectionWriteModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = FileLinkCollectionWriteModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][FileLinkCollectionWriteModelTypeEnum]. + static const values = [ + collection, + ]; + + static FileLinkCollectionWriteModelTypeEnum? fromJson(dynamic value) => FileLinkCollectionWriteModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkCollectionWriteModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [FileLinkCollectionWriteModelTypeEnum] to String, +/// and [decode] dynamic data back to [FileLinkCollectionWriteModelTypeEnum]. +class FileLinkCollectionWriteModelTypeEnumTypeTransformer { + factory FileLinkCollectionWriteModelTypeEnumTypeTransformer() => _instance ??= const FileLinkCollectionWriteModelTypeEnumTypeTransformer._(); + + const FileLinkCollectionWriteModelTypeEnumTypeTransformer._(); + + String encode(FileLinkCollectionWriteModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a FileLinkCollectionWriteModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + FileLinkCollectionWriteModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return FileLinkCollectionWriteModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [FileLinkCollectionWriteModelTypeEnumTypeTransformer] instance. + static FileLinkCollectionWriteModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/file_link_collection_write_model_all_of_embedded.dart b/lib/model/file_link_collection_write_model_all_of_embedded.dart new file mode 100644 index 0000000..73769b7 --- /dev/null +++ b/lib/model/file_link_collection_write_model_all_of_embedded.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkCollectionWriteModelAllOfEmbedded { + /// Returns a new [FileLinkCollectionWriteModelAllOfEmbedded] instance. + FileLinkCollectionWriteModelAllOfEmbedded({ + this.elements = const [], + }); + + List elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkCollectionWriteModelAllOfEmbedded && + _deepEquality.equals(other.elements, elements); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements.hashCode); + + @override + String toString() => 'FileLinkCollectionWriteModelAllOfEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + json[r'elements'] = this.elements; + return json; + } + + /// Returns a new [FileLinkCollectionWriteModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkCollectionWriteModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkCollectionWriteModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkCollectionWriteModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkCollectionWriteModelAllOfEmbedded( + elements: FileLinkWriteModel.listFromJson(json[r'elements']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkCollectionWriteModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkCollectionWriteModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkCollectionWriteModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkCollectionWriteModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'elements', + }; +} + diff --git a/lib/model/file_link_origin_data_model.dart b/lib/model/file_link_origin_data_model.dart new file mode 100644 index 0000000..18e366b --- /dev/null +++ b/lib/model/file_link_origin_data_model.dart @@ -0,0 +1,229 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkOriginDataModel { + /// Returns a new [FileLinkOriginDataModel] instance. + FileLinkOriginDataModel({ + required this.id, + required this.name, + this.mimeType, + this.size, + this.createdAt, + this.lastModifiedAt, + this.createdByName, + this.lastModifiedByName, + }); + + /// Linked file's id on the origin + String id; + + /// Linked file's name on the origin + String name; + + /// MIME type of the linked file. To link a folder entity, the custom MIME type `application/x-op-directory` MUST be provided. Otherwise it defaults back to an unknown MIME type. + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? mimeType; + + /// file size on origin in bytes + /// + /// Minimum value: 0 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? size; + + /// Timestamp of the creation datetime of the file on the origin + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? createdAt; + + /// Timestamp of the datetime of the last modification of the file on the origin + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? lastModifiedAt; + + /// Display name of the author that created the file on the origin + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? createdByName; + + /// Display name of the author that modified the file on the origin last + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? lastModifiedByName; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkOriginDataModel && + other.id == id && + other.name == name && + other.mimeType == mimeType && + other.size == size && + other.createdAt == createdAt && + other.lastModifiedAt == lastModifiedAt && + other.createdByName == createdByName && + other.lastModifiedByName == lastModifiedByName; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (name.hashCode) + + (mimeType == null ? 0 : mimeType!.hashCode) + + (size == null ? 0 : size!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (lastModifiedAt == null ? 0 : lastModifiedAt!.hashCode) + + (createdByName == null ? 0 : createdByName!.hashCode) + + (lastModifiedByName == null ? 0 : lastModifiedByName!.hashCode); + + @override + String toString() => 'FileLinkOriginDataModel[id=$id, name=$name, mimeType=$mimeType, size=$size, createdAt=$createdAt, lastModifiedAt=$lastModifiedAt, createdByName=$createdByName, lastModifiedByName=$lastModifiedByName]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'name'] = this.name; + if (this.mimeType != null) { + json[r'mimeType'] = this.mimeType; + } else { + json[r'mimeType'] = null; + } + if (this.size != null) { + json[r'size'] = this.size; + } else { + json[r'size'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String(); + } else { + json[r'createdAt'] = null; + } + if (this.lastModifiedAt != null) { + json[r'lastModifiedAt'] = this.lastModifiedAt!.toUtc().toIso8601String(); + } else { + json[r'lastModifiedAt'] = null; + } + if (this.createdByName != null) { + json[r'createdByName'] = this.createdByName; + } else { + json[r'createdByName'] = null; + } + if (this.lastModifiedByName != null) { + json[r'lastModifiedByName'] = this.lastModifiedByName; + } else { + json[r'lastModifiedByName'] = null; + } + return json; + } + + /// Returns a new [FileLinkOriginDataModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkOriginDataModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkOriginDataModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkOriginDataModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkOriginDataModel( + id: mapValueOfType(json, r'id')!, + name: mapValueOfType(json, r'name')!, + mimeType: mapValueOfType(json, r'mimeType'), + size: mapValueOfType(json, r'size'), + createdAt: mapDateTime(json, r'createdAt', r''), + lastModifiedAt: mapDateTime(json, r'lastModifiedAt', r''), + createdByName: mapValueOfType(json, r'createdByName'), + lastModifiedByName: mapValueOfType(json, r'lastModifiedByName'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkOriginDataModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkOriginDataModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkOriginDataModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkOriginDataModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'name', + }; +} + diff --git a/lib/model/file_link_read_model.dart b/lib/model/file_link_read_model.dart new file mode 100644 index 0000000..8118bb6 --- /dev/null +++ b/lib/model/file_link_read_model.dart @@ -0,0 +1,258 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkReadModel { + /// Returns a new [FileLinkReadModel] instance. + FileLinkReadModel({ + required this.id, + required this.type, + this.createdAt, + this.updatedAt, + required this.originData, + this.embedded, + required this.links, + }); + + /// File link id + int id; + + FileLinkReadModelTypeEnum type; + + /// Time of creation + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? createdAt; + + /// Time of the most recent change to the file link + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? updatedAt; + + FileLinkOriginDataModel originData; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + FileLinkReadModelEmbedded? embedded; + + FileLinkReadModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkReadModel && + other.id == id && + other.type == type && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.originData == originData && + other.embedded == embedded && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (type.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (originData.hashCode) + + (embedded == null ? 0 : embedded!.hashCode) + + (links.hashCode); + + @override + String toString() => 'FileLinkReadModel[id=$id, type=$type, createdAt=$createdAt, updatedAt=$updatedAt, originData=$originData, embedded=$embedded, links=$links]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'_type'] = this.type; + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String(); + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt!.toUtc().toIso8601String(); + } else { + json[r'updatedAt'] = null; + } + json[r'originData'] = this.originData; + if (this.embedded != null) { + json[r'_embedded'] = this.embedded; + } else { + json[r'_embedded'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [FileLinkReadModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkReadModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkReadModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkReadModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkReadModel( + id: mapValueOfType(json, r'id')!, + type: FileLinkReadModelTypeEnum.fromJson(json[r'_type'])!, + createdAt: mapDateTime(json, r'createdAt', r''), + updatedAt: mapDateTime(json, r'updatedAt', r''), + originData: FileLinkOriginDataModel.fromJson(json[r'originData'])!, + embedded: FileLinkReadModelEmbedded.fromJson(json[r'_embedded']), + links: FileLinkReadModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkReadModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkReadModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkReadModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + '_type', + 'originData', + '_links', + }; +} + + +class FileLinkReadModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const FileLinkReadModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const fileLink = FileLinkReadModelTypeEnum._(r'FileLink'); + + /// List of all possible values in this [enum][FileLinkReadModelTypeEnum]. + static const values = [ + fileLink, + ]; + + static FileLinkReadModelTypeEnum? fromJson(dynamic value) => FileLinkReadModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [FileLinkReadModelTypeEnum] to String, +/// and [decode] dynamic data back to [FileLinkReadModelTypeEnum]. +class FileLinkReadModelTypeEnumTypeTransformer { + factory FileLinkReadModelTypeEnumTypeTransformer() => _instance ??= const FileLinkReadModelTypeEnumTypeTransformer._(); + + const FileLinkReadModelTypeEnumTypeTransformer._(); + + String encode(FileLinkReadModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a FileLinkReadModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + FileLinkReadModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'FileLink': return FileLinkReadModelTypeEnum.fileLink; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [FileLinkReadModelTypeEnumTypeTransformer] instance. + static FileLinkReadModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/file_link_read_model_embedded.dart b/lib/model/file_link_read_model_embedded.dart new file mode 100644 index 0000000..a9c3f49 --- /dev/null +++ b/lib/model/file_link_read_model_embedded.dart @@ -0,0 +1,117 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkReadModelEmbedded { + /// Returns a new [FileLinkReadModelEmbedded] instance. + FileLinkReadModelEmbedded({ + required this.storage, + required this.container, + }); + + StorageReadModel storage; + + WorkPackageModel container; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkReadModelEmbedded && + other.storage == storage && + other.container == container; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (storage.hashCode) + + (container.hashCode); + + @override + String toString() => 'FileLinkReadModelEmbedded[storage=$storage, container=$container]'; + + Map toJson() { + final json = {}; + json[r'storage'] = this.storage; + json[r'container'] = this.container; + return json; + } + + /// Returns a new [FileLinkReadModelEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkReadModelEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkReadModelEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkReadModelEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkReadModelEmbedded( + storage: StorageReadModel.fromJson(json[r'storage'])!, + container: WorkPackageModel.fromJson(json[r'container'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModelEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkReadModelEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkReadModelEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkReadModelEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'storage', + 'container', + }; +} + diff --git a/lib/model/file_link_read_model_links.dart b/lib/model/file_link_read_model_links.dart new file mode 100644 index 0000000..242fb61 --- /dev/null +++ b/lib/model/file_link_read_model_links.dart @@ -0,0 +1,198 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkReadModelLinks { + /// Returns a new [FileLinkReadModelLinks] instance. + FileLinkReadModelLinks({ + required this.self, + required this.storage, + required this.container, + required this.creator, + this.delete, + required this.permission, + required this.originOpen, + required this.staticOriginOpen, + required this.originOpenLocation, + required this.staticOriginOpenLocation, + required this.staticOriginDownload, + }); + + FileLinkReadModelLinksSelf self; + + FileLinkReadModelLinksStorage storage; + + FileLinkReadModelLinksContainer container; + + FileLinkReadModelLinksCreator creator; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + FileLinkReadModelLinksDelete? delete; + + FileLinkReadModelLinksPermission permission; + + FileLinkReadModelLinksOriginOpen originOpen; + + FileLinkReadModelLinksStaticOriginOpen staticOriginOpen; + + FileLinkReadModelLinksOriginOpenLocation originOpenLocation; + + FileLinkReadModelLinksStaticOriginOpenLocation staticOriginOpenLocation; + + FileLinkReadModelLinksStaticOriginDownload staticOriginDownload; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkReadModelLinks && + other.self == self && + other.storage == storage && + other.container == container && + other.creator == creator && + other.delete == delete && + other.permission == permission && + other.originOpen == originOpen && + other.staticOriginOpen == staticOriginOpen && + other.originOpenLocation == originOpenLocation && + other.staticOriginOpenLocation == staticOriginOpenLocation && + other.staticOriginDownload == staticOriginDownload; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (storage.hashCode) + + (container.hashCode) + + (creator.hashCode) + + (delete == null ? 0 : delete!.hashCode) + + (permission.hashCode) + + (originOpen.hashCode) + + (staticOriginOpen.hashCode) + + (originOpenLocation.hashCode) + + (staticOriginOpenLocation.hashCode) + + (staticOriginDownload.hashCode); + + @override + String toString() => 'FileLinkReadModelLinks[self=$self, storage=$storage, container=$container, creator=$creator, delete=$delete, permission=$permission, originOpen=$originOpen, staticOriginOpen=$staticOriginOpen, originOpenLocation=$originOpenLocation, staticOriginOpenLocation=$staticOriginOpenLocation, staticOriginDownload=$staticOriginDownload]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'storage'] = this.storage; + json[r'container'] = this.container; + json[r'creator'] = this.creator; + if (this.delete != null) { + json[r'delete'] = this.delete; + } else { + json[r'delete'] = null; + } + json[r'permission'] = this.permission; + json[r'originOpen'] = this.originOpen; + json[r'staticOriginOpen'] = this.staticOriginOpen; + json[r'originOpenLocation'] = this.originOpenLocation; + json[r'staticOriginOpenLocation'] = this.staticOriginOpenLocation; + json[r'staticOriginDownload'] = this.staticOriginDownload; + return json; + } + + /// Returns a new [FileLinkReadModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkReadModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkReadModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkReadModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkReadModelLinks( + self: FileLinkReadModelLinksSelf.fromJson(json[r'self'])!, + storage: FileLinkReadModelLinksStorage.fromJson(json[r'storage'])!, + container: FileLinkReadModelLinksContainer.fromJson(json[r'container'])!, + creator: FileLinkReadModelLinksCreator.fromJson(json[r'creator'])!, + delete: FileLinkReadModelLinksDelete.fromJson(json[r'delete']), + permission: FileLinkReadModelLinksPermission.fromJson(json[r'permission'])!, + originOpen: FileLinkReadModelLinksOriginOpen.fromJson(json[r'originOpen'])!, + staticOriginOpen: FileLinkReadModelLinksStaticOriginOpen.fromJson(json[r'staticOriginOpen'])!, + originOpenLocation: FileLinkReadModelLinksOriginOpenLocation.fromJson(json[r'originOpenLocation'])!, + staticOriginOpenLocation: FileLinkReadModelLinksStaticOriginOpenLocation.fromJson(json[r'staticOriginOpenLocation'])!, + staticOriginDownload: FileLinkReadModelLinksStaticOriginDownload.fromJson(json[r'staticOriginDownload'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkReadModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkReadModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkReadModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'storage', + 'container', + 'creator', + 'permission', + 'originOpen', + 'staticOriginOpen', + 'originOpenLocation', + 'staticOriginOpenLocation', + 'staticOriginDownload', + }; +} + diff --git a/lib/model/file_link_read_model_links_container.dart b/lib/model/file_link_read_model_links_container.dart new file mode 100644 index 0000000..da38e56 --- /dev/null +++ b/lib/model/file_link_read_model_links_container.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkReadModelLinksContainer { + /// Returns a new [FileLinkReadModelLinksContainer] instance. + FileLinkReadModelLinksContainer({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkReadModelLinksContainer && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'FileLinkReadModelLinksContainer[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [FileLinkReadModelLinksContainer] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkReadModelLinksContainer? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkReadModelLinksContainer[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkReadModelLinksContainer[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkReadModelLinksContainer( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModelLinksContainer.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkReadModelLinksContainer.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkReadModelLinksContainer-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkReadModelLinksContainer.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/file_link_read_model_links_creator.dart b/lib/model/file_link_read_model_links_creator.dart new file mode 100644 index 0000000..008a625 --- /dev/null +++ b/lib/model/file_link_read_model_links_creator.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkReadModelLinksCreator { + /// Returns a new [FileLinkReadModelLinksCreator] instance. + FileLinkReadModelLinksCreator({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkReadModelLinksCreator && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'FileLinkReadModelLinksCreator[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [FileLinkReadModelLinksCreator] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkReadModelLinksCreator? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkReadModelLinksCreator[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkReadModelLinksCreator[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkReadModelLinksCreator( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModelLinksCreator.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkReadModelLinksCreator.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkReadModelLinksCreator-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkReadModelLinksCreator.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/file_link_read_model_links_delete.dart b/lib/model/file_link_read_model_links_delete.dart new file mode 100644 index 0000000..c8c3986 --- /dev/null +++ b/lib/model/file_link_read_model_links_delete.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkReadModelLinksDelete { + /// Returns a new [FileLinkReadModelLinksDelete] instance. + FileLinkReadModelLinksDelete({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkReadModelLinksDelete && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'FileLinkReadModelLinksDelete[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [FileLinkReadModelLinksDelete] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkReadModelLinksDelete? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkReadModelLinksDelete[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkReadModelLinksDelete[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkReadModelLinksDelete( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModelLinksDelete.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkReadModelLinksDelete.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkReadModelLinksDelete-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkReadModelLinksDelete.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/file_link_read_model_links_origin_open.dart b/lib/model/file_link_read_model_links_origin_open.dart new file mode 100644 index 0000000..450998b --- /dev/null +++ b/lib/model/file_link_read_model_links_origin_open.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkReadModelLinksOriginOpen { + /// Returns a new [FileLinkReadModelLinksOriginOpen] instance. + FileLinkReadModelLinksOriginOpen({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkReadModelLinksOriginOpen && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'FileLinkReadModelLinksOriginOpen[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [FileLinkReadModelLinksOriginOpen] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkReadModelLinksOriginOpen? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkReadModelLinksOriginOpen[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkReadModelLinksOriginOpen[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkReadModelLinksOriginOpen( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModelLinksOriginOpen.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkReadModelLinksOriginOpen.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkReadModelLinksOriginOpen-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkReadModelLinksOriginOpen.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/file_link_read_model_links_origin_open_location.dart b/lib/model/file_link_read_model_links_origin_open_location.dart new file mode 100644 index 0000000..bf520da --- /dev/null +++ b/lib/model/file_link_read_model_links_origin_open_location.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkReadModelLinksOriginOpenLocation { + /// Returns a new [FileLinkReadModelLinksOriginOpenLocation] instance. + FileLinkReadModelLinksOriginOpenLocation({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkReadModelLinksOriginOpenLocation && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'FileLinkReadModelLinksOriginOpenLocation[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [FileLinkReadModelLinksOriginOpenLocation] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkReadModelLinksOriginOpenLocation? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkReadModelLinksOriginOpenLocation[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkReadModelLinksOriginOpenLocation[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkReadModelLinksOriginOpenLocation( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModelLinksOriginOpenLocation.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkReadModelLinksOriginOpenLocation.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkReadModelLinksOriginOpenLocation-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkReadModelLinksOriginOpenLocation.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/file_link_read_model_links_permission.dart b/lib/model/file_link_read_model_links_permission.dart new file mode 100644 index 0000000..69167a5 --- /dev/null +++ b/lib/model/file_link_read_model_links_permission.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkReadModelLinksPermission { + /// Returns a new [FileLinkReadModelLinksPermission] instance. + FileLinkReadModelLinksPermission({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkReadModelLinksPermission && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'FileLinkReadModelLinksPermission[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [FileLinkReadModelLinksPermission] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkReadModelLinksPermission? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkReadModelLinksPermission[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkReadModelLinksPermission[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkReadModelLinksPermission( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModelLinksPermission.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkReadModelLinksPermission.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkReadModelLinksPermission-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkReadModelLinksPermission.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/file_link_read_model_links_self.dart b/lib/model/file_link_read_model_links_self.dart new file mode 100644 index 0000000..704a833 --- /dev/null +++ b/lib/model/file_link_read_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkReadModelLinksSelf { + /// Returns a new [FileLinkReadModelLinksSelf] instance. + FileLinkReadModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkReadModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'FileLinkReadModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [FileLinkReadModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkReadModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkReadModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkReadModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkReadModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkReadModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkReadModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkReadModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/file_link_read_model_links_static_origin_download.dart b/lib/model/file_link_read_model_links_static_origin_download.dart new file mode 100644 index 0000000..8946834 --- /dev/null +++ b/lib/model/file_link_read_model_links_static_origin_download.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkReadModelLinksStaticOriginDownload { + /// Returns a new [FileLinkReadModelLinksStaticOriginDownload] instance. + FileLinkReadModelLinksStaticOriginDownload({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkReadModelLinksStaticOriginDownload && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'FileLinkReadModelLinksStaticOriginDownload[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [FileLinkReadModelLinksStaticOriginDownload] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkReadModelLinksStaticOriginDownload? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkReadModelLinksStaticOriginDownload[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkReadModelLinksStaticOriginDownload[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkReadModelLinksStaticOriginDownload( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModelLinksStaticOriginDownload.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkReadModelLinksStaticOriginDownload.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkReadModelLinksStaticOriginDownload-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkReadModelLinksStaticOriginDownload.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/file_link_read_model_links_static_origin_open.dart b/lib/model/file_link_read_model_links_static_origin_open.dart new file mode 100644 index 0000000..a50c691 --- /dev/null +++ b/lib/model/file_link_read_model_links_static_origin_open.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkReadModelLinksStaticOriginOpen { + /// Returns a new [FileLinkReadModelLinksStaticOriginOpen] instance. + FileLinkReadModelLinksStaticOriginOpen({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkReadModelLinksStaticOriginOpen && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'FileLinkReadModelLinksStaticOriginOpen[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [FileLinkReadModelLinksStaticOriginOpen] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkReadModelLinksStaticOriginOpen? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkReadModelLinksStaticOriginOpen[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkReadModelLinksStaticOriginOpen[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkReadModelLinksStaticOriginOpen( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModelLinksStaticOriginOpen.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkReadModelLinksStaticOriginOpen.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkReadModelLinksStaticOriginOpen-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkReadModelLinksStaticOriginOpen.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/file_link_read_model_links_static_origin_open_location.dart b/lib/model/file_link_read_model_links_static_origin_open_location.dart new file mode 100644 index 0000000..be6c5d6 --- /dev/null +++ b/lib/model/file_link_read_model_links_static_origin_open_location.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkReadModelLinksStaticOriginOpenLocation { + /// Returns a new [FileLinkReadModelLinksStaticOriginOpenLocation] instance. + FileLinkReadModelLinksStaticOriginOpenLocation({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkReadModelLinksStaticOriginOpenLocation && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'FileLinkReadModelLinksStaticOriginOpenLocation[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [FileLinkReadModelLinksStaticOriginOpenLocation] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkReadModelLinksStaticOriginOpenLocation? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkReadModelLinksStaticOriginOpenLocation[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkReadModelLinksStaticOriginOpenLocation[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkReadModelLinksStaticOriginOpenLocation( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModelLinksStaticOriginOpenLocation.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkReadModelLinksStaticOriginOpenLocation.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkReadModelLinksStaticOriginOpenLocation-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkReadModelLinksStaticOriginOpenLocation.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/file_link_read_model_links_storage.dart b/lib/model/file_link_read_model_links_storage.dart new file mode 100644 index 0000000..3d7b2ad --- /dev/null +++ b/lib/model/file_link_read_model_links_storage.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkReadModelLinksStorage { + /// Returns a new [FileLinkReadModelLinksStorage] instance. + FileLinkReadModelLinksStorage({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkReadModelLinksStorage && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'FileLinkReadModelLinksStorage[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [FileLinkReadModelLinksStorage] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkReadModelLinksStorage? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkReadModelLinksStorage[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkReadModelLinksStorage[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkReadModelLinksStorage( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkReadModelLinksStorage.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkReadModelLinksStorage.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkReadModelLinksStorage-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkReadModelLinksStorage.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/file_link_write_model.dart b/lib/model/file_link_write_model.dart new file mode 100644 index 0000000..d9d41fd --- /dev/null +++ b/lib/model/file_link_write_model.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileLinkWriteModel { + /// Returns a new [FileLinkWriteModel] instance. + FileLinkWriteModel({ + required this.originData, + }); + + FileLinkOriginDataModel originData; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileLinkWriteModel && + other.originData == originData; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (originData.hashCode); + + @override + String toString() => 'FileLinkWriteModel[originData=$originData]'; + + Map toJson() { + final json = {}; + json[r'originData'] = this.originData; + return json; + } + + /// Returns a new [FileLinkWriteModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileLinkWriteModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileLinkWriteModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileLinkWriteModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileLinkWriteModel( + originData: FileLinkOriginDataModel.fromJson(json[r'originData'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileLinkWriteModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileLinkWriteModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileLinkWriteModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileLinkWriteModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'originData', + }; +} + diff --git a/lib/model/formattable.dart b/lib/model/formattable.dart new file mode 100644 index 0000000..35077cc --- /dev/null +++ b/lib/model/formattable.dart @@ -0,0 +1,223 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Formattable { + /// Returns a new [Formattable] instance. + Formattable({ + required this.format, + this.raw, + this.html, + }); + + /// Indicates the formatting language of the raw text + FormattableFormatEnum format; + + /// The raw text, as entered by the user + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? raw; + + /// The text converted to HTML according to the format + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? html; + + @override + bool operator ==(Object other) => identical(this, other) || other is Formattable && + other.format == format && + other.raw == raw && + other.html == html; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (format.hashCode) + + (raw == null ? 0 : raw!.hashCode) + + (html == null ? 0 : html!.hashCode); + + @override + String toString() => 'Formattable[format=$format, raw=$raw, html=$html]'; + + Map toJson() { + final json = {}; + json[r'format'] = this.format; + if (this.raw != null) { + json[r'raw'] = this.raw; + } else { + json[r'raw'] = null; + } + if (this.html != null) { + json[r'html'] = this.html; + } else { + json[r'html'] = null; + } + return json; + } + + /// Returns a new [Formattable] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Formattable? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Formattable[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Formattable[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Formattable( + format: FormattableFormatEnum.fromJson(json[r'format'])!, + raw: mapValueOfType(json, r'raw'), + html: mapValueOfType(json, r'html'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Formattable.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Formattable.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Formattable-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Formattable.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'format', + }; +} + +/// Indicates the formatting language of the raw text +class FormattableFormatEnum { + /// Instantiate a new enum with the provided [value]. + const FormattableFormatEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const plain = FormattableFormatEnum._(r'plain'); + static const markdown = FormattableFormatEnum._(r'markdown'); + static const custom = FormattableFormatEnum._(r'custom'); + + /// List of all possible values in this [enum][FormattableFormatEnum]. + static const values = [ + plain, + markdown, + custom, + ]; + + static FormattableFormatEnum? fromJson(dynamic value) => FormattableFormatEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FormattableFormatEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [FormattableFormatEnum] to String, +/// and [decode] dynamic data back to [FormattableFormatEnum]. +class FormattableFormatEnumTypeTransformer { + factory FormattableFormatEnumTypeTransformer() => _instance ??= const FormattableFormatEnumTypeTransformer._(); + + const FormattableFormatEnumTypeTransformer._(); + + String encode(FormattableFormatEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a FormattableFormatEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + FormattableFormatEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'plain': return FormattableFormatEnum.plain; + case r'markdown': return FormattableFormatEnum.markdown; + case r'custom': return FormattableFormatEnum.custom; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [FormattableFormatEnumTypeTransformer] instance. + static FormattableFormatEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/grid_collection_model.dart b/lib/model/grid_collection_model.dart new file mode 100644 index 0000000..1360d97 --- /dev/null +++ b/lib/model/grid_collection_model.dart @@ -0,0 +1,240 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GridCollectionModel { + /// Returns a new [GridCollectionModel] instance. + GridCollectionModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.pageSize, + required this.offset, + required this.embedded, + }); + + GridCollectionModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + PaginatedCollectionModelAllOfLinks links; + + /// Amount of elements that a response will hold. + /// + /// Minimum value: 0 + int pageSize; + + /// The page number that is requested from paginated collection. + /// + /// Minimum value: 1 + int offset; + + GridCollectionModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is GridCollectionModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.pageSize == pageSize && + other.offset == offset && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (pageSize.hashCode) + + (offset.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'GridCollectionModel[type=$type, total=$total, count=$count, links=$links, pageSize=$pageSize, offset=$offset, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'pageSize'] = this.pageSize; + json[r'offset'] = this.offset; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [GridCollectionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GridCollectionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GridCollectionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GridCollectionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GridCollectionModel( + type: GridCollectionModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: PaginatedCollectionModelAllOfLinks.fromJson(json[r'_links'])!, + pageSize: mapValueOfType(json, r'pageSize')!, + offset: mapValueOfType(json, r'offset')!, + embedded: GridCollectionModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridCollectionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GridCollectionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GridCollectionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GridCollectionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + 'pageSize', + 'offset', + '_embedded', + }; +} + + +class GridCollectionModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const GridCollectionModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = GridCollectionModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][GridCollectionModelTypeEnum]. + static const values = [ + collection, + ]; + + static GridCollectionModelTypeEnum? fromJson(dynamic value) => GridCollectionModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridCollectionModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [GridCollectionModelTypeEnum] to String, +/// and [decode] dynamic data back to [GridCollectionModelTypeEnum]. +class GridCollectionModelTypeEnumTypeTransformer { + factory GridCollectionModelTypeEnumTypeTransformer() => _instance ??= const GridCollectionModelTypeEnumTypeTransformer._(); + + const GridCollectionModelTypeEnumTypeTransformer._(); + + String encode(GridCollectionModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a GridCollectionModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + GridCollectionModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return GridCollectionModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [GridCollectionModelTypeEnumTypeTransformer] instance. + static GridCollectionModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/grid_collection_model_all_of_embedded.dart b/lib/model/grid_collection_model_all_of_embedded.dart new file mode 100644 index 0000000..e61af79 --- /dev/null +++ b/lib/model/grid_collection_model_all_of_embedded.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GridCollectionModelAllOfEmbedded { + /// Returns a new [GridCollectionModelAllOfEmbedded] instance. + GridCollectionModelAllOfEmbedded({ + this.elements = const [], + }); + + List elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is GridCollectionModelAllOfEmbedded && + _deepEquality.equals(other.elements, elements); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements.hashCode); + + @override + String toString() => 'GridCollectionModelAllOfEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + json[r'elements'] = this.elements; + return json; + } + + /// Returns a new [GridCollectionModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GridCollectionModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GridCollectionModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GridCollectionModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GridCollectionModelAllOfEmbedded( + elements: GridReadModel.listFromJson(json[r'elements']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridCollectionModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GridCollectionModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GridCollectionModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GridCollectionModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'elements', + }; +} + diff --git a/lib/model/grid_read_model.dart b/lib/model/grid_read_model.dart new file mode 100644 index 0000000..36c625a --- /dev/null +++ b/lib/model/grid_read_model.dart @@ -0,0 +1,265 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GridReadModel { + /// Returns a new [GridReadModel] instance. + GridReadModel({ + required this.type, + required this.id, + required this.rowCount, + required this.columnCount, + this.widgets = const [], + this.createdAt, + this.updatedAt, + required this.links, + }); + + GridReadModelTypeEnum type; + + /// Grid's id + /// + /// Minimum value: 1 + int id; + + /// The number of rows the grid has + /// + /// Minimum value: 1 + int rowCount; + + /// The number of columns the grid has + /// + /// Minimum value: 1 + int columnCount; + + List widgets; + + /// The time the grid was created. + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? createdAt; + + /// The time the grid was last updated. + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? updatedAt; + + GridReadModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is GridReadModel && + other.type == type && + other.id == id && + other.rowCount == rowCount && + other.columnCount == columnCount && + _deepEquality.equals(other.widgets, widgets) && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (id.hashCode) + + (rowCount.hashCode) + + (columnCount.hashCode) + + (widgets.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (links.hashCode); + + @override + String toString() => 'GridReadModel[type=$type, id=$id, rowCount=$rowCount, columnCount=$columnCount, widgets=$widgets, createdAt=$createdAt, updatedAt=$updatedAt, links=$links]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'id'] = this.id; + json[r'rowCount'] = this.rowCount; + json[r'columnCount'] = this.columnCount; + json[r'widgets'] = this.widgets; + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String(); + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt!.toUtc().toIso8601String(); + } else { + json[r'updatedAt'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [GridReadModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GridReadModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GridReadModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GridReadModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GridReadModel( + type: GridReadModelTypeEnum.fromJson(json[r'_type'])!, + id: mapValueOfType(json, r'id')!, + rowCount: mapValueOfType(json, r'rowCount')!, + columnCount: mapValueOfType(json, r'columnCount')!, + widgets: GridWidgetModel.listFromJson(json[r'widgets']), + createdAt: mapDateTime(json, r'createdAt', r''), + updatedAt: mapDateTime(json, r'updatedAt', r''), + links: GridReadModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridReadModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GridReadModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GridReadModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GridReadModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'id', + 'rowCount', + 'columnCount', + 'widgets', + '_links', + }; +} + + +class GridReadModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const GridReadModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const grid = GridReadModelTypeEnum._(r'Grid'); + + /// List of all possible values in this [enum][GridReadModelTypeEnum]. + static const values = [ + grid, + ]; + + static GridReadModelTypeEnum? fromJson(dynamic value) => GridReadModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridReadModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [GridReadModelTypeEnum] to String, +/// and [decode] dynamic data back to [GridReadModelTypeEnum]. +class GridReadModelTypeEnumTypeTransformer { + factory GridReadModelTypeEnumTypeTransformer() => _instance ??= const GridReadModelTypeEnumTypeTransformer._(); + + const GridReadModelTypeEnumTypeTransformer._(); + + String encode(GridReadModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a GridReadModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + GridReadModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Grid': return GridReadModelTypeEnum.grid; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [GridReadModelTypeEnumTypeTransformer] instance. + static GridReadModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/grid_read_model_links.dart b/lib/model/grid_read_model_links.dart new file mode 100644 index 0000000..01f3e4a --- /dev/null +++ b/lib/model/grid_read_model_links.dart @@ -0,0 +1,202 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GridReadModelLinks { + /// Returns a new [GridReadModelLinks] instance. + GridReadModelLinks({ + required this.self, + this.attachments, + this.addAttachment, + required this.scope, + this.updateImmediately, + this.update, + this.delete, + }); + + GridReadModelLinksSelf self; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + GridReadModelLinksAttachments? attachments; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + GridReadModelLinksAddAttachment? addAttachment; + + GridReadModelLinksScope scope; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + GridReadModelLinksUpdateImmediately? updateImmediately; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + GridReadModelLinksUpdate? update; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + GridReadModelLinksDelete? delete; + + @override + bool operator ==(Object other) => identical(this, other) || other is GridReadModelLinks && + other.self == self && + other.attachments == attachments && + other.addAttachment == addAttachment && + other.scope == scope && + other.updateImmediately == updateImmediately && + other.update == update && + other.delete == delete; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (attachments == null ? 0 : attachments!.hashCode) + + (addAttachment == null ? 0 : addAttachment!.hashCode) + + (scope.hashCode) + + (updateImmediately == null ? 0 : updateImmediately!.hashCode) + + (update == null ? 0 : update!.hashCode) + + (delete == null ? 0 : delete!.hashCode); + + @override + String toString() => 'GridReadModelLinks[self=$self, attachments=$attachments, addAttachment=$addAttachment, scope=$scope, updateImmediately=$updateImmediately, update=$update, delete=$delete]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + if (this.attachments != null) { + json[r'attachments'] = this.attachments; + } else { + json[r'attachments'] = null; + } + if (this.addAttachment != null) { + json[r'addAttachment'] = this.addAttachment; + } else { + json[r'addAttachment'] = null; + } + json[r'scope'] = this.scope; + if (this.updateImmediately != null) { + json[r'updateImmediately'] = this.updateImmediately; + } else { + json[r'updateImmediately'] = null; + } + if (this.update != null) { + json[r'update'] = this.update; + } else { + json[r'update'] = null; + } + if (this.delete != null) { + json[r'delete'] = this.delete; + } else { + json[r'delete'] = null; + } + return json; + } + + /// Returns a new [GridReadModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GridReadModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GridReadModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GridReadModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GridReadModelLinks( + self: GridReadModelLinksSelf.fromJson(json[r'self'])!, + attachments: GridReadModelLinksAttachments.fromJson(json[r'attachments']), + addAttachment: GridReadModelLinksAddAttachment.fromJson(json[r'addAttachment']), + scope: GridReadModelLinksScope.fromJson(json[r'scope'])!, + updateImmediately: GridReadModelLinksUpdateImmediately.fromJson(json[r'updateImmediately']), + update: GridReadModelLinksUpdate.fromJson(json[r'update']), + delete: GridReadModelLinksDelete.fromJson(json[r'delete']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridReadModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GridReadModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GridReadModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GridReadModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'scope', + }; +} + diff --git a/lib/model/grid_read_model_links_add_attachment.dart b/lib/model/grid_read_model_links_add_attachment.dart new file mode 100644 index 0000000..8c8226c --- /dev/null +++ b/lib/model/grid_read_model_links_add_attachment.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GridReadModelLinksAddAttachment { + /// Returns a new [GridReadModelLinksAddAttachment] instance. + GridReadModelLinksAddAttachment({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is GridReadModelLinksAddAttachment && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'GridReadModelLinksAddAttachment[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [GridReadModelLinksAddAttachment] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GridReadModelLinksAddAttachment? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GridReadModelLinksAddAttachment[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GridReadModelLinksAddAttachment[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GridReadModelLinksAddAttachment( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridReadModelLinksAddAttachment.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GridReadModelLinksAddAttachment.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GridReadModelLinksAddAttachment-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GridReadModelLinksAddAttachment.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/grid_read_model_links_attachments.dart b/lib/model/grid_read_model_links_attachments.dart new file mode 100644 index 0000000..6071200 --- /dev/null +++ b/lib/model/grid_read_model_links_attachments.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GridReadModelLinksAttachments { + /// Returns a new [GridReadModelLinksAttachments] instance. + GridReadModelLinksAttachments({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is GridReadModelLinksAttachments && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'GridReadModelLinksAttachments[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [GridReadModelLinksAttachments] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GridReadModelLinksAttachments? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GridReadModelLinksAttachments[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GridReadModelLinksAttachments[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GridReadModelLinksAttachments( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridReadModelLinksAttachments.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GridReadModelLinksAttachments.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GridReadModelLinksAttachments-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GridReadModelLinksAttachments.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/grid_read_model_links_delete.dart b/lib/model/grid_read_model_links_delete.dart new file mode 100644 index 0000000..ff51531 --- /dev/null +++ b/lib/model/grid_read_model_links_delete.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GridReadModelLinksDelete { + /// Returns a new [GridReadModelLinksDelete] instance. + GridReadModelLinksDelete({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is GridReadModelLinksDelete && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'GridReadModelLinksDelete[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [GridReadModelLinksDelete] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GridReadModelLinksDelete? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GridReadModelLinksDelete[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GridReadModelLinksDelete[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GridReadModelLinksDelete( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridReadModelLinksDelete.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GridReadModelLinksDelete.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GridReadModelLinksDelete-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GridReadModelLinksDelete.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/grid_read_model_links_scope.dart b/lib/model/grid_read_model_links_scope.dart new file mode 100644 index 0000000..fa40bc7 --- /dev/null +++ b/lib/model/grid_read_model_links_scope.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GridReadModelLinksScope { + /// Returns a new [GridReadModelLinksScope] instance. + GridReadModelLinksScope({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is GridReadModelLinksScope && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'GridReadModelLinksScope[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [GridReadModelLinksScope] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GridReadModelLinksScope? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GridReadModelLinksScope[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GridReadModelLinksScope[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GridReadModelLinksScope( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridReadModelLinksScope.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GridReadModelLinksScope.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GridReadModelLinksScope-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GridReadModelLinksScope.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/grid_read_model_links_self.dart b/lib/model/grid_read_model_links_self.dart new file mode 100644 index 0000000..ed3b0ae --- /dev/null +++ b/lib/model/grid_read_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GridReadModelLinksSelf { + /// Returns a new [GridReadModelLinksSelf] instance. + GridReadModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is GridReadModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'GridReadModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [GridReadModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GridReadModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GridReadModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GridReadModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GridReadModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridReadModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GridReadModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GridReadModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GridReadModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/grid_read_model_links_update.dart b/lib/model/grid_read_model_links_update.dart new file mode 100644 index 0000000..5f12bef --- /dev/null +++ b/lib/model/grid_read_model_links_update.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GridReadModelLinksUpdate { + /// Returns a new [GridReadModelLinksUpdate] instance. + GridReadModelLinksUpdate({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is GridReadModelLinksUpdate && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'GridReadModelLinksUpdate[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [GridReadModelLinksUpdate] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GridReadModelLinksUpdate? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GridReadModelLinksUpdate[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GridReadModelLinksUpdate[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GridReadModelLinksUpdate( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridReadModelLinksUpdate.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GridReadModelLinksUpdate.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GridReadModelLinksUpdate-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GridReadModelLinksUpdate.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/grid_read_model_links_update_immediately.dart b/lib/model/grid_read_model_links_update_immediately.dart new file mode 100644 index 0000000..4be01e3 --- /dev/null +++ b/lib/model/grid_read_model_links_update_immediately.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GridReadModelLinksUpdateImmediately { + /// Returns a new [GridReadModelLinksUpdateImmediately] instance. + GridReadModelLinksUpdateImmediately({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is GridReadModelLinksUpdateImmediately && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'GridReadModelLinksUpdateImmediately[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [GridReadModelLinksUpdateImmediately] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GridReadModelLinksUpdateImmediately? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GridReadModelLinksUpdateImmediately[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GridReadModelLinksUpdateImmediately[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GridReadModelLinksUpdateImmediately( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridReadModelLinksUpdateImmediately.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GridReadModelLinksUpdateImmediately.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GridReadModelLinksUpdateImmediately-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GridReadModelLinksUpdateImmediately.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/grid_widget_model.dart b/lib/model/grid_widget_model.dart new file mode 100644 index 0000000..016fef9 --- /dev/null +++ b/lib/model/grid_widget_model.dart @@ -0,0 +1,265 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GridWidgetModel { + /// Returns a new [GridWidgetModel] instance. + GridWidgetModel({ + required this.type, + required this.id, + required this.identifier, + required this.startRow, + required this.endRow, + required this.startColumn, + required this.endColumn, + this.options, + }); + + GridWidgetModelTypeEnum type; + + /// The grid widget's unique identifier. Can be null, if a new widget is created within a grid. + /// + /// Minimum value: 1 + int? id; + + /// An alternative, human legible, and unique identifier. + String identifier; + + /// The index of the starting row of the widget. The row is inclusive. + /// + /// Minimum value: 1 + int startRow; + + /// The index of the ending row of the widget. The row is exclusive. + /// + /// Minimum value: 1 + int endRow; + + /// The index of the starting column of the widget. The column is inclusive. + /// + /// Minimum value: 1 + int startColumn; + + /// The index of the ending column of the widget. The column is exclusive. + /// + /// Minimum value: 1 + int endColumn; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? options; + + @override + bool operator ==(Object other) => identical(this, other) || other is GridWidgetModel && + other.type == type && + other.id == id && + other.identifier == identifier && + other.startRow == startRow && + other.endRow == endRow && + other.startColumn == startColumn && + other.endColumn == endColumn && + other.options == options; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (id == null ? 0 : id!.hashCode) + + (identifier.hashCode) + + (startRow.hashCode) + + (endRow.hashCode) + + (startColumn.hashCode) + + (endColumn.hashCode) + + (options == null ? 0 : options!.hashCode); + + @override + String toString() => 'GridWidgetModel[type=$type, id=$id, identifier=$identifier, startRow=$startRow, endRow=$endRow, startColumn=$startColumn, endColumn=$endColumn, options=$options]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + json[r'identifier'] = this.identifier; + json[r'startRow'] = this.startRow; + json[r'endRow'] = this.endRow; + json[r'startColumn'] = this.startColumn; + json[r'endColumn'] = this.endColumn; + if (this.options != null) { + json[r'options'] = this.options; + } else { + json[r'options'] = null; + } + return json; + } + + /// Returns a new [GridWidgetModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GridWidgetModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GridWidgetModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GridWidgetModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GridWidgetModel( + type: GridWidgetModelTypeEnum.fromJson(json[r'_type'])!, + id: mapValueOfType(json, r'id'), + identifier: mapValueOfType(json, r'identifier')!, + startRow: mapValueOfType(json, r'startRow')!, + endRow: mapValueOfType(json, r'endRow')!, + startColumn: mapValueOfType(json, r'startColumn')!, + endColumn: mapValueOfType(json, r'endColumn')!, + options: mapValueOfType(json, r'options'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridWidgetModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GridWidgetModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GridWidgetModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GridWidgetModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'id', + 'identifier', + 'startRow', + 'endRow', + 'startColumn', + 'endColumn', + }; +} + + +class GridWidgetModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const GridWidgetModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const gridWidget = GridWidgetModelTypeEnum._(r'GridWidget'); + + /// List of all possible values in this [enum][GridWidgetModelTypeEnum]. + static const values = [ + gridWidget, + ]; + + static GridWidgetModelTypeEnum? fromJson(dynamic value) => GridWidgetModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridWidgetModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [GridWidgetModelTypeEnum] to String, +/// and [decode] dynamic data back to [GridWidgetModelTypeEnum]. +class GridWidgetModelTypeEnumTypeTransformer { + factory GridWidgetModelTypeEnumTypeTransformer() => _instance ??= const GridWidgetModelTypeEnumTypeTransformer._(); + + const GridWidgetModelTypeEnumTypeTransformer._(); + + String encode(GridWidgetModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a GridWidgetModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + GridWidgetModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'GridWidget': return GridWidgetModelTypeEnum.gridWidget; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [GridWidgetModelTypeEnumTypeTransformer] instance. + static GridWidgetModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/grid_write_model.dart b/lib/model/grid_write_model.dart new file mode 100644 index 0000000..1e3eb23 --- /dev/null +++ b/lib/model/grid_write_model.dart @@ -0,0 +1,165 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GridWriteModel { + /// Returns a new [GridWriteModel] instance. + GridWriteModel({ + this.rowCount, + this.columnCount, + this.widgets = const [], + this.links, + }); + + /// The number of rows the grid has + /// + /// Minimum value: 1 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? rowCount; + + /// The number of columns the grid has + /// + /// Minimum value: 1 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? columnCount; + + List widgets; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + GridWriteModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is GridWriteModel && + other.rowCount == rowCount && + other.columnCount == columnCount && + _deepEquality.equals(other.widgets, widgets) && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (rowCount == null ? 0 : rowCount!.hashCode) + + (columnCount == null ? 0 : columnCount!.hashCode) + + (widgets.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'GridWriteModel[rowCount=$rowCount, columnCount=$columnCount, widgets=$widgets, links=$links]'; + + Map toJson() { + final json = {}; + if (this.rowCount != null) { + json[r'rowCount'] = this.rowCount; + } else { + json[r'rowCount'] = null; + } + if (this.columnCount != null) { + json[r'columnCount'] = this.columnCount; + } else { + json[r'columnCount'] = null; + } + json[r'widgets'] = this.widgets; + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [GridWriteModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GridWriteModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GridWriteModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GridWriteModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GridWriteModel( + rowCount: mapValueOfType(json, r'rowCount'), + columnCount: mapValueOfType(json, r'columnCount'), + widgets: GridWidgetModel.listFromJson(json[r'widgets']), + links: GridWriteModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridWriteModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GridWriteModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GridWriteModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GridWriteModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/grid_write_model_links.dart b/lib/model/grid_write_model_links.dart new file mode 100644 index 0000000..7b9d1e5 --- /dev/null +++ b/lib/model/grid_write_model_links.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GridWriteModelLinks { + /// Returns a new [GridWriteModelLinks] instance. + GridWriteModelLinks({ + this.scope, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + GridReadModelLinksScope? scope; + + @override + bool operator ==(Object other) => identical(this, other) || other is GridWriteModelLinks && + other.scope == scope; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (scope == null ? 0 : scope!.hashCode); + + @override + String toString() => 'GridWriteModelLinks[scope=$scope]'; + + Map toJson() { + final json = {}; + if (this.scope != null) { + json[r'scope'] = this.scope; + } else { + json[r'scope'] = null; + } + return json; + } + + /// Returns a new [GridWriteModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GridWriteModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GridWriteModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GridWriteModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GridWriteModelLinks( + scope: GridReadModelLinksScope.fromJson(json[r'scope']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GridWriteModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GridWriteModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GridWriteModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GridWriteModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/group_collection_model.dart b/lib/model/group_collection_model.dart new file mode 100644 index 0000000..73963f5 --- /dev/null +++ b/lib/model/group_collection_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GroupCollectionModel { + /// Returns a new [GroupCollectionModel] instance. + GroupCollectionModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.embedded, + }); + + GroupCollectionModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + GroupCollectionModelAllOfLinks links; + + GroupCollectionModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is GroupCollectionModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'GroupCollectionModel[type=$type, total=$total, count=$count, links=$links, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [GroupCollectionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GroupCollectionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GroupCollectionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GroupCollectionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GroupCollectionModel( + type: GroupCollectionModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: GroupCollectionModelAllOfLinks.fromJson(json[r'_links'])!, + embedded: GroupCollectionModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupCollectionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GroupCollectionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GroupCollectionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GroupCollectionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + '_embedded', + }; +} + + +class GroupCollectionModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const GroupCollectionModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = GroupCollectionModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][GroupCollectionModelTypeEnum]. + static const values = [ + collection, + ]; + + static GroupCollectionModelTypeEnum? fromJson(dynamic value) => GroupCollectionModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupCollectionModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [GroupCollectionModelTypeEnum] to String, +/// and [decode] dynamic data back to [GroupCollectionModelTypeEnum]. +class GroupCollectionModelTypeEnumTypeTransformer { + factory GroupCollectionModelTypeEnumTypeTransformer() => _instance ??= const GroupCollectionModelTypeEnumTypeTransformer._(); + + const GroupCollectionModelTypeEnumTypeTransformer._(); + + String encode(GroupCollectionModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a GroupCollectionModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + GroupCollectionModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return GroupCollectionModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [GroupCollectionModelTypeEnumTypeTransformer] instance. + static GroupCollectionModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/group_collection_model_all_of_embedded.dart b/lib/model/group_collection_model_all_of_embedded.dart new file mode 100644 index 0000000..3a71702 --- /dev/null +++ b/lib/model/group_collection_model_all_of_embedded.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GroupCollectionModelAllOfEmbedded { + /// Returns a new [GroupCollectionModelAllOfEmbedded] instance. + GroupCollectionModelAllOfEmbedded({ + this.elements = const [], + }); + + List elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is GroupCollectionModelAllOfEmbedded && + _deepEquality.equals(other.elements, elements); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements.hashCode); + + @override + String toString() => 'GroupCollectionModelAllOfEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + json[r'elements'] = this.elements; + return json; + } + + /// Returns a new [GroupCollectionModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GroupCollectionModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GroupCollectionModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GroupCollectionModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GroupCollectionModelAllOfEmbedded( + elements: GroupModel.listFromJson(json[r'elements']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupCollectionModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GroupCollectionModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GroupCollectionModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GroupCollectionModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'elements', + }; +} + diff --git a/lib/model/group_collection_model_all_of_links.dart b/lib/model/group_collection_model_all_of_links.dart new file mode 100644 index 0000000..729162a --- /dev/null +++ b/lib/model/group_collection_model_all_of_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GroupCollectionModelAllOfLinks { + /// Returns a new [GroupCollectionModelAllOfLinks] instance. + GroupCollectionModelAllOfLinks({ + required this.self, + }); + + GroupCollectionModelAllOfLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is GroupCollectionModelAllOfLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'GroupCollectionModelAllOfLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [GroupCollectionModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GroupCollectionModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GroupCollectionModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GroupCollectionModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GroupCollectionModelAllOfLinks( + self: GroupCollectionModelAllOfLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupCollectionModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GroupCollectionModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GroupCollectionModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GroupCollectionModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/group_collection_model_all_of_links_self.dart b/lib/model/group_collection_model_all_of_links_self.dart new file mode 100644 index 0000000..195a2f4 --- /dev/null +++ b/lib/model/group_collection_model_all_of_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GroupCollectionModelAllOfLinksSelf { + /// Returns a new [GroupCollectionModelAllOfLinksSelf] instance. + GroupCollectionModelAllOfLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is GroupCollectionModelAllOfLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'GroupCollectionModelAllOfLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [GroupCollectionModelAllOfLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GroupCollectionModelAllOfLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GroupCollectionModelAllOfLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GroupCollectionModelAllOfLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GroupCollectionModelAllOfLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupCollectionModelAllOfLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GroupCollectionModelAllOfLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GroupCollectionModelAllOfLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GroupCollectionModelAllOfLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/group_model.dart b/lib/model/group_model.dart new file mode 100644 index 0000000..18c11ee --- /dev/null +++ b/lib/model/group_model.dart @@ -0,0 +1,174 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GroupModel { + /// Returns a new [GroupModel] instance. + GroupModel({ + required this.id, + this.name, + this.createdAt, + this.updatedAt, + required this.links, + }); + + /// The group id + /// + /// Minimum value: 1 + int id; + + /// Group's full name, formatting depends on instance settings # Conditions - admin + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? name; + + /// Time of creation # Conditions - admin + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? createdAt; + + /// Time of the most recent change to the user + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? updatedAt; + + GroupModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is GroupModel && + other.id == id && + other.name == name && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (name == null ? 0 : name!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (links.hashCode); + + @override + String toString() => 'GroupModel[id=$id, name=$name, createdAt=$createdAt, updatedAt=$updatedAt, links=$links]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String(); + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt!.toUtc().toIso8601String(); + } else { + json[r'updatedAt'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [GroupModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GroupModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GroupModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GroupModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GroupModel( + id: mapValueOfType(json, r'id')!, + name: mapValueOfType(json, r'name'), + createdAt: mapDateTime(json, r'createdAt', r''), + updatedAt: mapDateTime(json, r'updatedAt', r''), + links: GroupModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GroupModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GroupModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GroupModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + '_links', + }; +} + diff --git a/lib/model/group_model_links.dart b/lib/model/group_model_links.dart new file mode 100644 index 0000000..a1a1da3 --- /dev/null +++ b/lib/model/group_model_links.dart @@ -0,0 +1,167 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GroupModelLinks { + /// Returns a new [GroupModelLinks] instance. + GroupModelLinks({ + required this.self, + this.delete, + this.updateImmediately, + this.memberships, + this.members = const [], + }); + + GroupModelLinksSelf self; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + GroupModelLinksDelete? delete; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + GroupModelLinksUpdateImmediately? updateImmediately; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + GroupModelLinksMemberships? memberships; + + List members; + + @override + bool operator ==(Object other) => identical(this, other) || other is GroupModelLinks && + other.self == self && + other.delete == delete && + other.updateImmediately == updateImmediately && + other.memberships == memberships && + _deepEquality.equals(other.members, members); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (delete == null ? 0 : delete!.hashCode) + + (updateImmediately == null ? 0 : updateImmediately!.hashCode) + + (memberships == null ? 0 : memberships!.hashCode) + + (members.hashCode); + + @override + String toString() => 'GroupModelLinks[self=$self, delete=$delete, updateImmediately=$updateImmediately, memberships=$memberships, members=$members]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + if (this.delete != null) { + json[r'delete'] = this.delete; + } else { + json[r'delete'] = null; + } + if (this.updateImmediately != null) { + json[r'updateImmediately'] = this.updateImmediately; + } else { + json[r'updateImmediately'] = null; + } + if (this.memberships != null) { + json[r'memberships'] = this.memberships; + } else { + json[r'memberships'] = null; + } + json[r'members'] = this.members; + return json; + } + + /// Returns a new [GroupModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GroupModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GroupModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GroupModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GroupModelLinks( + self: GroupModelLinksSelf.fromJson(json[r'self'])!, + delete: GroupModelLinksDelete.fromJson(json[r'delete']), + updateImmediately: GroupModelLinksUpdateImmediately.fromJson(json[r'updateImmediately']), + memberships: GroupModelLinksMemberships.fromJson(json[r'memberships']), + members: GroupModelLinksMembersInner.listFromJson(json[r'members']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GroupModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GroupModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GroupModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/group_model_links_delete.dart b/lib/model/group_model_links_delete.dart new file mode 100644 index 0000000..fe36995 --- /dev/null +++ b/lib/model/group_model_links_delete.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GroupModelLinksDelete { + /// Returns a new [GroupModelLinksDelete] instance. + GroupModelLinksDelete({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is GroupModelLinksDelete && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'GroupModelLinksDelete[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [GroupModelLinksDelete] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GroupModelLinksDelete? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GroupModelLinksDelete[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GroupModelLinksDelete[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GroupModelLinksDelete( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupModelLinksDelete.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GroupModelLinksDelete.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GroupModelLinksDelete-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GroupModelLinksDelete.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/group_model_links_members_inner.dart b/lib/model/group_model_links_members_inner.dart new file mode 100644 index 0000000..8323146 --- /dev/null +++ b/lib/model/group_model_links_members_inner.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GroupModelLinksMembersInner { + /// Returns a new [GroupModelLinksMembersInner] instance. + GroupModelLinksMembersInner({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is GroupModelLinksMembersInner && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'GroupModelLinksMembersInner[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [GroupModelLinksMembersInner] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GroupModelLinksMembersInner? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GroupModelLinksMembersInner[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GroupModelLinksMembersInner[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GroupModelLinksMembersInner( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupModelLinksMembersInner.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GroupModelLinksMembersInner.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GroupModelLinksMembersInner-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GroupModelLinksMembersInner.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/group_model_links_memberships.dart b/lib/model/group_model_links_memberships.dart new file mode 100644 index 0000000..b478989 --- /dev/null +++ b/lib/model/group_model_links_memberships.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GroupModelLinksMemberships { + /// Returns a new [GroupModelLinksMemberships] instance. + GroupModelLinksMemberships({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is GroupModelLinksMemberships && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'GroupModelLinksMemberships[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [GroupModelLinksMemberships] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GroupModelLinksMemberships? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GroupModelLinksMemberships[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GroupModelLinksMemberships[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GroupModelLinksMemberships( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupModelLinksMemberships.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GroupModelLinksMemberships.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GroupModelLinksMemberships-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GroupModelLinksMemberships.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/group_model_links_self.dart b/lib/model/group_model_links_self.dart new file mode 100644 index 0000000..b72415d --- /dev/null +++ b/lib/model/group_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GroupModelLinksSelf { + /// Returns a new [GroupModelLinksSelf] instance. + GroupModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is GroupModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'GroupModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [GroupModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GroupModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GroupModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GroupModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GroupModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GroupModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GroupModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GroupModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/group_model_links_update_immediately.dart b/lib/model/group_model_links_update_immediately.dart new file mode 100644 index 0000000..323e139 --- /dev/null +++ b/lib/model/group_model_links_update_immediately.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GroupModelLinksUpdateImmediately { + /// Returns a new [GroupModelLinksUpdateImmediately] instance. + GroupModelLinksUpdateImmediately({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is GroupModelLinksUpdateImmediately && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'GroupModelLinksUpdateImmediately[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [GroupModelLinksUpdateImmediately] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GroupModelLinksUpdateImmediately? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GroupModelLinksUpdateImmediately[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GroupModelLinksUpdateImmediately[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GroupModelLinksUpdateImmediately( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupModelLinksUpdateImmediately.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GroupModelLinksUpdateImmediately.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GroupModelLinksUpdateImmediately-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GroupModelLinksUpdateImmediately.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/group_write_model.dart b/lib/model/group_write_model.dart new file mode 100644 index 0000000..c72bd42 --- /dev/null +++ b/lib/model/group_write_model.dart @@ -0,0 +1,136 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GroupWriteModel { + /// Returns a new [GroupWriteModel] instance. + GroupWriteModel({ + this.name, + this.links, + }); + + /// The new group name. + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? name; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + GroupWriteModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is GroupWriteModel && + other.name == name && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (name == null ? 0 : name!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'GroupWriteModel[name=$name, links=$links]'; + + Map toJson() { + final json = {}; + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [GroupWriteModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GroupWriteModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GroupWriteModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GroupWriteModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GroupWriteModel( + name: mapValueOfType(json, r'name'), + links: GroupWriteModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupWriteModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GroupWriteModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GroupWriteModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GroupWriteModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/group_write_model_links.dart b/lib/model/group_write_model_links.dart new file mode 100644 index 0000000..f909da7 --- /dev/null +++ b/lib/model/group_write_model_links.dart @@ -0,0 +1,108 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GroupWriteModelLinks { + /// Returns a new [GroupWriteModelLinks] instance. + GroupWriteModelLinks({ + this.members = const [], + }); + + List members; + + @override + bool operator ==(Object other) => identical(this, other) || other is GroupWriteModelLinks && + _deepEquality.equals(other.members, members); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (members.hashCode); + + @override + String toString() => 'GroupWriteModelLinks[members=$members]'; + + Map toJson() { + final json = {}; + json[r'members'] = this.members; + return json; + } + + /// Returns a new [GroupWriteModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GroupWriteModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GroupWriteModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GroupWriteModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GroupWriteModelLinks( + members: GroupWriteModelLinksMembersInner.listFromJson(json[r'members']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupWriteModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GroupWriteModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GroupWriteModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GroupWriteModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/group_write_model_links_members_inner.dart b/lib/model/group_write_model_links_members_inner.dart new file mode 100644 index 0000000..cccf248 --- /dev/null +++ b/lib/model/group_write_model_links_members_inner.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class GroupWriteModelLinksMembersInner { + /// Returns a new [GroupWriteModelLinksMembersInner] instance. + GroupWriteModelLinksMembersInner({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is GroupWriteModelLinksMembersInner && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'GroupWriteModelLinksMembersInner[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [GroupWriteModelLinksMembersInner] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GroupWriteModelLinksMembersInner? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GroupWriteModelLinksMembersInner[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GroupWriteModelLinksMembersInner[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GroupWriteModelLinksMembersInner( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GroupWriteModelLinksMembersInner.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GroupWriteModelLinksMembersInner.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GroupWriteModelLinksMembersInner-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GroupWriteModelLinksMembersInner.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/help_text_collection_model.dart b/lib/model/help_text_collection_model.dart new file mode 100644 index 0000000..3989e78 --- /dev/null +++ b/lib/model/help_text_collection_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class HelpTextCollectionModel { + /// Returns a new [HelpTextCollectionModel] instance. + HelpTextCollectionModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.embedded, + }); + + HelpTextCollectionModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + HelpTextCollectionModelAllOfLinks links; + + HelpTextCollectionModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is HelpTextCollectionModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'HelpTextCollectionModel[type=$type, total=$total, count=$count, links=$links, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [HelpTextCollectionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static HelpTextCollectionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "HelpTextCollectionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "HelpTextCollectionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return HelpTextCollectionModel( + type: HelpTextCollectionModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: HelpTextCollectionModelAllOfLinks.fromJson(json[r'_links'])!, + embedded: HelpTextCollectionModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HelpTextCollectionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HelpTextCollectionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of HelpTextCollectionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = HelpTextCollectionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + '_embedded', + }; +} + + +class HelpTextCollectionModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const HelpTextCollectionModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = HelpTextCollectionModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][HelpTextCollectionModelTypeEnum]. + static const values = [ + collection, + ]; + + static HelpTextCollectionModelTypeEnum? fromJson(dynamic value) => HelpTextCollectionModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HelpTextCollectionModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [HelpTextCollectionModelTypeEnum] to String, +/// and [decode] dynamic data back to [HelpTextCollectionModelTypeEnum]. +class HelpTextCollectionModelTypeEnumTypeTransformer { + factory HelpTextCollectionModelTypeEnumTypeTransformer() => _instance ??= const HelpTextCollectionModelTypeEnumTypeTransformer._(); + + const HelpTextCollectionModelTypeEnumTypeTransformer._(); + + String encode(HelpTextCollectionModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a HelpTextCollectionModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + HelpTextCollectionModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return HelpTextCollectionModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [HelpTextCollectionModelTypeEnumTypeTransformer] instance. + static HelpTextCollectionModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/help_text_collection_model_all_of_embedded.dart b/lib/model/help_text_collection_model_all_of_embedded.dart new file mode 100644 index 0000000..ae50803 --- /dev/null +++ b/lib/model/help_text_collection_model_all_of_embedded.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class HelpTextCollectionModelAllOfEmbedded { + /// Returns a new [HelpTextCollectionModelAllOfEmbedded] instance. + HelpTextCollectionModelAllOfEmbedded({ + this.elements = const [], + }); + + List elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is HelpTextCollectionModelAllOfEmbedded && + _deepEquality.equals(other.elements, elements); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements.hashCode); + + @override + String toString() => 'HelpTextCollectionModelAllOfEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + json[r'elements'] = this.elements; + return json; + } + + /// Returns a new [HelpTextCollectionModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static HelpTextCollectionModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "HelpTextCollectionModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "HelpTextCollectionModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return HelpTextCollectionModelAllOfEmbedded( + elements: HelpTextModel.listFromJson(json[r'elements']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HelpTextCollectionModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HelpTextCollectionModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of HelpTextCollectionModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = HelpTextCollectionModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'elements', + }; +} + diff --git a/lib/model/help_text_collection_model_all_of_links.dart b/lib/model/help_text_collection_model_all_of_links.dart new file mode 100644 index 0000000..e614355 --- /dev/null +++ b/lib/model/help_text_collection_model_all_of_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class HelpTextCollectionModelAllOfLinks { + /// Returns a new [HelpTextCollectionModelAllOfLinks] instance. + HelpTextCollectionModelAllOfLinks({ + required this.self, + }); + + HelpTextCollectionModelAllOfLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is HelpTextCollectionModelAllOfLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'HelpTextCollectionModelAllOfLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [HelpTextCollectionModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static HelpTextCollectionModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "HelpTextCollectionModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "HelpTextCollectionModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return HelpTextCollectionModelAllOfLinks( + self: HelpTextCollectionModelAllOfLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HelpTextCollectionModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HelpTextCollectionModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of HelpTextCollectionModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = HelpTextCollectionModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/help_text_collection_model_all_of_links_self.dart b/lib/model/help_text_collection_model_all_of_links_self.dart new file mode 100644 index 0000000..6613ec8 --- /dev/null +++ b/lib/model/help_text_collection_model_all_of_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class HelpTextCollectionModelAllOfLinksSelf { + /// Returns a new [HelpTextCollectionModelAllOfLinksSelf] instance. + HelpTextCollectionModelAllOfLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is HelpTextCollectionModelAllOfLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'HelpTextCollectionModelAllOfLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [HelpTextCollectionModelAllOfLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static HelpTextCollectionModelAllOfLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "HelpTextCollectionModelAllOfLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "HelpTextCollectionModelAllOfLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return HelpTextCollectionModelAllOfLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HelpTextCollectionModelAllOfLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HelpTextCollectionModelAllOfLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of HelpTextCollectionModelAllOfLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = HelpTextCollectionModelAllOfLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/help_text_model.dart b/lib/model/help_text_model.dart new file mode 100644 index 0000000..4cd8051 --- /dev/null +++ b/lib/model/help_text_model.dart @@ -0,0 +1,296 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class HelpTextModel { + /// Returns a new [HelpTextModel] instance. + HelpTextModel({ + required this.type, + required this.id, + required this.attribute, + required this.scope, + required this.helpText, + required this.links, + }); + + HelpTextModelTypeEnum type; + + /// Minimum value: 1 + int id; + + /// The attribute the help text is assigned to. + String attribute; + + HelpTextModelScopeEnum scope; + + Formattable helpText; + + HelpTextModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is HelpTextModel && + other.type == type && + other.id == id && + other.attribute == attribute && + other.scope == scope && + other.helpText == helpText && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (id.hashCode) + + (attribute.hashCode) + + (scope.hashCode) + + (helpText.hashCode) + + (links.hashCode); + + @override + String toString() => 'HelpTextModel[type=$type, id=$id, attribute=$attribute, scope=$scope, helpText=$helpText, links=$links]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'id'] = this.id; + json[r'attribute'] = this.attribute; + json[r'scope'] = this.scope; + json[r'helpText'] = this.helpText; + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [HelpTextModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static HelpTextModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "HelpTextModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "HelpTextModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return HelpTextModel( + type: HelpTextModelTypeEnum.fromJson(json[r'_type'])!, + id: mapValueOfType(json, r'id')!, + attribute: mapValueOfType(json, r'attribute')!, + scope: HelpTextModelScopeEnum.fromJson(json[r'scope'])!, + helpText: Formattable.fromJson(json[r'helpText'])!, + links: HelpTextModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HelpTextModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HelpTextModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of HelpTextModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = HelpTextModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'id', + 'attribute', + 'scope', + 'helpText', + '_links', + }; +} + + +class HelpTextModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const HelpTextModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const helpText = HelpTextModelTypeEnum._(r'HelpText'); + + /// List of all possible values in this [enum][HelpTextModelTypeEnum]. + static const values = [ + helpText, + ]; + + static HelpTextModelTypeEnum? fromJson(dynamic value) => HelpTextModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HelpTextModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [HelpTextModelTypeEnum] to String, +/// and [decode] dynamic data back to [HelpTextModelTypeEnum]. +class HelpTextModelTypeEnumTypeTransformer { + factory HelpTextModelTypeEnumTypeTransformer() => _instance ??= const HelpTextModelTypeEnumTypeTransformer._(); + + const HelpTextModelTypeEnumTypeTransformer._(); + + String encode(HelpTextModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a HelpTextModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + HelpTextModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'HelpText': return HelpTextModelTypeEnum.helpText; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [HelpTextModelTypeEnumTypeTransformer] instance. + static HelpTextModelTypeEnumTypeTransformer? _instance; +} + + + +class HelpTextModelScopeEnum { + /// Instantiate a new enum with the provided [value]. + const HelpTextModelScopeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const workPackage = HelpTextModelScopeEnum._(r'WorkPackage'); + static const project = HelpTextModelScopeEnum._(r'Project'); + + /// List of all possible values in this [enum][HelpTextModelScopeEnum]. + static const values = [ + workPackage, + project, + ]; + + static HelpTextModelScopeEnum? fromJson(dynamic value) => HelpTextModelScopeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HelpTextModelScopeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [HelpTextModelScopeEnum] to String, +/// and [decode] dynamic data back to [HelpTextModelScopeEnum]. +class HelpTextModelScopeEnumTypeTransformer { + factory HelpTextModelScopeEnumTypeTransformer() => _instance ??= const HelpTextModelScopeEnumTypeTransformer._(); + + const HelpTextModelScopeEnumTypeTransformer._(); + + String encode(HelpTextModelScopeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a HelpTextModelScopeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + HelpTextModelScopeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'WorkPackage': return HelpTextModelScopeEnum.workPackage; + case r'Project': return HelpTextModelScopeEnum.project; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [HelpTextModelScopeEnumTypeTransformer] instance. + static HelpTextModelScopeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/help_text_model_links.dart b/lib/model/help_text_model_links.dart new file mode 100644 index 0000000..ee50dbf --- /dev/null +++ b/lib/model/help_text_model_links.dart @@ -0,0 +1,133 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class HelpTextModelLinks { + /// Returns a new [HelpTextModelLinks] instance. + HelpTextModelLinks({ + required this.self, + required this.editText, + required this.attachments, + required this.addAttachment, + }); + + HelpTextModelLinksSelf self; + + HelpTextModelLinksEditText editText; + + HelpTextModelLinksAttachments attachments; + + HelpTextModelLinksAddAttachment addAttachment; + + @override + bool operator ==(Object other) => identical(this, other) || other is HelpTextModelLinks && + other.self == self && + other.editText == editText && + other.attachments == attachments && + other.addAttachment == addAttachment; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (editText.hashCode) + + (attachments.hashCode) + + (addAttachment.hashCode); + + @override + String toString() => 'HelpTextModelLinks[self=$self, editText=$editText, attachments=$attachments, addAttachment=$addAttachment]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'editText'] = this.editText; + json[r'attachments'] = this.attachments; + json[r'addAttachment'] = this.addAttachment; + return json; + } + + /// Returns a new [HelpTextModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static HelpTextModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "HelpTextModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "HelpTextModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return HelpTextModelLinks( + self: HelpTextModelLinksSelf.fromJson(json[r'self'])!, + editText: HelpTextModelLinksEditText.fromJson(json[r'editText'])!, + attachments: HelpTextModelLinksAttachments.fromJson(json[r'attachments'])!, + addAttachment: HelpTextModelLinksAddAttachment.fromJson(json[r'addAttachment'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HelpTextModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HelpTextModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of HelpTextModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = HelpTextModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'editText', + 'attachments', + 'addAttachment', + }; +} + diff --git a/lib/model/help_text_model_links_add_attachment.dart b/lib/model/help_text_model_links_add_attachment.dart new file mode 100644 index 0000000..f33a83f --- /dev/null +++ b/lib/model/help_text_model_links_add_attachment.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class HelpTextModelLinksAddAttachment { + /// Returns a new [HelpTextModelLinksAddAttachment] instance. + HelpTextModelLinksAddAttachment({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is HelpTextModelLinksAddAttachment && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'HelpTextModelLinksAddAttachment[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [HelpTextModelLinksAddAttachment] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static HelpTextModelLinksAddAttachment? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "HelpTextModelLinksAddAttachment[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "HelpTextModelLinksAddAttachment[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return HelpTextModelLinksAddAttachment( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HelpTextModelLinksAddAttachment.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HelpTextModelLinksAddAttachment.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of HelpTextModelLinksAddAttachment-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = HelpTextModelLinksAddAttachment.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/help_text_model_links_attachments.dart b/lib/model/help_text_model_links_attachments.dart new file mode 100644 index 0000000..da762e1 --- /dev/null +++ b/lib/model/help_text_model_links_attachments.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class HelpTextModelLinksAttachments { + /// Returns a new [HelpTextModelLinksAttachments] instance. + HelpTextModelLinksAttachments({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is HelpTextModelLinksAttachments && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'HelpTextModelLinksAttachments[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [HelpTextModelLinksAttachments] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static HelpTextModelLinksAttachments? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "HelpTextModelLinksAttachments[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "HelpTextModelLinksAttachments[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return HelpTextModelLinksAttachments( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HelpTextModelLinksAttachments.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HelpTextModelLinksAttachments.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of HelpTextModelLinksAttachments-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = HelpTextModelLinksAttachments.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/help_text_model_links_edit_text.dart b/lib/model/help_text_model_links_edit_text.dart new file mode 100644 index 0000000..b5fadb1 --- /dev/null +++ b/lib/model/help_text_model_links_edit_text.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class HelpTextModelLinksEditText { + /// Returns a new [HelpTextModelLinksEditText] instance. + HelpTextModelLinksEditText({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is HelpTextModelLinksEditText && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'HelpTextModelLinksEditText[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [HelpTextModelLinksEditText] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static HelpTextModelLinksEditText? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "HelpTextModelLinksEditText[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "HelpTextModelLinksEditText[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return HelpTextModelLinksEditText( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HelpTextModelLinksEditText.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HelpTextModelLinksEditText.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of HelpTextModelLinksEditText-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = HelpTextModelLinksEditText.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/help_text_model_links_self.dart b/lib/model/help_text_model_links_self.dart new file mode 100644 index 0000000..3e29e03 --- /dev/null +++ b/lib/model/help_text_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class HelpTextModelLinksSelf { + /// Returns a new [HelpTextModelLinksSelf] instance. + HelpTextModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is HelpTextModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'HelpTextModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [HelpTextModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static HelpTextModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "HelpTextModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "HelpTextModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return HelpTextModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HelpTextModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HelpTextModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of HelpTextModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = HelpTextModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/link.dart b/lib/model/link.dart new file mode 100644 index 0000000..4cd6fae --- /dev/null +++ b/lib/model/link.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Link { + /// Returns a new [Link] instance. + Link({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is Link && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'Link[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [Link] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Link? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Link[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Link[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Link( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Link.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Link.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Link-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Link.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/news_model.dart b/lib/model/news_model.dart new file mode 100644 index 0000000..80ecd34 --- /dev/null +++ b/lib/model/news_model.dart @@ -0,0 +1,208 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NewsModel { + /// Returns a new [NewsModel] instance. + NewsModel({ + this.id, + this.title, + this.summary, + this.description, + this.createdAt, + this.links, + }); + + /// News' id + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// The headline of the news + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// A short summary + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? summary; + + /// The main body of the news with all the details + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? description; + + /// The time the news was created at + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? createdAt; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + NewsModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is NewsModel && + other.id == id && + other.title == title && + other.summary == summary && + other.description == description && + other.createdAt == createdAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (summary == null ? 0 : summary!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'NewsModel[id=$id, title=$title, summary=$summary, description=$description, createdAt=$createdAt, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.summary != null) { + json[r'summary'] = this.summary; + } else { + json[r'summary'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String(); + } else { + json[r'createdAt'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [NewsModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NewsModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NewsModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NewsModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NewsModel( + id: mapValueOfType(json, r'id'), + title: mapValueOfType(json, r'title'), + summary: mapValueOfType(json, r'summary'), + description: mapValueOfType(json, r'description'), + createdAt: mapDateTime(json, r'createdAt', r''), + links: NewsModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NewsModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NewsModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NewsModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NewsModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/news_model_links.dart b/lib/model/news_model_links.dart new file mode 100644 index 0000000..c7f0fe9 --- /dev/null +++ b/lib/model/news_model_links.dart @@ -0,0 +1,125 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NewsModelLinks { + /// Returns a new [NewsModelLinks] instance. + NewsModelLinks({ + required this.self, + required this.project, + required this.author, + }); + + NewsModelLinksSelf self; + + NewsModelLinksProject project; + + NewsModelLinksAuthor author; + + @override + bool operator ==(Object other) => identical(this, other) || other is NewsModelLinks && + other.self == self && + other.project == project && + other.author == author; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (project.hashCode) + + (author.hashCode); + + @override + String toString() => 'NewsModelLinks[self=$self, project=$project, author=$author]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'project'] = this.project; + json[r'author'] = this.author; + return json; + } + + /// Returns a new [NewsModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NewsModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NewsModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NewsModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NewsModelLinks( + self: NewsModelLinksSelf.fromJson(json[r'self'])!, + project: NewsModelLinksProject.fromJson(json[r'project'])!, + author: NewsModelLinksAuthor.fromJson(json[r'author'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NewsModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NewsModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NewsModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NewsModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'project', + 'author', + }; +} + diff --git a/lib/model/news_model_links_author.dart b/lib/model/news_model_links_author.dart new file mode 100644 index 0000000..f7fdcba --- /dev/null +++ b/lib/model/news_model_links_author.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NewsModelLinksAuthor { + /// Returns a new [NewsModelLinksAuthor] instance. + NewsModelLinksAuthor({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NewsModelLinksAuthor && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NewsModelLinksAuthor[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NewsModelLinksAuthor] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NewsModelLinksAuthor? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NewsModelLinksAuthor[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NewsModelLinksAuthor[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NewsModelLinksAuthor( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NewsModelLinksAuthor.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NewsModelLinksAuthor.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NewsModelLinksAuthor-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NewsModelLinksAuthor.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/news_model_links_project.dart b/lib/model/news_model_links_project.dart new file mode 100644 index 0000000..5594303 --- /dev/null +++ b/lib/model/news_model_links_project.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NewsModelLinksProject { + /// Returns a new [NewsModelLinksProject] instance. + NewsModelLinksProject({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NewsModelLinksProject && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NewsModelLinksProject[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NewsModelLinksProject] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NewsModelLinksProject? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NewsModelLinksProject[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NewsModelLinksProject[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NewsModelLinksProject( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NewsModelLinksProject.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NewsModelLinksProject.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NewsModelLinksProject-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NewsModelLinksProject.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/news_model_links_self.dart b/lib/model/news_model_links_self.dart new file mode 100644 index 0000000..06a2f9b --- /dev/null +++ b/lib/model/news_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NewsModelLinksSelf { + /// Returns a new [NewsModelLinksSelf] instance. + NewsModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NewsModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NewsModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NewsModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NewsModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NewsModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NewsModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NewsModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NewsModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NewsModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NewsModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NewsModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/non_working_day_collection_model.dart b/lib/model/non_working_day_collection_model.dart new file mode 100644 index 0000000..0f2a52a --- /dev/null +++ b/lib/model/non_working_day_collection_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NonWorkingDayCollectionModel { + /// Returns a new [NonWorkingDayCollectionModel] instance. + NonWorkingDayCollectionModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.embedded, + }); + + NonWorkingDayCollectionModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + NonWorkingDayCollectionModelAllOfLinks links; + + NonWorkingDayCollectionModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is NonWorkingDayCollectionModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'NonWorkingDayCollectionModel[type=$type, total=$total, count=$count, links=$links, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [NonWorkingDayCollectionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NonWorkingDayCollectionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NonWorkingDayCollectionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NonWorkingDayCollectionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NonWorkingDayCollectionModel( + type: NonWorkingDayCollectionModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: NonWorkingDayCollectionModelAllOfLinks.fromJson(json[r'_links'])!, + embedded: NonWorkingDayCollectionModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NonWorkingDayCollectionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NonWorkingDayCollectionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NonWorkingDayCollectionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NonWorkingDayCollectionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + '_embedded', + }; +} + + +class NonWorkingDayCollectionModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const NonWorkingDayCollectionModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = NonWorkingDayCollectionModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][NonWorkingDayCollectionModelTypeEnum]. + static const values = [ + collection, + ]; + + static NonWorkingDayCollectionModelTypeEnum? fromJson(dynamic value) => NonWorkingDayCollectionModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NonWorkingDayCollectionModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [NonWorkingDayCollectionModelTypeEnum] to String, +/// and [decode] dynamic data back to [NonWorkingDayCollectionModelTypeEnum]. +class NonWorkingDayCollectionModelTypeEnumTypeTransformer { + factory NonWorkingDayCollectionModelTypeEnumTypeTransformer() => _instance ??= const NonWorkingDayCollectionModelTypeEnumTypeTransformer._(); + + const NonWorkingDayCollectionModelTypeEnumTypeTransformer._(); + + String encode(NonWorkingDayCollectionModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a NonWorkingDayCollectionModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + NonWorkingDayCollectionModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return NonWorkingDayCollectionModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [NonWorkingDayCollectionModelTypeEnumTypeTransformer] instance. + static NonWorkingDayCollectionModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/non_working_day_collection_model_all_of_embedded.dart b/lib/model/non_working_day_collection_model_all_of_embedded.dart new file mode 100644 index 0000000..601a43b --- /dev/null +++ b/lib/model/non_working_day_collection_model_all_of_embedded.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NonWorkingDayCollectionModelAllOfEmbedded { + /// Returns a new [NonWorkingDayCollectionModelAllOfEmbedded] instance. + NonWorkingDayCollectionModelAllOfEmbedded({ + this.elements = const [], + }); + + List elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is NonWorkingDayCollectionModelAllOfEmbedded && + _deepEquality.equals(other.elements, elements); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements.hashCode); + + @override + String toString() => 'NonWorkingDayCollectionModelAllOfEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + json[r'elements'] = this.elements; + return json; + } + + /// Returns a new [NonWorkingDayCollectionModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NonWorkingDayCollectionModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NonWorkingDayCollectionModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NonWorkingDayCollectionModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NonWorkingDayCollectionModelAllOfEmbedded( + elements: NonWorkingDayModel.listFromJson(json[r'elements']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NonWorkingDayCollectionModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NonWorkingDayCollectionModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NonWorkingDayCollectionModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NonWorkingDayCollectionModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'elements', + }; +} + diff --git a/lib/model/non_working_day_collection_model_all_of_links.dart b/lib/model/non_working_day_collection_model_all_of_links.dart new file mode 100644 index 0000000..7664b88 --- /dev/null +++ b/lib/model/non_working_day_collection_model_all_of_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NonWorkingDayCollectionModelAllOfLinks { + /// Returns a new [NonWorkingDayCollectionModelAllOfLinks] instance. + NonWorkingDayCollectionModelAllOfLinks({ + required this.self, + }); + + NonWorkingDayCollectionModelAllOfLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is NonWorkingDayCollectionModelAllOfLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'NonWorkingDayCollectionModelAllOfLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [NonWorkingDayCollectionModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NonWorkingDayCollectionModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NonWorkingDayCollectionModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NonWorkingDayCollectionModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NonWorkingDayCollectionModelAllOfLinks( + self: NonWorkingDayCollectionModelAllOfLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NonWorkingDayCollectionModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NonWorkingDayCollectionModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NonWorkingDayCollectionModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NonWorkingDayCollectionModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/non_working_day_collection_model_all_of_links_self.dart b/lib/model/non_working_day_collection_model_all_of_links_self.dart new file mode 100644 index 0000000..920eafc --- /dev/null +++ b/lib/model/non_working_day_collection_model_all_of_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NonWorkingDayCollectionModelAllOfLinksSelf { + /// Returns a new [NonWorkingDayCollectionModelAllOfLinksSelf] instance. + NonWorkingDayCollectionModelAllOfLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NonWorkingDayCollectionModelAllOfLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NonWorkingDayCollectionModelAllOfLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NonWorkingDayCollectionModelAllOfLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NonWorkingDayCollectionModelAllOfLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NonWorkingDayCollectionModelAllOfLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NonWorkingDayCollectionModelAllOfLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NonWorkingDayCollectionModelAllOfLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NonWorkingDayCollectionModelAllOfLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NonWorkingDayCollectionModelAllOfLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NonWorkingDayCollectionModelAllOfLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NonWorkingDayCollectionModelAllOfLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/non_working_day_model.dart b/lib/model/non_working_day_model.dart new file mode 100644 index 0000000..c990a50 --- /dev/null +++ b/lib/model/non_working_day_model.dart @@ -0,0 +1,215 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NonWorkingDayModel { + /// Returns a new [NonWorkingDayModel] instance. + NonWorkingDayModel({ + required this.type, + required this.date, + required this.name, + this.links, + }); + + NonWorkingDayModelTypeEnum type; + + /// Date of the non-working day. + DateTime date; + + /// Descriptive name for the non-working day. + String name; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + NonWorkingDayModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is NonWorkingDayModel && + other.type == type && + other.date == date && + other.name == name && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (date.hashCode) + + (name.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'NonWorkingDayModel[type=$type, date=$date, name=$name, links=$links]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'date'] = _dateFormatter.format(this.date.toUtc()); + json[r'name'] = this.name; + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [NonWorkingDayModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NonWorkingDayModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NonWorkingDayModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NonWorkingDayModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NonWorkingDayModel( + type: NonWorkingDayModelTypeEnum.fromJson(json[r'_type'])!, + date: mapDateTime(json, r'date', r'')!, + name: mapValueOfType(json, r'name')!, + links: NonWorkingDayModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NonWorkingDayModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NonWorkingDayModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NonWorkingDayModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NonWorkingDayModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'date', + 'name', + }; +} + + +class NonWorkingDayModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const NonWorkingDayModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const nonWorkingDay = NonWorkingDayModelTypeEnum._(r'NonWorkingDay'); + + /// List of all possible values in this [enum][NonWorkingDayModelTypeEnum]. + static const values = [ + nonWorkingDay, + ]; + + static NonWorkingDayModelTypeEnum? fromJson(dynamic value) => NonWorkingDayModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NonWorkingDayModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [NonWorkingDayModelTypeEnum] to String, +/// and [decode] dynamic data back to [NonWorkingDayModelTypeEnum]. +class NonWorkingDayModelTypeEnumTypeTransformer { + factory NonWorkingDayModelTypeEnumTypeTransformer() => _instance ??= const NonWorkingDayModelTypeEnumTypeTransformer._(); + + const NonWorkingDayModelTypeEnumTypeTransformer._(); + + String encode(NonWorkingDayModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a NonWorkingDayModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + NonWorkingDayModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'NonWorkingDay': return NonWorkingDayModelTypeEnum.nonWorkingDay; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [NonWorkingDayModelTypeEnumTypeTransformer] instance. + static NonWorkingDayModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/non_working_day_model_links.dart b/lib/model/non_working_day_model_links.dart new file mode 100644 index 0000000..0edae85 --- /dev/null +++ b/lib/model/non_working_day_model_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NonWorkingDayModelLinks { + /// Returns a new [NonWorkingDayModelLinks] instance. + NonWorkingDayModelLinks({ + required this.self, + }); + + NonWorkingDayModelLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is NonWorkingDayModelLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'NonWorkingDayModelLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [NonWorkingDayModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NonWorkingDayModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NonWorkingDayModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NonWorkingDayModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NonWorkingDayModelLinks( + self: NonWorkingDayModelLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NonWorkingDayModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NonWorkingDayModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NonWorkingDayModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NonWorkingDayModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/non_working_day_model_links_self.dart b/lib/model/non_working_day_model_links_self.dart new file mode 100644 index 0000000..dc74594 --- /dev/null +++ b/lib/model/non_working_day_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NonWorkingDayModelLinksSelf { + /// Returns a new [NonWorkingDayModelLinksSelf] instance. + NonWorkingDayModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NonWorkingDayModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NonWorkingDayModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NonWorkingDayModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NonWorkingDayModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NonWorkingDayModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NonWorkingDayModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NonWorkingDayModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NonWorkingDayModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NonWorkingDayModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NonWorkingDayModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NonWorkingDayModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/notification_collection_model.dart b/lib/model/notification_collection_model.dart new file mode 100644 index 0000000..f86161f --- /dev/null +++ b/lib/model/notification_collection_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationCollectionModel { + /// Returns a new [NotificationCollectionModel] instance. + NotificationCollectionModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.embedded, + }); + + NotificationCollectionModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + NotificationCollectionModelAllOfLinks links; + + NotificationCollectionModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationCollectionModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'NotificationCollectionModel[type=$type, total=$total, count=$count, links=$links, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [NotificationCollectionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationCollectionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationCollectionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationCollectionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationCollectionModel( + type: NotificationCollectionModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: NotificationCollectionModelAllOfLinks.fromJson(json[r'_links'])!, + embedded: NotificationCollectionModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationCollectionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationCollectionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationCollectionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationCollectionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + '_embedded', + }; +} + + +class NotificationCollectionModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const NotificationCollectionModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = NotificationCollectionModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][NotificationCollectionModelTypeEnum]. + static const values = [ + collection, + ]; + + static NotificationCollectionModelTypeEnum? fromJson(dynamic value) => NotificationCollectionModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationCollectionModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [NotificationCollectionModelTypeEnum] to String, +/// and [decode] dynamic data back to [NotificationCollectionModelTypeEnum]. +class NotificationCollectionModelTypeEnumTypeTransformer { + factory NotificationCollectionModelTypeEnumTypeTransformer() => _instance ??= const NotificationCollectionModelTypeEnumTypeTransformer._(); + + const NotificationCollectionModelTypeEnumTypeTransformer._(); + + String encode(NotificationCollectionModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a NotificationCollectionModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + NotificationCollectionModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return NotificationCollectionModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [NotificationCollectionModelTypeEnumTypeTransformer] instance. + static NotificationCollectionModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/notification_collection_model_all_of_embedded.dart b/lib/model/notification_collection_model_all_of_embedded.dart new file mode 100644 index 0000000..ae6cc56 --- /dev/null +++ b/lib/model/notification_collection_model_all_of_embedded.dart @@ -0,0 +1,117 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationCollectionModelAllOfEmbedded { + /// Returns a new [NotificationCollectionModelAllOfEmbedded] instance. + NotificationCollectionModelAllOfEmbedded({ + this.elements = const [], + this.detailsSchemas = const [], + }); + + List elements; + + List detailsSchemas; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationCollectionModelAllOfEmbedded && + _deepEquality.equals(other.elements, elements) && + _deepEquality.equals(other.detailsSchemas, detailsSchemas); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements.hashCode) + + (detailsSchemas.hashCode); + + @override + String toString() => 'NotificationCollectionModelAllOfEmbedded[elements=$elements, detailsSchemas=$detailsSchemas]'; + + Map toJson() { + final json = {}; + json[r'elements'] = this.elements; + json[r'detailsSchemas'] = this.detailsSchemas; + return json; + } + + /// Returns a new [NotificationCollectionModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationCollectionModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationCollectionModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationCollectionModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationCollectionModelAllOfEmbedded( + elements: NotificationModel.listFromJson(json[r'elements']), + detailsSchemas: SchemaModel.listFromJson(json[r'detailsSchemas']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationCollectionModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationCollectionModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationCollectionModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationCollectionModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'elements', + 'detailsSchemas', + }; +} + diff --git a/lib/model/notification_collection_model_all_of_links.dart b/lib/model/notification_collection_model_all_of_links.dart new file mode 100644 index 0000000..51b74bd --- /dev/null +++ b/lib/model/notification_collection_model_all_of_links.dart @@ -0,0 +1,143 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationCollectionModelAllOfLinks { + /// Returns a new [NotificationCollectionModelAllOfLinks] instance. + NotificationCollectionModelAllOfLinks({ + required this.self, + this.jumpTo, + this.changeSize, + }); + + NotificationCollectionModelAllOfLinksSelf self; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + NotificationCollectionModelAllOfLinksJumpTo? jumpTo; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + NotificationCollectionModelAllOfLinksChangeSize? changeSize; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationCollectionModelAllOfLinks && + other.self == self && + other.jumpTo == jumpTo && + other.changeSize == changeSize; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (jumpTo == null ? 0 : jumpTo!.hashCode) + + (changeSize == null ? 0 : changeSize!.hashCode); + + @override + String toString() => 'NotificationCollectionModelAllOfLinks[self=$self, jumpTo=$jumpTo, changeSize=$changeSize]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + if (this.jumpTo != null) { + json[r'jumpTo'] = this.jumpTo; + } else { + json[r'jumpTo'] = null; + } + if (this.changeSize != null) { + json[r'changeSize'] = this.changeSize; + } else { + json[r'changeSize'] = null; + } + return json; + } + + /// Returns a new [NotificationCollectionModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationCollectionModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationCollectionModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationCollectionModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationCollectionModelAllOfLinks( + self: NotificationCollectionModelAllOfLinksSelf.fromJson(json[r'self'])!, + jumpTo: NotificationCollectionModelAllOfLinksJumpTo.fromJson(json[r'jumpTo']), + changeSize: NotificationCollectionModelAllOfLinksChangeSize.fromJson(json[r'changeSize']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationCollectionModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationCollectionModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationCollectionModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationCollectionModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/notification_collection_model_all_of_links_change_size.dart b/lib/model/notification_collection_model_all_of_links_change_size.dart new file mode 100644 index 0000000..33adaed --- /dev/null +++ b/lib/model/notification_collection_model_all_of_links_change_size.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationCollectionModelAllOfLinksChangeSize { + /// Returns a new [NotificationCollectionModelAllOfLinksChangeSize] instance. + NotificationCollectionModelAllOfLinksChangeSize({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationCollectionModelAllOfLinksChangeSize && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NotificationCollectionModelAllOfLinksChangeSize[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NotificationCollectionModelAllOfLinksChangeSize] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationCollectionModelAllOfLinksChangeSize? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationCollectionModelAllOfLinksChangeSize[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationCollectionModelAllOfLinksChangeSize[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationCollectionModelAllOfLinksChangeSize( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationCollectionModelAllOfLinksChangeSize.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationCollectionModelAllOfLinksChangeSize.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationCollectionModelAllOfLinksChangeSize-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationCollectionModelAllOfLinksChangeSize.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/notification_collection_model_all_of_links_jump_to.dart b/lib/model/notification_collection_model_all_of_links_jump_to.dart new file mode 100644 index 0000000..19e6e7e --- /dev/null +++ b/lib/model/notification_collection_model_all_of_links_jump_to.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationCollectionModelAllOfLinksJumpTo { + /// Returns a new [NotificationCollectionModelAllOfLinksJumpTo] instance. + NotificationCollectionModelAllOfLinksJumpTo({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationCollectionModelAllOfLinksJumpTo && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NotificationCollectionModelAllOfLinksJumpTo[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NotificationCollectionModelAllOfLinksJumpTo] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationCollectionModelAllOfLinksJumpTo? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationCollectionModelAllOfLinksJumpTo[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationCollectionModelAllOfLinksJumpTo[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationCollectionModelAllOfLinksJumpTo( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationCollectionModelAllOfLinksJumpTo.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationCollectionModelAllOfLinksJumpTo.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationCollectionModelAllOfLinksJumpTo-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationCollectionModelAllOfLinksJumpTo.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/notification_collection_model_all_of_links_self.dart b/lib/model/notification_collection_model_all_of_links_self.dart new file mode 100644 index 0000000..c77516d --- /dev/null +++ b/lib/model/notification_collection_model_all_of_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationCollectionModelAllOfLinksSelf { + /// Returns a new [NotificationCollectionModelAllOfLinksSelf] instance. + NotificationCollectionModelAllOfLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationCollectionModelAllOfLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NotificationCollectionModelAllOfLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NotificationCollectionModelAllOfLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationCollectionModelAllOfLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationCollectionModelAllOfLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationCollectionModelAllOfLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationCollectionModelAllOfLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationCollectionModelAllOfLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationCollectionModelAllOfLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationCollectionModelAllOfLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationCollectionModelAllOfLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/notification_model.dart b/lib/model/notification_model.dart new file mode 100644 index 0000000..f9e78f7 --- /dev/null +++ b/lib/model/notification_model.dart @@ -0,0 +1,411 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationModel { + /// Returns a new [NotificationModel] instance. + NotificationModel({ + this.type, + this.id, + this.reason, + this.readIAN, + this.details = const [], + this.createdAt, + this.updatedAt, + this.embedded, + this.links, + }); + + NotificationModelTypeEnum? type; + + /// Notification id + /// + /// Minimum value: 1 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// The reason for the notification + NotificationModelReasonEnum? reason; + + /// Whether the notification is marked as read + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? readIAN; + + List details; + + /// The time the notification was created at + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? createdAt; + + /// The time the notification was last updated + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? updatedAt; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + NotificationModelEmbedded? embedded; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + NotificationModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationModel && + other.type == type && + other.id == id && + other.reason == reason && + other.readIAN == readIAN && + _deepEquality.equals(other.details, details) && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.embedded == embedded && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (id == null ? 0 : id!.hashCode) + + (reason == null ? 0 : reason!.hashCode) + + (readIAN == null ? 0 : readIAN!.hashCode) + + (details.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (embedded == null ? 0 : embedded!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'NotificationModel[type=$type, id=$id, reason=$reason, readIAN=$readIAN, details=$details, createdAt=$createdAt, updatedAt=$updatedAt, embedded=$embedded, links=$links]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.reason != null) { + json[r'reason'] = this.reason; + } else { + json[r'reason'] = null; + } + if (this.readIAN != null) { + json[r'readIAN'] = this.readIAN; + } else { + json[r'readIAN'] = null; + } + json[r'details'] = this.details; + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String(); + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt!.toUtc().toIso8601String(); + } else { + json[r'updatedAt'] = null; + } + if (this.embedded != null) { + json[r'_embedded'] = this.embedded; + } else { + json[r'_embedded'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [NotificationModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationModel( + type: NotificationModelTypeEnum.fromJson(json[r'_type']), + id: mapValueOfType(json, r'id'), + reason: NotificationModelReasonEnum.fromJson(json[r'reason']), + readIAN: mapValueOfType(json, r'readIAN'), + details: NotificationModelDetailsInner.listFromJson(json[r'details']), + createdAt: mapDateTime(json, r'createdAt', r''), + updatedAt: mapDateTime(json, r'updatedAt', r''), + embedded: NotificationModelEmbedded.fromJson(json[r'_embedded']), + links: NotificationModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + + +class NotificationModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const NotificationModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const notification = NotificationModelTypeEnum._(r'Notification'); + + /// List of all possible values in this [enum][NotificationModelTypeEnum]. + static const values = [ + notification, + ]; + + static NotificationModelTypeEnum? fromJson(dynamic value) => NotificationModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [NotificationModelTypeEnum] to String, +/// and [decode] dynamic data back to [NotificationModelTypeEnum]. +class NotificationModelTypeEnumTypeTransformer { + factory NotificationModelTypeEnumTypeTransformer() => _instance ??= const NotificationModelTypeEnumTypeTransformer._(); + + const NotificationModelTypeEnumTypeTransformer._(); + + String encode(NotificationModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a NotificationModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + NotificationModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Notification': return NotificationModelTypeEnum.notification; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [NotificationModelTypeEnumTypeTransformer] instance. + static NotificationModelTypeEnumTypeTransformer? _instance; +} + + +/// The reason for the notification +class NotificationModelReasonEnum { + /// Instantiate a new enum with the provided [value]. + const NotificationModelReasonEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const assigned = NotificationModelReasonEnum._(r'assigned'); + static const commented = NotificationModelReasonEnum._(r'commented'); + static const created = NotificationModelReasonEnum._(r'created'); + static const dateAlert = NotificationModelReasonEnum._(r'dateAlert'); + static const mentioned = NotificationModelReasonEnum._(r'mentioned'); + static const prioritized = NotificationModelReasonEnum._(r'prioritized'); + static const processed = NotificationModelReasonEnum._(r'processed'); + static const responsible = NotificationModelReasonEnum._(r'responsible'); + static const subscribed = NotificationModelReasonEnum._(r'subscribed'); + static const scheduled = NotificationModelReasonEnum._(r'scheduled'); + static const watched = NotificationModelReasonEnum._(r'watched'); + + /// List of all possible values in this [enum][NotificationModelReasonEnum]. + static const values = [ + assigned, + commented, + created, + dateAlert, + mentioned, + prioritized, + processed, + responsible, + subscribed, + scheduled, + watched, + ]; + + static NotificationModelReasonEnum? fromJson(dynamic value) => NotificationModelReasonEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelReasonEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [NotificationModelReasonEnum] to String, +/// and [decode] dynamic data back to [NotificationModelReasonEnum]. +class NotificationModelReasonEnumTypeTransformer { + factory NotificationModelReasonEnumTypeTransformer() => _instance ??= const NotificationModelReasonEnumTypeTransformer._(); + + const NotificationModelReasonEnumTypeTransformer._(); + + String encode(NotificationModelReasonEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a NotificationModelReasonEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + NotificationModelReasonEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'assigned': return NotificationModelReasonEnum.assigned; + case r'commented': return NotificationModelReasonEnum.commented; + case r'created': return NotificationModelReasonEnum.created; + case r'dateAlert': return NotificationModelReasonEnum.dateAlert; + case r'mentioned': return NotificationModelReasonEnum.mentioned; + case r'prioritized': return NotificationModelReasonEnum.prioritized; + case r'processed': return NotificationModelReasonEnum.processed; + case r'responsible': return NotificationModelReasonEnum.responsible; + case r'subscribed': return NotificationModelReasonEnum.subscribed; + case r'scheduled': return NotificationModelReasonEnum.scheduled; + case r'watched': return NotificationModelReasonEnum.watched; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [NotificationModelReasonEnumTypeTransformer] instance. + static NotificationModelReasonEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/notification_model_details_inner.dart b/lib/model/notification_model_details_inner.dart new file mode 100644 index 0000000..9b608fc --- /dev/null +++ b/lib/model/notification_model_details_inner.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationModelDetailsInner { + /// Returns a new [NotificationModelDetailsInner] instance. + NotificationModelDetailsInner({ + required this.type, + required this.property, + required this.value, + required this.links, + }); + + NotificationModelDetailsInnerTypeEnum? type; + + /// The key of the key - value pair represented by the Values::Property + Object? property; + + /// The value of the key - value pair represented by the Values::Property + Object? value; + + ValuesPropertyModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationModelDetailsInner && + other.type == type && + other.property == property && + other.value == value && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (property == null ? 0 : property!.hashCode) + + (value == null ? 0 : value!.hashCode) + + (links.hashCode); + + @override + String toString() => 'NotificationModelDetailsInner[type=$type, property=$property, value=$value, links=$links]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.property != null) { + json[r'property'] = this.property; + } else { + json[r'property'] = null; + } + if (this.value != null) { + json[r'value'] = this.value; + } else { + json[r'value'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [NotificationModelDetailsInner] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationModelDetailsInner? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationModelDetailsInner[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationModelDetailsInner[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationModelDetailsInner( + type: Object.fromJson(json[r'_type']), + property: mapValueOfType(json, r'property'), + value: mapValueOfType(json, r'value'), + links: ValuesPropertyModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelDetailsInner.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationModelDetailsInner.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationModelDetailsInner-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationModelDetailsInner.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'property', + 'value', + '_links', + }; +} + + +class NotificationModelDetailsInnerTypeEnum { + /// Instantiate a new enum with the provided [value]. + const NotificationModelDetailsInnerTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const valuesColonColonProperty = NotificationModelDetailsInnerTypeEnum._('Values::Property'); + + /// List of all possible values in this [enum][NotificationModelDetailsInnerTypeEnum]. + static const values = [ + valuesColonColonProperty, + ]; + + static NotificationModelDetailsInnerTypeEnum? fromJson(dynamic value) => NotificationModelDetailsInnerTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelDetailsInnerTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [NotificationModelDetailsInnerTypeEnum] to Object, +/// and [decode] dynamic data back to [NotificationModelDetailsInnerTypeEnum]. +class NotificationModelDetailsInnerTypeEnumTypeTransformer { + factory NotificationModelDetailsInnerTypeEnumTypeTransformer() => _instance ??= const NotificationModelDetailsInnerTypeEnumTypeTransformer._(); + + const NotificationModelDetailsInnerTypeEnumTypeTransformer._(); + + Object encode(NotificationModelDetailsInnerTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a NotificationModelDetailsInnerTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + NotificationModelDetailsInnerTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'Values::Property': return NotificationModelDetailsInnerTypeEnum.valuesColonColonProperty; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [NotificationModelDetailsInnerTypeEnumTypeTransformer] instance. + static NotificationModelDetailsInnerTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/notification_model_embedded.dart b/lib/model/notification_model_embedded.dart new file mode 100644 index 0000000..ede77cc --- /dev/null +++ b/lib/model/notification_model_embedded.dart @@ -0,0 +1,151 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationModelEmbedded { + /// Returns a new [NotificationModelEmbedded] instance. + NotificationModelEmbedded({ + this.actor, + required this.project, + this.activity, + required this.resource, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + UserModel? actor; + + ProjectModel project; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ActivityModel? activity; + + NotificationModelEmbeddedResource resource; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationModelEmbedded && + other.actor == actor && + other.project == project && + other.activity == activity && + other.resource == resource; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (actor == null ? 0 : actor!.hashCode) + + (project.hashCode) + + (activity == null ? 0 : activity!.hashCode) + + (resource.hashCode); + + @override + String toString() => 'NotificationModelEmbedded[actor=$actor, project=$project, activity=$activity, resource=$resource]'; + + Map toJson() { + final json = {}; + if (this.actor != null) { + json[r'actor'] = this.actor; + } else { + json[r'actor'] = null; + } + json[r'project'] = this.project; + if (this.activity != null) { + json[r'activity'] = this.activity; + } else { + json[r'activity'] = null; + } + json[r'resource'] = this.resource; + return json; + } + + /// Returns a new [NotificationModelEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationModelEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationModelEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationModelEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationModelEmbedded( + actor: UserModel.fromJson(json[r'actor']), + project: ProjectModel.fromJson(json[r'project'])!, + activity: ActivityModel.fromJson(json[r'activity']), + resource: NotificationModelEmbeddedResource.fromJson(json[r'resource'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationModelEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationModelEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationModelEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'project', + 'resource', + }; +} + diff --git a/lib/model/notification_model_embedded_resource.dart b/lib/model/notification_model_embedded_resource.dart new file mode 100644 index 0000000..183b007 --- /dev/null +++ b/lib/model/notification_model_embedded_resource.dart @@ -0,0 +1,429 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationModelEmbeddedResource { + /// Returns a new [NotificationModelEmbeddedResource] instance. + NotificationModelEmbeddedResource({ + this.id, + this.lockVersion, + required this.subject, + this.type, + this.description, + this.scheduleManually, + this.readonly, + this.startDate, + this.dueDate, + this.date, + this.derivedStartDate, + this.derivedDueDate, + this.duration, + this.estimatedTime, + this.derivedEstimatedTime, + this.ignoreNonWorkingDays, + this.spentTime, + this.percentageDone, + this.createdAt, + this.updatedAt, + required this.links, + }); + + /// Work package id + /// + /// Minimum value: 1 + Object? id; + + /// The version of the item as used for optimistic locking + Object? lockVersion; + + /// Work package subject + Object? subject; + + NotificationModelEmbeddedResourceTypeEnum? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelDescription? description; + + /// If false (default) schedule automatically. + Object? scheduleManually; + + /// If true, the work package is in a readonly status so with the exception of the status, no other property can be altered. + Object? readonly; + + /// Scheduled beginning of a work package + Object? startDate; + + /// Scheduled end of a work package + Object? dueDate; + + /// Date on which a milestone is achieved + Object? date; + + /// Similar to start date but is not set by a client but rather deduced by the work packages' descendants. If manual scheduleManually is active, the two dates can deviate. + Object? derivedStartDate; + + /// Similar to due date but is not set by a client but rather deduced by the work packages' descendants. If manual scheduleManually is active, the two dates can deviate. + Object? derivedDueDate; + + /// **(NOT IMPLEMENTED)** The amount of time in hours the work package needs to be completed. Not available for milestone type of work packages. + Object? duration; + + /// Time a work package likely needs to be completed excluding its descendants + Object? estimatedTime; + + /// Time a work package likely needs to be completed including its descendants + Object? derivedEstimatedTime; + + /// **(NOT IMPLEMENTED)** When scheduling, whether or not to ignore the non working days being defined. A work package with the flag set to true will be allowed to be scheduled to a non working day. + Object? ignoreNonWorkingDays; + + /// The time booked for this work package by users working on it # Conditions **Permission** view time entries + Object? spentTime; + + /// Amount of total completion for a work package + /// + /// Maximum value: 100 + Object? percentageDone; + + /// Time of creation + Object? createdAt; + + /// Time of the most recent change to the work package + Object? updatedAt; + + WorkPackageModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationModelEmbeddedResource && + other.id == id && + other.lockVersion == lockVersion && + other.subject == subject && + other.type == type && + other.description == description && + other.scheduleManually == scheduleManually && + other.readonly == readonly && + other.startDate == startDate && + other.dueDate == dueDate && + other.date == date && + other.derivedStartDate == derivedStartDate && + other.derivedDueDate == derivedDueDate && + other.duration == duration && + other.estimatedTime == estimatedTime && + other.derivedEstimatedTime == derivedEstimatedTime && + other.ignoreNonWorkingDays == ignoreNonWorkingDays && + other.spentTime == spentTime && + other.percentageDone == percentageDone && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (lockVersion == null ? 0 : lockVersion!.hashCode) + + (subject == null ? 0 : subject!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (scheduleManually == null ? 0 : scheduleManually!.hashCode) + + (readonly == null ? 0 : readonly!.hashCode) + + (startDate == null ? 0 : startDate!.hashCode) + + (dueDate == null ? 0 : dueDate!.hashCode) + + (date == null ? 0 : date!.hashCode) + + (derivedStartDate == null ? 0 : derivedStartDate!.hashCode) + + (derivedDueDate == null ? 0 : derivedDueDate!.hashCode) + + (duration == null ? 0 : duration!.hashCode) + + (estimatedTime == null ? 0 : estimatedTime!.hashCode) + + (derivedEstimatedTime == null ? 0 : derivedEstimatedTime!.hashCode) + + (ignoreNonWorkingDays == null ? 0 : ignoreNonWorkingDays!.hashCode) + + (spentTime == null ? 0 : spentTime!.hashCode) + + (percentageDone == null ? 0 : percentageDone!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (links.hashCode); + + @override + String toString() => 'NotificationModelEmbeddedResource[id=$id, lockVersion=$lockVersion, subject=$subject, type=$type, description=$description, scheduleManually=$scheduleManually, readonly=$readonly, startDate=$startDate, dueDate=$dueDate, date=$date, derivedStartDate=$derivedStartDate, derivedDueDate=$derivedDueDate, duration=$duration, estimatedTime=$estimatedTime, derivedEstimatedTime=$derivedEstimatedTime, ignoreNonWorkingDays=$ignoreNonWorkingDays, spentTime=$spentTime, percentageDone=$percentageDone, createdAt=$createdAt, updatedAt=$updatedAt, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.lockVersion != null) { + json[r'lockVersion'] = this.lockVersion; + } else { + json[r'lockVersion'] = null; + } + if (this.subject != null) { + json[r'subject'] = this.subject; + } else { + json[r'subject'] = null; + } + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.scheduleManually != null) { + json[r'scheduleManually'] = this.scheduleManually; + } else { + json[r'scheduleManually'] = null; + } + if (this.readonly != null) { + json[r'readonly'] = this.readonly; + } else { + json[r'readonly'] = null; + } + if (this.startDate != null) { + json[r'startDate'] = this.startDate; + } else { + json[r'startDate'] = null; + } + if (this.dueDate != null) { + json[r'dueDate'] = this.dueDate; + } else { + json[r'dueDate'] = null; + } + if (this.date != null) { + json[r'date'] = this.date; + } else { + json[r'date'] = null; + } + if (this.derivedStartDate != null) { + json[r'derivedStartDate'] = this.derivedStartDate; + } else { + json[r'derivedStartDate'] = null; + } + if (this.derivedDueDate != null) { + json[r'derivedDueDate'] = this.derivedDueDate; + } else { + json[r'derivedDueDate'] = null; + } + if (this.duration != null) { + json[r'duration'] = this.duration; + } else { + json[r'duration'] = null; + } + if (this.estimatedTime != null) { + json[r'estimatedTime'] = this.estimatedTime; + } else { + json[r'estimatedTime'] = null; + } + if (this.derivedEstimatedTime != null) { + json[r'derivedEstimatedTime'] = this.derivedEstimatedTime; + } else { + json[r'derivedEstimatedTime'] = null; + } + if (this.ignoreNonWorkingDays != null) { + json[r'ignoreNonWorkingDays'] = this.ignoreNonWorkingDays; + } else { + json[r'ignoreNonWorkingDays'] = null; + } + if (this.spentTime != null) { + json[r'spentTime'] = this.spentTime; + } else { + json[r'spentTime'] = null; + } + if (this.percentageDone != null) { + json[r'percentageDone'] = this.percentageDone; + } else { + json[r'percentageDone'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt; + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt; + } else { + json[r'updatedAt'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [NotificationModelEmbeddedResource] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationModelEmbeddedResource? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationModelEmbeddedResource[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationModelEmbeddedResource[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationModelEmbeddedResource( + id: mapValueOfType(json, r'id'), + lockVersion: mapValueOfType(json, r'lockVersion'), + subject: mapValueOfType(json, r'subject'), + type: Object.fromJson(json[r'_type']), + description: WorkPackageModelDescription.fromJson(json[r'description']), + scheduleManually: mapValueOfType(json, r'scheduleManually'), + readonly: mapValueOfType(json, r'readonly'), + startDate: mapValueOfType(json, r'startDate'), + dueDate: mapValueOfType(json, r'dueDate'), + date: mapValueOfType(json, r'date'), + derivedStartDate: mapValueOfType(json, r'derivedStartDate'), + derivedDueDate: mapValueOfType(json, r'derivedDueDate'), + duration: mapValueOfType(json, r'duration'), + estimatedTime: mapValueOfType(json, r'estimatedTime'), + derivedEstimatedTime: mapValueOfType(json, r'derivedEstimatedTime'), + ignoreNonWorkingDays: mapValueOfType(json, r'ignoreNonWorkingDays'), + spentTime: mapValueOfType(json, r'spentTime'), + percentageDone: mapValueOfType(json, r'percentageDone'), + createdAt: mapValueOfType(json, r'createdAt'), + updatedAt: mapValueOfType(json, r'updatedAt'), + links: WorkPackageModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelEmbeddedResource.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationModelEmbeddedResource.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationModelEmbeddedResource-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationModelEmbeddedResource.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'subject', + '_links', + }; +} + + +class NotificationModelEmbeddedResourceTypeEnum { + /// Instantiate a new enum with the provided [value]. + const NotificationModelEmbeddedResourceTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const workPackage = NotificationModelEmbeddedResourceTypeEnum._('WorkPackage'); + + /// List of all possible values in this [enum][NotificationModelEmbeddedResourceTypeEnum]. + static const values = [ + workPackage, + ]; + + static NotificationModelEmbeddedResourceTypeEnum? fromJson(dynamic value) => NotificationModelEmbeddedResourceTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelEmbeddedResourceTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [NotificationModelEmbeddedResourceTypeEnum] to Object, +/// and [decode] dynamic data back to [NotificationModelEmbeddedResourceTypeEnum]. +class NotificationModelEmbeddedResourceTypeEnumTypeTransformer { + factory NotificationModelEmbeddedResourceTypeEnumTypeTransformer() => _instance ??= const NotificationModelEmbeddedResourceTypeEnumTypeTransformer._(); + + const NotificationModelEmbeddedResourceTypeEnumTypeTransformer._(); + + Object encode(NotificationModelEmbeddedResourceTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a NotificationModelEmbeddedResourceTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + NotificationModelEmbeddedResourceTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'WorkPackage': return NotificationModelEmbeddedResourceTypeEnum.workPackage; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [NotificationModelEmbeddedResourceTypeEnumTypeTransformer] instance. + static NotificationModelEmbeddedResourceTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/notification_model_links.dart b/lib/model/notification_model_links.dart new file mode 100644 index 0000000..7261b00 --- /dev/null +++ b/lib/model/notification_model_links.dart @@ -0,0 +1,183 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationModelLinks { + /// Returns a new [NotificationModelLinks] instance. + NotificationModelLinks({ + required this.self, + this.readIAN, + this.unreadIAN, + required this.project, + required this.actor, + required this.resource, + required this.activity, + this.details = const [], + }); + + NotificationModelLinksSelf self; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + NotificationModelLinksReadIAN? readIAN; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + NotificationModelLinksUnreadIAN? unreadIAN; + + NotificationModelLinksProject project; + + NotificationModelLinksActor actor; + + NotificationModelLinksResource resource; + + NotificationModelLinksActivity activity; + + List details; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationModelLinks && + other.self == self && + other.readIAN == readIAN && + other.unreadIAN == unreadIAN && + other.project == project && + other.actor == actor && + other.resource == resource && + other.activity == activity && + _deepEquality.equals(other.details, details); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (readIAN == null ? 0 : readIAN!.hashCode) + + (unreadIAN == null ? 0 : unreadIAN!.hashCode) + + (project.hashCode) + + (actor.hashCode) + + (resource.hashCode) + + (activity.hashCode) + + (details.hashCode); + + @override + String toString() => 'NotificationModelLinks[self=$self, readIAN=$readIAN, unreadIAN=$unreadIAN, project=$project, actor=$actor, resource=$resource, activity=$activity, details=$details]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + if (this.readIAN != null) { + json[r'readIAN'] = this.readIAN; + } else { + json[r'readIAN'] = null; + } + if (this.unreadIAN != null) { + json[r'unreadIAN'] = this.unreadIAN; + } else { + json[r'unreadIAN'] = null; + } + json[r'project'] = this.project; + json[r'actor'] = this.actor; + json[r'resource'] = this.resource; + json[r'activity'] = this.activity; + json[r'details'] = this.details; + return json; + } + + /// Returns a new [NotificationModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationModelLinks( + self: NotificationModelLinksSelf.fromJson(json[r'self'])!, + readIAN: NotificationModelLinksReadIAN.fromJson(json[r'readIAN']), + unreadIAN: NotificationModelLinksUnreadIAN.fromJson(json[r'unreadIAN']), + project: NotificationModelLinksProject.fromJson(json[r'project'])!, + actor: NotificationModelLinksActor.fromJson(json[r'actor'])!, + resource: NotificationModelLinksResource.fromJson(json[r'resource'])!, + activity: NotificationModelLinksActivity.fromJson(json[r'activity'])!, + details: NotificationModelLinksDetailsInner.listFromJson(json[r'details']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'project', + 'actor', + 'resource', + 'activity', + 'details', + }; +} + diff --git a/lib/model/notification_model_links_activity.dart b/lib/model/notification_model_links_activity.dart new file mode 100644 index 0000000..c49523d --- /dev/null +++ b/lib/model/notification_model_links_activity.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationModelLinksActivity { + /// Returns a new [NotificationModelLinksActivity] instance. + NotificationModelLinksActivity({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationModelLinksActivity && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NotificationModelLinksActivity[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NotificationModelLinksActivity] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationModelLinksActivity? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationModelLinksActivity[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationModelLinksActivity[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationModelLinksActivity( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelLinksActivity.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationModelLinksActivity.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationModelLinksActivity-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationModelLinksActivity.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/notification_model_links_actor.dart b/lib/model/notification_model_links_actor.dart new file mode 100644 index 0000000..8fdd34b --- /dev/null +++ b/lib/model/notification_model_links_actor.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationModelLinksActor { + /// Returns a new [NotificationModelLinksActor] instance. + NotificationModelLinksActor({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationModelLinksActor && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NotificationModelLinksActor[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NotificationModelLinksActor] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationModelLinksActor? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationModelLinksActor[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationModelLinksActor[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationModelLinksActor( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelLinksActor.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationModelLinksActor.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationModelLinksActor-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationModelLinksActor.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/notification_model_links_details_inner.dart b/lib/model/notification_model_links_details_inner.dart new file mode 100644 index 0000000..ac6fe29 --- /dev/null +++ b/lib/model/notification_model_links_details_inner.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationModelLinksDetailsInner { + /// Returns a new [NotificationModelLinksDetailsInner] instance. + NotificationModelLinksDetailsInner({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationModelLinksDetailsInner && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NotificationModelLinksDetailsInner[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NotificationModelLinksDetailsInner] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationModelLinksDetailsInner? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationModelLinksDetailsInner[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationModelLinksDetailsInner[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationModelLinksDetailsInner( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelLinksDetailsInner.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationModelLinksDetailsInner.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationModelLinksDetailsInner-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationModelLinksDetailsInner.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/notification_model_links_project.dart b/lib/model/notification_model_links_project.dart new file mode 100644 index 0000000..fcdd450 --- /dev/null +++ b/lib/model/notification_model_links_project.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationModelLinksProject { + /// Returns a new [NotificationModelLinksProject] instance. + NotificationModelLinksProject({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationModelLinksProject && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NotificationModelLinksProject[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NotificationModelLinksProject] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationModelLinksProject? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationModelLinksProject[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationModelLinksProject[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationModelLinksProject( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelLinksProject.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationModelLinksProject.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationModelLinksProject-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationModelLinksProject.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/notification_model_links_read_ian.dart b/lib/model/notification_model_links_read_ian.dart new file mode 100644 index 0000000..fa3b20d --- /dev/null +++ b/lib/model/notification_model_links_read_ian.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationModelLinksReadIAN { + /// Returns a new [NotificationModelLinksReadIAN] instance. + NotificationModelLinksReadIAN({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationModelLinksReadIAN && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NotificationModelLinksReadIAN[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NotificationModelLinksReadIAN] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationModelLinksReadIAN? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationModelLinksReadIAN[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationModelLinksReadIAN[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationModelLinksReadIAN( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelLinksReadIAN.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationModelLinksReadIAN.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationModelLinksReadIAN-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationModelLinksReadIAN.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/notification_model_links_resource.dart b/lib/model/notification_model_links_resource.dart new file mode 100644 index 0000000..6d12a3c --- /dev/null +++ b/lib/model/notification_model_links_resource.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationModelLinksResource { + /// Returns a new [NotificationModelLinksResource] instance. + NotificationModelLinksResource({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationModelLinksResource && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NotificationModelLinksResource[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NotificationModelLinksResource] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationModelLinksResource? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationModelLinksResource[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationModelLinksResource[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationModelLinksResource( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelLinksResource.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationModelLinksResource.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationModelLinksResource-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationModelLinksResource.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/notification_model_links_self.dart b/lib/model/notification_model_links_self.dart new file mode 100644 index 0000000..060f9d2 --- /dev/null +++ b/lib/model/notification_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationModelLinksSelf { + /// Returns a new [NotificationModelLinksSelf] instance. + NotificationModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NotificationModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NotificationModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/notification_model_links_unread_ian.dart b/lib/model/notification_model_links_unread_ian.dart new file mode 100644 index 0000000..d0e81c6 --- /dev/null +++ b/lib/model/notification_model_links_unread_ian.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NotificationModelLinksUnreadIAN { + /// Returns a new [NotificationModelLinksUnreadIAN] instance. + NotificationModelLinksUnreadIAN({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is NotificationModelLinksUnreadIAN && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'NotificationModelLinksUnreadIAN[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [NotificationModelLinksUnreadIAN] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NotificationModelLinksUnreadIAN? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NotificationModelLinksUnreadIAN[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NotificationModelLinksUnreadIAN[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NotificationModelLinksUnreadIAN( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NotificationModelLinksUnreadIAN.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NotificationModelLinksUnreadIAN.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NotificationModelLinksUnreadIAN-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NotificationModelLinksUnreadIAN.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/o_auth_application_read_model.dart b/lib/model/o_auth_application_read_model.dart new file mode 100644 index 0000000..d383010 --- /dev/null +++ b/lib/model/o_auth_application_read_model.dart @@ -0,0 +1,296 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OAuthApplicationReadModel { + /// Returns a new [OAuthApplicationReadModel] instance. + OAuthApplicationReadModel({ + required this.id, + required this.type, + required this.name, + required this.clientId, + this.clientSecret, + required this.confidential, + this.createdAt, + this.updatedAt, + this.scopes = const [], + this.links, + }); + + /// Minimum value: 1 + int id; + + OAuthApplicationReadModelTypeEnum type; + + /// The name of the OAuth 2 application + String name; + + /// OAuth 2 client id + String clientId; + + /// OAuth 2 client secret. This is only returned when creating a new OAuth application. + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? clientSecret; + + /// true, if OAuth 2 credentials are confidential, false, if no secret is stored + bool confidential; + + /// The time the OAuth 2 Application was created at + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? createdAt; + + /// The time the OAuth 2 Application was last updated + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? updatedAt; + + List scopes; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + OAuthApplicationReadModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is OAuthApplicationReadModel && + other.id == id && + other.type == type && + other.name == name && + other.clientId == clientId && + other.clientSecret == clientSecret && + other.confidential == confidential && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + _deepEquality.equals(other.scopes, scopes) && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (type.hashCode) + + (name.hashCode) + + (clientId.hashCode) + + (clientSecret == null ? 0 : clientSecret!.hashCode) + + (confidential.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (scopes.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'OAuthApplicationReadModel[id=$id, type=$type, name=$name, clientId=$clientId, clientSecret=$clientSecret, confidential=$confidential, createdAt=$createdAt, updatedAt=$updatedAt, scopes=$scopes, links=$links]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'_type'] = this.type; + json[r'name'] = this.name; + json[r'clientId'] = this.clientId; + if (this.clientSecret != null) { + json[r'clientSecret'] = this.clientSecret; + } else { + json[r'clientSecret'] = null; + } + json[r'confidential'] = this.confidential; + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String(); + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt!.toUtc().toIso8601String(); + } else { + json[r'updatedAt'] = null; + } + json[r'scopes'] = this.scopes; + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [OAuthApplicationReadModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OAuthApplicationReadModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OAuthApplicationReadModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OAuthApplicationReadModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OAuthApplicationReadModel( + id: mapValueOfType(json, r'id')!, + type: OAuthApplicationReadModelTypeEnum.fromJson(json[r'_type'])!, + name: mapValueOfType(json, r'name')!, + clientId: mapValueOfType(json, r'clientId')!, + clientSecret: mapValueOfType(json, r'clientSecret'), + confidential: mapValueOfType(json, r'confidential')!, + createdAt: mapDateTime(json, r'createdAt', r''), + updatedAt: mapDateTime(json, r'updatedAt', r''), + scopes: json[r'scopes'] is Iterable + ? (json[r'scopes'] as Iterable).cast().toList(growable: false) + : const [], + links: OAuthApplicationReadModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OAuthApplicationReadModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OAuthApplicationReadModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OAuthApplicationReadModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OAuthApplicationReadModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + '_type', + 'name', + 'clientId', + 'confidential', + }; +} + + +class OAuthApplicationReadModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const OAuthApplicationReadModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const oAuthApplication = OAuthApplicationReadModelTypeEnum._(r'OAuthApplication'); + + /// List of all possible values in this [enum][OAuthApplicationReadModelTypeEnum]. + static const values = [ + oAuthApplication, + ]; + + static OAuthApplicationReadModelTypeEnum? fromJson(dynamic value) => OAuthApplicationReadModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OAuthApplicationReadModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [OAuthApplicationReadModelTypeEnum] to String, +/// and [decode] dynamic data back to [OAuthApplicationReadModelTypeEnum]. +class OAuthApplicationReadModelTypeEnumTypeTransformer { + factory OAuthApplicationReadModelTypeEnumTypeTransformer() => _instance ??= const OAuthApplicationReadModelTypeEnumTypeTransformer._(); + + const OAuthApplicationReadModelTypeEnumTypeTransformer._(); + + String encode(OAuthApplicationReadModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a OAuthApplicationReadModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + OAuthApplicationReadModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'OAuthApplication': return OAuthApplicationReadModelTypeEnum.oAuthApplication; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [OAuthApplicationReadModelTypeEnumTypeTransformer] instance. + static OAuthApplicationReadModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/o_auth_application_read_model_links.dart b/lib/model/o_auth_application_read_model_links.dart new file mode 100644 index 0000000..39ccd9b --- /dev/null +++ b/lib/model/o_auth_application_read_model_links.dart @@ -0,0 +1,142 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OAuthApplicationReadModelLinks { + /// Returns a new [OAuthApplicationReadModelLinks] instance. + OAuthApplicationReadModelLinks({ + required this.self, + required this.owner, + this.integration, + required this.redirectUri, + }); + + OAuthApplicationReadModelLinksSelf self; + + OAuthApplicationReadModelLinksOwner owner; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + OAuthApplicationReadModelLinksIntegration? integration; + + OAuthApplicationReadModelLinksRedirectUri redirectUri; + + @override + bool operator ==(Object other) => identical(this, other) || other is OAuthApplicationReadModelLinks && + other.self == self && + other.owner == owner && + other.integration == integration && + other.redirectUri == redirectUri; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (owner.hashCode) + + (integration == null ? 0 : integration!.hashCode) + + (redirectUri.hashCode); + + @override + String toString() => 'OAuthApplicationReadModelLinks[self=$self, owner=$owner, integration=$integration, redirectUri=$redirectUri]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'owner'] = this.owner; + if (this.integration != null) { + json[r'integration'] = this.integration; + } else { + json[r'integration'] = null; + } + json[r'redirectUri'] = this.redirectUri; + return json; + } + + /// Returns a new [OAuthApplicationReadModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OAuthApplicationReadModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OAuthApplicationReadModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OAuthApplicationReadModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OAuthApplicationReadModelLinks( + self: OAuthApplicationReadModelLinksSelf.fromJson(json[r'self'])!, + owner: OAuthApplicationReadModelLinksOwner.fromJson(json[r'owner'])!, + integration: OAuthApplicationReadModelLinksIntegration.fromJson(json[r'integration']), + redirectUri: OAuthApplicationReadModelLinksRedirectUri.fromJson(json[r'redirectUri'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OAuthApplicationReadModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OAuthApplicationReadModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OAuthApplicationReadModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OAuthApplicationReadModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'owner', + 'redirectUri', + }; +} + diff --git a/lib/model/o_auth_application_read_model_links_integration.dart b/lib/model/o_auth_application_read_model_links_integration.dart new file mode 100644 index 0000000..c59de57 --- /dev/null +++ b/lib/model/o_auth_application_read_model_links_integration.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OAuthApplicationReadModelLinksIntegration { + /// Returns a new [OAuthApplicationReadModelLinksIntegration] instance. + OAuthApplicationReadModelLinksIntegration({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is OAuthApplicationReadModelLinksIntegration && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'OAuthApplicationReadModelLinksIntegration[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [OAuthApplicationReadModelLinksIntegration] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OAuthApplicationReadModelLinksIntegration? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OAuthApplicationReadModelLinksIntegration[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OAuthApplicationReadModelLinksIntegration[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OAuthApplicationReadModelLinksIntegration( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OAuthApplicationReadModelLinksIntegration.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OAuthApplicationReadModelLinksIntegration.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OAuthApplicationReadModelLinksIntegration-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OAuthApplicationReadModelLinksIntegration.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/o_auth_application_read_model_links_owner.dart b/lib/model/o_auth_application_read_model_links_owner.dart new file mode 100644 index 0000000..133e961 --- /dev/null +++ b/lib/model/o_auth_application_read_model_links_owner.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OAuthApplicationReadModelLinksOwner { + /// Returns a new [OAuthApplicationReadModelLinksOwner] instance. + OAuthApplicationReadModelLinksOwner({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is OAuthApplicationReadModelLinksOwner && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'OAuthApplicationReadModelLinksOwner[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [OAuthApplicationReadModelLinksOwner] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OAuthApplicationReadModelLinksOwner? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OAuthApplicationReadModelLinksOwner[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OAuthApplicationReadModelLinksOwner[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OAuthApplicationReadModelLinksOwner( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OAuthApplicationReadModelLinksOwner.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OAuthApplicationReadModelLinksOwner.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OAuthApplicationReadModelLinksOwner-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OAuthApplicationReadModelLinksOwner.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/o_auth_application_read_model_links_redirect_uri.dart b/lib/model/o_auth_application_read_model_links_redirect_uri.dart new file mode 100644 index 0000000..9b10e7c --- /dev/null +++ b/lib/model/o_auth_application_read_model_links_redirect_uri.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OAuthApplicationReadModelLinksRedirectUri { + /// Returns a new [OAuthApplicationReadModelLinksRedirectUri] instance. + OAuthApplicationReadModelLinksRedirectUri({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is OAuthApplicationReadModelLinksRedirectUri && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'OAuthApplicationReadModelLinksRedirectUri[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [OAuthApplicationReadModelLinksRedirectUri] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OAuthApplicationReadModelLinksRedirectUri? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OAuthApplicationReadModelLinksRedirectUri[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OAuthApplicationReadModelLinksRedirectUri[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OAuthApplicationReadModelLinksRedirectUri( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OAuthApplicationReadModelLinksRedirectUri.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OAuthApplicationReadModelLinksRedirectUri.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OAuthApplicationReadModelLinksRedirectUri-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OAuthApplicationReadModelLinksRedirectUri.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/o_auth_application_read_model_links_self.dart b/lib/model/o_auth_application_read_model_links_self.dart new file mode 100644 index 0000000..138b1b4 --- /dev/null +++ b/lib/model/o_auth_application_read_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OAuthApplicationReadModelLinksSelf { + /// Returns a new [OAuthApplicationReadModelLinksSelf] instance. + OAuthApplicationReadModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is OAuthApplicationReadModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'OAuthApplicationReadModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [OAuthApplicationReadModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OAuthApplicationReadModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OAuthApplicationReadModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OAuthApplicationReadModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OAuthApplicationReadModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OAuthApplicationReadModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OAuthApplicationReadModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OAuthApplicationReadModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OAuthApplicationReadModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/o_auth_client_credentials_read_model.dart b/lib/model/o_auth_client_credentials_read_model.dart new file mode 100644 index 0000000..94bff6a --- /dev/null +++ b/lib/model/o_auth_client_credentials_read_model.dart @@ -0,0 +1,251 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OAuthClientCredentialsReadModel { + /// Returns a new [OAuthClientCredentialsReadModel] instance. + OAuthClientCredentialsReadModel({ + required this.id, + required this.type, + required this.clientId, + required this.confidential, + this.createdAt, + this.updatedAt, + required this.links, + }); + + /// Minimum value: 1 + int id; + + OAuthClientCredentialsReadModelTypeEnum type; + + /// OAuth 2 client id + String clientId; + + /// true, if OAuth 2 credentials are confidential, false, if no secret is stored + bool confidential; + + /// The time the OAuth client credentials were created at + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? createdAt; + + /// The time the OAuth client credentials were last updated + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? updatedAt; + + OAuthClientCredentialsReadModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is OAuthClientCredentialsReadModel && + other.id == id && + other.type == type && + other.clientId == clientId && + other.confidential == confidential && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (type.hashCode) + + (clientId.hashCode) + + (confidential.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (links.hashCode); + + @override + String toString() => 'OAuthClientCredentialsReadModel[id=$id, type=$type, clientId=$clientId, confidential=$confidential, createdAt=$createdAt, updatedAt=$updatedAt, links=$links]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'_type'] = this.type; + json[r'clientId'] = this.clientId; + json[r'confidential'] = this.confidential; + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String(); + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt!.toUtc().toIso8601String(); + } else { + json[r'updatedAt'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [OAuthClientCredentialsReadModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OAuthClientCredentialsReadModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OAuthClientCredentialsReadModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OAuthClientCredentialsReadModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OAuthClientCredentialsReadModel( + id: mapValueOfType(json, r'id')!, + type: OAuthClientCredentialsReadModelTypeEnum.fromJson(json[r'_type'])!, + clientId: mapValueOfType(json, r'clientId')!, + confidential: mapValueOfType(json, r'confidential')!, + createdAt: mapDateTime(json, r'createdAt', r''), + updatedAt: mapDateTime(json, r'updatedAt', r''), + links: OAuthClientCredentialsReadModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OAuthClientCredentialsReadModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OAuthClientCredentialsReadModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OAuthClientCredentialsReadModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OAuthClientCredentialsReadModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + '_type', + 'clientId', + 'confidential', + '_links', + }; +} + + +class OAuthClientCredentialsReadModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const OAuthClientCredentialsReadModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const oAuthClientCredentials = OAuthClientCredentialsReadModelTypeEnum._(r'OAuthClientCredentials'); + + /// List of all possible values in this [enum][OAuthClientCredentialsReadModelTypeEnum]. + static const values = [ + oAuthClientCredentials, + ]; + + static OAuthClientCredentialsReadModelTypeEnum? fromJson(dynamic value) => OAuthClientCredentialsReadModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OAuthClientCredentialsReadModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [OAuthClientCredentialsReadModelTypeEnum] to String, +/// and [decode] dynamic data back to [OAuthClientCredentialsReadModelTypeEnum]. +class OAuthClientCredentialsReadModelTypeEnumTypeTransformer { + factory OAuthClientCredentialsReadModelTypeEnumTypeTransformer() => _instance ??= const OAuthClientCredentialsReadModelTypeEnumTypeTransformer._(); + + const OAuthClientCredentialsReadModelTypeEnumTypeTransformer._(); + + String encode(OAuthClientCredentialsReadModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a OAuthClientCredentialsReadModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + OAuthClientCredentialsReadModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'OAuthClientCredentials': return OAuthClientCredentialsReadModelTypeEnum.oAuthClientCredentials; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [OAuthClientCredentialsReadModelTypeEnumTypeTransformer] instance. + static OAuthClientCredentialsReadModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/o_auth_client_credentials_read_model_links.dart b/lib/model/o_auth_client_credentials_read_model_links.dart new file mode 100644 index 0000000..c55d4fa --- /dev/null +++ b/lib/model/o_auth_client_credentials_read_model_links.dart @@ -0,0 +1,117 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OAuthClientCredentialsReadModelLinks { + /// Returns a new [OAuthClientCredentialsReadModelLinks] instance. + OAuthClientCredentialsReadModelLinks({ + required this.self, + required this.integration, + }); + + OAuthClientCredentialsReadModelLinksSelf self; + + OAuthClientCredentialsReadModelLinksIntegration integration; + + @override + bool operator ==(Object other) => identical(this, other) || other is OAuthClientCredentialsReadModelLinks && + other.self == self && + other.integration == integration; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (integration.hashCode); + + @override + String toString() => 'OAuthClientCredentialsReadModelLinks[self=$self, integration=$integration]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'integration'] = this.integration; + return json; + } + + /// Returns a new [OAuthClientCredentialsReadModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OAuthClientCredentialsReadModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OAuthClientCredentialsReadModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OAuthClientCredentialsReadModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OAuthClientCredentialsReadModelLinks( + self: OAuthClientCredentialsReadModelLinksSelf.fromJson(json[r'self'])!, + integration: OAuthClientCredentialsReadModelLinksIntegration.fromJson(json[r'integration'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OAuthClientCredentialsReadModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OAuthClientCredentialsReadModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OAuthClientCredentialsReadModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OAuthClientCredentialsReadModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'integration', + }; +} + diff --git a/lib/model/o_auth_client_credentials_read_model_links_integration.dart b/lib/model/o_auth_client_credentials_read_model_links_integration.dart new file mode 100644 index 0000000..420b78d --- /dev/null +++ b/lib/model/o_auth_client_credentials_read_model_links_integration.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OAuthClientCredentialsReadModelLinksIntegration { + /// Returns a new [OAuthClientCredentialsReadModelLinksIntegration] instance. + OAuthClientCredentialsReadModelLinksIntegration({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is OAuthClientCredentialsReadModelLinksIntegration && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'OAuthClientCredentialsReadModelLinksIntegration[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [OAuthClientCredentialsReadModelLinksIntegration] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OAuthClientCredentialsReadModelLinksIntegration? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OAuthClientCredentialsReadModelLinksIntegration[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OAuthClientCredentialsReadModelLinksIntegration[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OAuthClientCredentialsReadModelLinksIntegration( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OAuthClientCredentialsReadModelLinksIntegration.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OAuthClientCredentialsReadModelLinksIntegration.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OAuthClientCredentialsReadModelLinksIntegration-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OAuthClientCredentialsReadModelLinksIntegration.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/o_auth_client_credentials_read_model_links_self.dart b/lib/model/o_auth_client_credentials_read_model_links_self.dart new file mode 100644 index 0000000..f87dee5 --- /dev/null +++ b/lib/model/o_auth_client_credentials_read_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OAuthClientCredentialsReadModelLinksSelf { + /// Returns a new [OAuthClientCredentialsReadModelLinksSelf] instance. + OAuthClientCredentialsReadModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is OAuthClientCredentialsReadModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'OAuthClientCredentialsReadModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [OAuthClientCredentialsReadModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OAuthClientCredentialsReadModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OAuthClientCredentialsReadModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OAuthClientCredentialsReadModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OAuthClientCredentialsReadModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OAuthClientCredentialsReadModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OAuthClientCredentialsReadModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OAuthClientCredentialsReadModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OAuthClientCredentialsReadModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/o_auth_client_credentials_write_model.dart b/lib/model/o_auth_client_credentials_write_model.dart new file mode 100644 index 0000000..6afb593 --- /dev/null +++ b/lib/model/o_auth_client_credentials_write_model.dart @@ -0,0 +1,119 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OAuthClientCredentialsWriteModel { + /// Returns a new [OAuthClientCredentialsWriteModel] instance. + OAuthClientCredentialsWriteModel({ + required this.clientId, + required this.clientSecret, + }); + + /// OAuth 2 client id + String clientId; + + /// OAuth 2 client secret + String clientSecret; + + @override + bool operator ==(Object other) => identical(this, other) || other is OAuthClientCredentialsWriteModel && + other.clientId == clientId && + other.clientSecret == clientSecret; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (clientId.hashCode) + + (clientSecret.hashCode); + + @override + String toString() => 'OAuthClientCredentialsWriteModel[clientId=$clientId, clientSecret=$clientSecret]'; + + Map toJson() { + final json = {}; + json[r'clientId'] = this.clientId; + json[r'clientSecret'] = this.clientSecret; + return json; + } + + /// Returns a new [OAuthClientCredentialsWriteModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OAuthClientCredentialsWriteModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OAuthClientCredentialsWriteModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OAuthClientCredentialsWriteModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OAuthClientCredentialsWriteModel( + clientId: mapValueOfType(json, r'clientId')!, + clientSecret: mapValueOfType(json, r'clientSecret')!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OAuthClientCredentialsWriteModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OAuthClientCredentialsWriteModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OAuthClientCredentialsWriteModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OAuthClientCredentialsWriteModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'clientId', + 'clientSecret', + }; +} + diff --git a/lib/model/paginated_collection_model.dart b/lib/model/paginated_collection_model.dart new file mode 100644 index 0000000..b99d02a --- /dev/null +++ b/lib/model/paginated_collection_model.dart @@ -0,0 +1,232 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PaginatedCollectionModel { + /// Returns a new [PaginatedCollectionModel] instance. + PaginatedCollectionModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.pageSize, + required this.offset, + }); + + PaginatedCollectionModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + PaginatedCollectionModelAllOfLinks links; + + /// Amount of elements that a response will hold. + /// + /// Minimum value: 0 + int pageSize; + + /// The page number that is requested from paginated collection. + /// + /// Minimum value: 1 + int offset; + + @override + bool operator ==(Object other) => identical(this, other) || other is PaginatedCollectionModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.pageSize == pageSize && + other.offset == offset; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (pageSize.hashCode) + + (offset.hashCode); + + @override + String toString() => 'PaginatedCollectionModel[type=$type, total=$total, count=$count, links=$links, pageSize=$pageSize, offset=$offset]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'pageSize'] = this.pageSize; + json[r'offset'] = this.offset; + return json; + } + + /// Returns a new [PaginatedCollectionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PaginatedCollectionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "PaginatedCollectionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PaginatedCollectionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PaginatedCollectionModel( + type: PaginatedCollectionModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: PaginatedCollectionModelAllOfLinks.fromJson(json[r'_links'])!, + pageSize: mapValueOfType(json, r'pageSize')!, + offset: mapValueOfType(json, r'offset')!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PaginatedCollectionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PaginatedCollectionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PaginatedCollectionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PaginatedCollectionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + 'pageSize', + 'offset', + }; +} + + +class PaginatedCollectionModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const PaginatedCollectionModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = PaginatedCollectionModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][PaginatedCollectionModelTypeEnum]. + static const values = [ + collection, + ]; + + static PaginatedCollectionModelTypeEnum? fromJson(dynamic value) => PaginatedCollectionModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PaginatedCollectionModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [PaginatedCollectionModelTypeEnum] to String, +/// and [decode] dynamic data back to [PaginatedCollectionModelTypeEnum]. +class PaginatedCollectionModelTypeEnumTypeTransformer { + factory PaginatedCollectionModelTypeEnumTypeTransformer() => _instance ??= const PaginatedCollectionModelTypeEnumTypeTransformer._(); + + const PaginatedCollectionModelTypeEnumTypeTransformer._(); + + String encode(PaginatedCollectionModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a PaginatedCollectionModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + PaginatedCollectionModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return PaginatedCollectionModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [PaginatedCollectionModelTypeEnumTypeTransformer] instance. + static PaginatedCollectionModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/paginated_collection_model_all_of_links.dart b/lib/model/paginated_collection_model_all_of_links.dart new file mode 100644 index 0000000..2dafe27 --- /dev/null +++ b/lib/model/paginated_collection_model_all_of_links.dart @@ -0,0 +1,117 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PaginatedCollectionModelAllOfLinks { + /// Returns a new [PaginatedCollectionModelAllOfLinks] instance. + PaginatedCollectionModelAllOfLinks({ + required this.jumpTo, + required this.changeSize, + }); + + PaginatedCollectionModelAllOfLinksJumpTo jumpTo; + + PaginatedCollectionModelAllOfLinksChangeSize changeSize; + + @override + bool operator ==(Object other) => identical(this, other) || other is PaginatedCollectionModelAllOfLinks && + other.jumpTo == jumpTo && + other.changeSize == changeSize; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (jumpTo.hashCode) + + (changeSize.hashCode); + + @override + String toString() => 'PaginatedCollectionModelAllOfLinks[jumpTo=$jumpTo, changeSize=$changeSize]'; + + Map toJson() { + final json = {}; + json[r'jumpTo'] = this.jumpTo; + json[r'changeSize'] = this.changeSize; + return json; + } + + /// Returns a new [PaginatedCollectionModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PaginatedCollectionModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "PaginatedCollectionModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PaginatedCollectionModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PaginatedCollectionModelAllOfLinks( + jumpTo: PaginatedCollectionModelAllOfLinksJumpTo.fromJson(json[r'jumpTo'])!, + changeSize: PaginatedCollectionModelAllOfLinksChangeSize.fromJson(json[r'changeSize'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PaginatedCollectionModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PaginatedCollectionModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PaginatedCollectionModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PaginatedCollectionModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'jumpTo', + 'changeSize', + }; +} + diff --git a/lib/model/paginated_collection_model_all_of_links_change_size.dart b/lib/model/paginated_collection_model_all_of_links_change_size.dart new file mode 100644 index 0000000..a4eef04 --- /dev/null +++ b/lib/model/paginated_collection_model_all_of_links_change_size.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PaginatedCollectionModelAllOfLinksChangeSize { + /// Returns a new [PaginatedCollectionModelAllOfLinksChangeSize] instance. + PaginatedCollectionModelAllOfLinksChangeSize({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is PaginatedCollectionModelAllOfLinksChangeSize && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'PaginatedCollectionModelAllOfLinksChangeSize[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [PaginatedCollectionModelAllOfLinksChangeSize] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PaginatedCollectionModelAllOfLinksChangeSize? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "PaginatedCollectionModelAllOfLinksChangeSize[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PaginatedCollectionModelAllOfLinksChangeSize[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PaginatedCollectionModelAllOfLinksChangeSize( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PaginatedCollectionModelAllOfLinksChangeSize.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PaginatedCollectionModelAllOfLinksChangeSize.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PaginatedCollectionModelAllOfLinksChangeSize-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PaginatedCollectionModelAllOfLinksChangeSize.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/paginated_collection_model_all_of_links_jump_to.dart b/lib/model/paginated_collection_model_all_of_links_jump_to.dart new file mode 100644 index 0000000..c0ab7a8 --- /dev/null +++ b/lib/model/paginated_collection_model_all_of_links_jump_to.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PaginatedCollectionModelAllOfLinksJumpTo { + /// Returns a new [PaginatedCollectionModelAllOfLinksJumpTo] instance. + PaginatedCollectionModelAllOfLinksJumpTo({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is PaginatedCollectionModelAllOfLinksJumpTo && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'PaginatedCollectionModelAllOfLinksJumpTo[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [PaginatedCollectionModelAllOfLinksJumpTo] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PaginatedCollectionModelAllOfLinksJumpTo? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "PaginatedCollectionModelAllOfLinksJumpTo[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PaginatedCollectionModelAllOfLinksJumpTo[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PaginatedCollectionModelAllOfLinksJumpTo( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PaginatedCollectionModelAllOfLinksJumpTo.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PaginatedCollectionModelAllOfLinksJumpTo.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PaginatedCollectionModelAllOfLinksJumpTo-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PaginatedCollectionModelAllOfLinksJumpTo.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/post_model.dart b/lib/model/post_model.dart new file mode 100644 index 0000000..d3af121 --- /dev/null +++ b/lib/model/post_model.dart @@ -0,0 +1,145 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PostModel { + /// Returns a new [PostModel] instance. + PostModel({ + this.id, + required this.subject, + this.links, + }); + + /// Identifier of this post + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// The post's subject + String subject; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + PostModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is PostModel && + other.id == id && + other.subject == subject && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (subject.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'PostModel[id=$id, subject=$subject, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + json[r'subject'] = this.subject; + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [PostModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PostModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "PostModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PostModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PostModel( + id: mapValueOfType(json, r'id'), + subject: mapValueOfType(json, r'subject')!, + links: PostModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PostModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PostModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PostModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PostModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'subject', + }; +} + diff --git a/lib/model/post_model_links.dart b/lib/model/post_model_links.dart new file mode 100644 index 0000000..d2fa3ab --- /dev/null +++ b/lib/model/post_model_links.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PostModelLinks { + /// Returns a new [PostModelLinks] instance. + PostModelLinks({ + this.addAttachment, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + PostModelLinksAddAttachment? addAttachment; + + @override + bool operator ==(Object other) => identical(this, other) || other is PostModelLinks && + other.addAttachment == addAttachment; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (addAttachment == null ? 0 : addAttachment!.hashCode); + + @override + String toString() => 'PostModelLinks[addAttachment=$addAttachment]'; + + Map toJson() { + final json = {}; + if (this.addAttachment != null) { + json[r'addAttachment'] = this.addAttachment; + } else { + json[r'addAttachment'] = null; + } + return json; + } + + /// Returns a new [PostModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PostModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "PostModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PostModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PostModelLinks( + addAttachment: PostModelLinksAddAttachment.fromJson(json[r'addAttachment']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PostModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PostModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PostModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PostModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/post_model_links_add_attachment.dart b/lib/model/post_model_links_add_attachment.dart new file mode 100644 index 0000000..7aee1ba --- /dev/null +++ b/lib/model/post_model_links_add_attachment.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PostModelLinksAddAttachment { + /// Returns a new [PostModelLinksAddAttachment] instance. + PostModelLinksAddAttachment({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is PostModelLinksAddAttachment && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'PostModelLinksAddAttachment[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [PostModelLinksAddAttachment] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PostModelLinksAddAttachment? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "PostModelLinksAddAttachment[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PostModelLinksAddAttachment[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PostModelLinksAddAttachment( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PostModelLinksAddAttachment.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PostModelLinksAddAttachment.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PostModelLinksAddAttachment-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PostModelLinksAddAttachment.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/priority_model.dart b/lib/model/priority_model.dart new file mode 100644 index 0000000..d5ed8ec --- /dev/null +++ b/lib/model/priority_model.dart @@ -0,0 +1,208 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PriorityModel { + /// Returns a new [PriorityModel] instance. + PriorityModel({ + this.id, + this.name, + this.position, + this.isDefault, + this.isActive, + this.links, + }); + + /// Priority id + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// Priority name + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? name; + + /// Sort index of the priority + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? position; + + /// Indicates whether this is the default value + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isDefault; + + /// Indicates whether the priority is available + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isActive; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + PriorityModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is PriorityModel && + other.id == id && + other.name == name && + other.position == position && + other.isDefault == isDefault && + other.isActive == isActive && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (position == null ? 0 : position!.hashCode) + + (isDefault == null ? 0 : isDefault!.hashCode) + + (isActive == null ? 0 : isActive!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'PriorityModel[id=$id, name=$name, position=$position, isDefault=$isDefault, isActive=$isActive, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.position != null) { + json[r'position'] = this.position; + } else { + json[r'position'] = null; + } + if (this.isDefault != null) { + json[r'isDefault'] = this.isDefault; + } else { + json[r'isDefault'] = null; + } + if (this.isActive != null) { + json[r'isActive'] = this.isActive; + } else { + json[r'isActive'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [PriorityModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PriorityModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "PriorityModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PriorityModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PriorityModel( + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name'), + position: mapValueOfType(json, r'position'), + isDefault: mapValueOfType(json, r'isDefault'), + isActive: mapValueOfType(json, r'isActive'), + links: PriorityModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PriorityModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PriorityModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PriorityModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PriorityModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/priority_model_links.dart b/lib/model/priority_model_links.dart new file mode 100644 index 0000000..3332c65 --- /dev/null +++ b/lib/model/priority_model_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PriorityModelLinks { + /// Returns a new [PriorityModelLinks] instance. + PriorityModelLinks({ + required this.self, + }); + + PriorityModelLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is PriorityModelLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'PriorityModelLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [PriorityModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PriorityModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "PriorityModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PriorityModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PriorityModelLinks( + self: PriorityModelLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PriorityModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PriorityModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PriorityModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PriorityModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/priority_model_links_self.dart b/lib/model/priority_model_links_self.dart new file mode 100644 index 0000000..a48ae2b --- /dev/null +++ b/lib/model/priority_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class PriorityModelLinksSelf { + /// Returns a new [PriorityModelLinksSelf] instance. + PriorityModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is PriorityModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'PriorityModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [PriorityModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PriorityModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "PriorityModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PriorityModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PriorityModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PriorityModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PriorityModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PriorityModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PriorityModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model.dart b/lib/model/project_model.dart new file mode 100644 index 0000000..033d939 --- /dev/null +++ b/lib/model/project_model.dart @@ -0,0 +1,360 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModel { + /// Returns a new [ProjectModel] instance. + ProjectModel({ + this.type, + this.id, + this.identifier, + this.name, + this.active, + this.statusExplanation, + this.public, + this.description, + this.createdAt, + this.updatedAt, + this.links, + }); + + ProjectModelTypeEnum? type; + + /// Projects' id + /// + /// Minimum value: 1 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? name; + + /// Indicates whether the project is currently active or already archived + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? active; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ProjectModelStatusExplanation? statusExplanation; + + /// Indicates whether the project is accessible for everybody + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? public; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Formattable? description; + + /// Time of creation + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? createdAt; + + /// Time of the most recent change to the project + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? updatedAt; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ProjectModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModel && + other.type == type && + other.id == id && + other.identifier == identifier && + other.name == name && + other.active == active && + other.statusExplanation == statusExplanation && + other.public == public && + other.description == description && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (id == null ? 0 : id!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (active == null ? 0 : active!.hashCode) + + (statusExplanation == null ? 0 : statusExplanation!.hashCode) + + (public == null ? 0 : public!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'ProjectModel[type=$type, id=$id, identifier=$identifier, name=$name, active=$active, statusExplanation=$statusExplanation, public=$public, description=$description, createdAt=$createdAt, updatedAt=$updatedAt, links=$links]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.active != null) { + json[r'active'] = this.active; + } else { + json[r'active'] = null; + } + if (this.statusExplanation != null) { + json[r'statusExplanation'] = this.statusExplanation; + } else { + json[r'statusExplanation'] = null; + } + if (this.public != null) { + json[r'public'] = this.public; + } else { + json[r'public'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String(); + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt!.toUtc().toIso8601String(); + } else { + json[r'updatedAt'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [ProjectModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModel( + type: ProjectModelTypeEnum.fromJson(json[r'_type']), + id: mapValueOfType(json, r'id'), + identifier: mapValueOfType(json, r'identifier'), + name: mapValueOfType(json, r'name'), + active: mapValueOfType(json, r'active'), + statusExplanation: ProjectModelStatusExplanation.fromJson(json[r'statusExplanation']), + public: mapValueOfType(json, r'public'), + description: Formattable.fromJson(json[r'description']), + createdAt: mapDateTime(json, r'createdAt', r''), + updatedAt: mapDateTime(json, r'updatedAt', r''), + links: ProjectModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + + +class ProjectModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const ProjectModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const project = ProjectModelTypeEnum._(r'Project'); + + /// List of all possible values in this [enum][ProjectModelTypeEnum]. + static const values = [ + project, + ]; + + static ProjectModelTypeEnum? fromJson(dynamic value) => ProjectModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [ProjectModelTypeEnum] to String, +/// and [decode] dynamic data back to [ProjectModelTypeEnum]. +class ProjectModelTypeEnumTypeTransformer { + factory ProjectModelTypeEnumTypeTransformer() => _instance ??= const ProjectModelTypeEnumTypeTransformer._(); + + const ProjectModelTypeEnumTypeTransformer._(); + + String encode(ProjectModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a ProjectModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + ProjectModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Project': return ProjectModelTypeEnum.project; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [ProjectModelTypeEnumTypeTransformer] instance. + static ProjectModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/project_model_links.dart b/lib/model/project_model_links.dart new file mode 100644 index 0000000..3f87098 --- /dev/null +++ b/lib/model/project_model_links.dart @@ -0,0 +1,275 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinks { + /// Returns a new [ProjectModelLinks] instance. + ProjectModelLinks({ + this.update, + this.updateImmediately, + this.delete, + this.createWorkPackage, + this.createWorkPackageImmediately, + required this.self, + required this.categories, + required this.types, + required this.versions, + required this.memberships, + required this.workPackages, + this.parent, + this.status, + this.storages = const [], + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ProjectModelLinksUpdate? update; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ProjectModelLinksUpdateImmediately? updateImmediately; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ProjectModelLinksDelete? delete; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ProjectModelLinksCreateWorkPackage? createWorkPackage; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ProjectModelLinksCreateWorkPackageImmediately? createWorkPackageImmediately; + + ProjectModelLinksSelf self; + + ProjectModelLinksCategories categories; + + ProjectModelLinksTypes types; + + ProjectModelLinksVersions versions; + + ProjectModelLinksMemberships memberships; + + ProjectModelLinksWorkPackages workPackages; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ProjectModelLinksParent? parent; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ProjectModelLinksStatus? status; + + List storages; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinks && + other.update == update && + other.updateImmediately == updateImmediately && + other.delete == delete && + other.createWorkPackage == createWorkPackage && + other.createWorkPackageImmediately == createWorkPackageImmediately && + other.self == self && + other.categories == categories && + other.types == types && + other.versions == versions && + other.memberships == memberships && + other.workPackages == workPackages && + other.parent == parent && + other.status == status && + _deepEquality.equals(other.storages, storages); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (update == null ? 0 : update!.hashCode) + + (updateImmediately == null ? 0 : updateImmediately!.hashCode) + + (delete == null ? 0 : delete!.hashCode) + + (createWorkPackage == null ? 0 : createWorkPackage!.hashCode) + + (createWorkPackageImmediately == null ? 0 : createWorkPackageImmediately!.hashCode) + + (self.hashCode) + + (categories.hashCode) + + (types.hashCode) + + (versions.hashCode) + + (memberships.hashCode) + + (workPackages.hashCode) + + (parent == null ? 0 : parent!.hashCode) + + (status == null ? 0 : status!.hashCode) + + (storages.hashCode); + + @override + String toString() => 'ProjectModelLinks[update=$update, updateImmediately=$updateImmediately, delete=$delete, createWorkPackage=$createWorkPackage, createWorkPackageImmediately=$createWorkPackageImmediately, self=$self, categories=$categories, types=$types, versions=$versions, memberships=$memberships, workPackages=$workPackages, parent=$parent, status=$status, storages=$storages]'; + + Map toJson() { + final json = {}; + if (this.update != null) { + json[r'update'] = this.update; + } else { + json[r'update'] = null; + } + if (this.updateImmediately != null) { + json[r'updateImmediately'] = this.updateImmediately; + } else { + json[r'updateImmediately'] = null; + } + if (this.delete != null) { + json[r'delete'] = this.delete; + } else { + json[r'delete'] = null; + } + if (this.createWorkPackage != null) { + json[r'createWorkPackage'] = this.createWorkPackage; + } else { + json[r'createWorkPackage'] = null; + } + if (this.createWorkPackageImmediately != null) { + json[r'createWorkPackageImmediately'] = this.createWorkPackageImmediately; + } else { + json[r'createWorkPackageImmediately'] = null; + } + json[r'self'] = this.self; + json[r'categories'] = this.categories; + json[r'types'] = this.types; + json[r'versions'] = this.versions; + json[r'memberships'] = this.memberships; + json[r'workPackages'] = this.workPackages; + if (this.parent != null) { + json[r'parent'] = this.parent; + } else { + json[r'parent'] = null; + } + if (this.status != null) { + json[r'status'] = this.status; + } else { + json[r'status'] = null; + } + json[r'storages'] = this.storages; + return json; + } + + /// Returns a new [ProjectModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinks( + update: ProjectModelLinksUpdate.fromJson(json[r'update']), + updateImmediately: ProjectModelLinksUpdateImmediately.fromJson(json[r'updateImmediately']), + delete: ProjectModelLinksDelete.fromJson(json[r'delete']), + createWorkPackage: ProjectModelLinksCreateWorkPackage.fromJson(json[r'createWorkPackage']), + createWorkPackageImmediately: ProjectModelLinksCreateWorkPackageImmediately.fromJson(json[r'createWorkPackageImmediately']), + self: ProjectModelLinksSelf.fromJson(json[r'self'])!, + categories: ProjectModelLinksCategories.fromJson(json[r'categories'])!, + types: ProjectModelLinksTypes.fromJson(json[r'types'])!, + versions: ProjectModelLinksVersions.fromJson(json[r'versions'])!, + memberships: ProjectModelLinksMemberships.fromJson(json[r'memberships'])!, + workPackages: ProjectModelLinksWorkPackages.fromJson(json[r'workPackages'])!, + parent: ProjectModelLinksParent.fromJson(json[r'parent']), + status: ProjectModelLinksStatus.fromJson(json[r'status']), + storages: ProjectModelLinksStoragesInner.listFromJson(json[r'storages']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'categories', + 'types', + 'versions', + 'memberships', + 'workPackages', + }; +} + diff --git a/lib/model/project_model_links_categories.dart b/lib/model/project_model_links_categories.dart new file mode 100644 index 0000000..aa226cf --- /dev/null +++ b/lib/model/project_model_links_categories.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinksCategories { + /// Returns a new [ProjectModelLinksCategories] instance. + ProjectModelLinksCategories({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinksCategories && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectModelLinksCategories[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectModelLinksCategories] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinksCategories? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinksCategories[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinksCategories[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinksCategories( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinksCategories.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinksCategories.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinksCategories-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinksCategories.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model_links_create_work_package.dart b/lib/model/project_model_links_create_work_package.dart new file mode 100644 index 0000000..604af3c --- /dev/null +++ b/lib/model/project_model_links_create_work_package.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinksCreateWorkPackage { + /// Returns a new [ProjectModelLinksCreateWorkPackage] instance. + ProjectModelLinksCreateWorkPackage({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinksCreateWorkPackage && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectModelLinksCreateWorkPackage[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectModelLinksCreateWorkPackage] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinksCreateWorkPackage? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinksCreateWorkPackage[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinksCreateWorkPackage[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinksCreateWorkPackage( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinksCreateWorkPackage.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinksCreateWorkPackage.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinksCreateWorkPackage-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinksCreateWorkPackage.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model_links_create_work_package_immediately.dart b/lib/model/project_model_links_create_work_package_immediately.dart new file mode 100644 index 0000000..b1907cd --- /dev/null +++ b/lib/model/project_model_links_create_work_package_immediately.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinksCreateWorkPackageImmediately { + /// Returns a new [ProjectModelLinksCreateWorkPackageImmediately] instance. + ProjectModelLinksCreateWorkPackageImmediately({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinksCreateWorkPackageImmediately && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectModelLinksCreateWorkPackageImmediately[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectModelLinksCreateWorkPackageImmediately] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinksCreateWorkPackageImmediately? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinksCreateWorkPackageImmediately[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinksCreateWorkPackageImmediately[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinksCreateWorkPackageImmediately( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinksCreateWorkPackageImmediately.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinksCreateWorkPackageImmediately.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinksCreateWorkPackageImmediately-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinksCreateWorkPackageImmediately.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model_links_delete.dart b/lib/model/project_model_links_delete.dart new file mode 100644 index 0000000..cc2ac28 --- /dev/null +++ b/lib/model/project_model_links_delete.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinksDelete { + /// Returns a new [ProjectModelLinksDelete] instance. + ProjectModelLinksDelete({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinksDelete && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectModelLinksDelete[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectModelLinksDelete] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinksDelete? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinksDelete[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinksDelete[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinksDelete( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinksDelete.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinksDelete.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinksDelete-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinksDelete.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model_links_memberships.dart b/lib/model/project_model_links_memberships.dart new file mode 100644 index 0000000..79954ed --- /dev/null +++ b/lib/model/project_model_links_memberships.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinksMemberships { + /// Returns a new [ProjectModelLinksMemberships] instance. + ProjectModelLinksMemberships({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinksMemberships && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectModelLinksMemberships[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectModelLinksMemberships] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinksMemberships? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinksMemberships[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinksMemberships[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinksMemberships( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinksMemberships.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinksMemberships.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinksMemberships-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinksMemberships.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model_links_parent.dart b/lib/model/project_model_links_parent.dart new file mode 100644 index 0000000..6c7a6bb --- /dev/null +++ b/lib/model/project_model_links_parent.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinksParent { + /// Returns a new [ProjectModelLinksParent] instance. + ProjectModelLinksParent({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinksParent && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectModelLinksParent[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectModelLinksParent] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinksParent? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinksParent[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinksParent[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinksParent( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinksParent.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinksParent.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinksParent-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinksParent.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model_links_self.dart b/lib/model/project_model_links_self.dart new file mode 100644 index 0000000..08bae3b --- /dev/null +++ b/lib/model/project_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinksSelf { + /// Returns a new [ProjectModelLinksSelf] instance. + ProjectModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model_links_status.dart b/lib/model/project_model_links_status.dart new file mode 100644 index 0000000..a1c8c35 --- /dev/null +++ b/lib/model/project_model_links_status.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinksStatus { + /// Returns a new [ProjectModelLinksStatus] instance. + ProjectModelLinksStatus({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinksStatus && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectModelLinksStatus[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectModelLinksStatus] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinksStatus? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinksStatus[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinksStatus[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinksStatus( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinksStatus.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinksStatus.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinksStatus-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinksStatus.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model_links_storages_inner.dart b/lib/model/project_model_links_storages_inner.dart new file mode 100644 index 0000000..d44aadd --- /dev/null +++ b/lib/model/project_model_links_storages_inner.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinksStoragesInner { + /// Returns a new [ProjectModelLinksStoragesInner] instance. + ProjectModelLinksStoragesInner({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinksStoragesInner && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectModelLinksStoragesInner[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectModelLinksStoragesInner] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinksStoragesInner? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinksStoragesInner[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinksStoragesInner[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinksStoragesInner( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinksStoragesInner.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinksStoragesInner.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinksStoragesInner-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinksStoragesInner.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model_links_types.dart b/lib/model/project_model_links_types.dart new file mode 100644 index 0000000..b1b8813 --- /dev/null +++ b/lib/model/project_model_links_types.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinksTypes { + /// Returns a new [ProjectModelLinksTypes] instance. + ProjectModelLinksTypes({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinksTypes && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectModelLinksTypes[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectModelLinksTypes] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinksTypes? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinksTypes[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinksTypes[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinksTypes( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinksTypes.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinksTypes.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinksTypes-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinksTypes.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model_links_update.dart b/lib/model/project_model_links_update.dart new file mode 100644 index 0000000..b6f8adb --- /dev/null +++ b/lib/model/project_model_links_update.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinksUpdate { + /// Returns a new [ProjectModelLinksUpdate] instance. + ProjectModelLinksUpdate({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinksUpdate && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectModelLinksUpdate[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectModelLinksUpdate] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinksUpdate? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinksUpdate[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinksUpdate[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinksUpdate( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinksUpdate.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinksUpdate.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinksUpdate-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinksUpdate.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model_links_update_immediately.dart b/lib/model/project_model_links_update_immediately.dart new file mode 100644 index 0000000..2a78175 --- /dev/null +++ b/lib/model/project_model_links_update_immediately.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinksUpdateImmediately { + /// Returns a new [ProjectModelLinksUpdateImmediately] instance. + ProjectModelLinksUpdateImmediately({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinksUpdateImmediately && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectModelLinksUpdateImmediately[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectModelLinksUpdateImmediately] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinksUpdateImmediately? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinksUpdateImmediately[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinksUpdateImmediately[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinksUpdateImmediately( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinksUpdateImmediately.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinksUpdateImmediately.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinksUpdateImmediately-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinksUpdateImmediately.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model_links_versions.dart b/lib/model/project_model_links_versions.dart new file mode 100644 index 0000000..d28b06b --- /dev/null +++ b/lib/model/project_model_links_versions.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinksVersions { + /// Returns a new [ProjectModelLinksVersions] instance. + ProjectModelLinksVersions({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinksVersions && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectModelLinksVersions[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectModelLinksVersions] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinksVersions? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinksVersions[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinksVersions[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinksVersions( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinksVersions.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinksVersions.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinksVersions-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinksVersions.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model_links_work_packages.dart b/lib/model/project_model_links_work_packages.dart new file mode 100644 index 0000000..6663944 --- /dev/null +++ b/lib/model/project_model_links_work_packages.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelLinksWorkPackages { + /// Returns a new [ProjectModelLinksWorkPackages] instance. + ProjectModelLinksWorkPackages({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelLinksWorkPackages && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectModelLinksWorkPackages[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectModelLinksWorkPackages] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelLinksWorkPackages? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelLinksWorkPackages[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelLinksWorkPackages[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelLinksWorkPackages( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelLinksWorkPackages.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelLinksWorkPackages.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelLinksWorkPackages-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelLinksWorkPackages.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_model_status_explanation.dart b/lib/model/project_model_status_explanation.dart new file mode 100644 index 0000000..2d9fbdd --- /dev/null +++ b/lib/model/project_model_status_explanation.dart @@ -0,0 +1,223 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectModelStatusExplanation { + /// Returns a new [ProjectModelStatusExplanation] instance. + ProjectModelStatusExplanation({ + required this.format, + this.raw, + this.html, + }); + + /// Indicates the formatting language of the raw text + ProjectModelStatusExplanationFormatEnum format; + + /// The raw text, as entered by the user + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? raw; + + /// The text converted to HTML according to the format + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? html; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectModelStatusExplanation && + other.format == format && + other.raw == raw && + other.html == html; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (format.hashCode) + + (raw == null ? 0 : raw!.hashCode) + + (html == null ? 0 : html!.hashCode); + + @override + String toString() => 'ProjectModelStatusExplanation[format=$format, raw=$raw, html=$html]'; + + Map toJson() { + final json = {}; + json[r'format'] = this.format; + if (this.raw != null) { + json[r'raw'] = this.raw; + } else { + json[r'raw'] = null; + } + if (this.html != null) { + json[r'html'] = this.html; + } else { + json[r'html'] = null; + } + return json; + } + + /// Returns a new [ProjectModelStatusExplanation] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectModelStatusExplanation? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectModelStatusExplanation[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectModelStatusExplanation[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectModelStatusExplanation( + format: ProjectModelStatusExplanationFormatEnum.fromJson(json[r'format'])!, + raw: mapValueOfType(json, r'raw'), + html: mapValueOfType(json, r'html'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelStatusExplanation.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectModelStatusExplanation.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectModelStatusExplanation-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectModelStatusExplanation.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'format', + }; +} + +/// Indicates the formatting language of the raw text +class ProjectModelStatusExplanationFormatEnum { + /// Instantiate a new enum with the provided [value]. + const ProjectModelStatusExplanationFormatEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const plain = ProjectModelStatusExplanationFormatEnum._(r'plain'); + static const markdown = ProjectModelStatusExplanationFormatEnum._(r'markdown'); + static const custom = ProjectModelStatusExplanationFormatEnum._(r'custom'); + + /// List of all possible values in this [enum][ProjectModelStatusExplanationFormatEnum]. + static const values = [ + plain, + markdown, + custom, + ]; + + static ProjectModelStatusExplanationFormatEnum? fromJson(dynamic value) => ProjectModelStatusExplanationFormatEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectModelStatusExplanationFormatEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [ProjectModelStatusExplanationFormatEnum] to String, +/// and [decode] dynamic data back to [ProjectModelStatusExplanationFormatEnum]. +class ProjectModelStatusExplanationFormatEnumTypeTransformer { + factory ProjectModelStatusExplanationFormatEnumTypeTransformer() => _instance ??= const ProjectModelStatusExplanationFormatEnumTypeTransformer._(); + + const ProjectModelStatusExplanationFormatEnumTypeTransformer._(); + + String encode(ProjectModelStatusExplanationFormatEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a ProjectModelStatusExplanationFormatEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + ProjectModelStatusExplanationFormatEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'plain': return ProjectModelStatusExplanationFormatEnum.plain; + case r'markdown': return ProjectModelStatusExplanationFormatEnum.markdown; + case r'custom': return ProjectModelStatusExplanationFormatEnum.custom; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [ProjectModelStatusExplanationFormatEnumTypeTransformer] instance. + static ProjectModelStatusExplanationFormatEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/project_storage_collection_model.dart b/lib/model/project_storage_collection_model.dart new file mode 100644 index 0000000..ef8fe85 --- /dev/null +++ b/lib/model/project_storage_collection_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectStorageCollectionModel { + /// Returns a new [ProjectStorageCollectionModel] instance. + ProjectStorageCollectionModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.embedded, + }); + + ProjectStorageCollectionModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + ProjectStorageCollectionModelAllOfLinks links; + + ProjectStorageCollectionModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectStorageCollectionModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'ProjectStorageCollectionModel[type=$type, total=$total, count=$count, links=$links, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [ProjectStorageCollectionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectStorageCollectionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectStorageCollectionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectStorageCollectionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectStorageCollectionModel( + type: ProjectStorageCollectionModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: ProjectStorageCollectionModelAllOfLinks.fromJson(json[r'_links'])!, + embedded: ProjectStorageCollectionModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectStorageCollectionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectStorageCollectionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectStorageCollectionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectStorageCollectionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + '_embedded', + }; +} + + +class ProjectStorageCollectionModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const ProjectStorageCollectionModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = ProjectStorageCollectionModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][ProjectStorageCollectionModelTypeEnum]. + static const values = [ + collection, + ]; + + static ProjectStorageCollectionModelTypeEnum? fromJson(dynamic value) => ProjectStorageCollectionModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectStorageCollectionModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [ProjectStorageCollectionModelTypeEnum] to String, +/// and [decode] dynamic data back to [ProjectStorageCollectionModelTypeEnum]. +class ProjectStorageCollectionModelTypeEnumTypeTransformer { + factory ProjectStorageCollectionModelTypeEnumTypeTransformer() => _instance ??= const ProjectStorageCollectionModelTypeEnumTypeTransformer._(); + + const ProjectStorageCollectionModelTypeEnumTypeTransformer._(); + + String encode(ProjectStorageCollectionModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a ProjectStorageCollectionModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + ProjectStorageCollectionModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return ProjectStorageCollectionModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [ProjectStorageCollectionModelTypeEnumTypeTransformer] instance. + static ProjectStorageCollectionModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/project_storage_collection_model_all_of_embedded.dart b/lib/model/project_storage_collection_model_all_of_embedded.dart new file mode 100644 index 0000000..df8296a --- /dev/null +++ b/lib/model/project_storage_collection_model_all_of_embedded.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectStorageCollectionModelAllOfEmbedded { + /// Returns a new [ProjectStorageCollectionModelAllOfEmbedded] instance. + ProjectStorageCollectionModelAllOfEmbedded({ + this.elements = const [], + }); + + List elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectStorageCollectionModelAllOfEmbedded && + _deepEquality.equals(other.elements, elements); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements.hashCode); + + @override + String toString() => 'ProjectStorageCollectionModelAllOfEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + json[r'elements'] = this.elements; + return json; + } + + /// Returns a new [ProjectStorageCollectionModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectStorageCollectionModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectStorageCollectionModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectStorageCollectionModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectStorageCollectionModelAllOfEmbedded( + elements: ProjectStorageModel.listFromJson(json[r'elements']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectStorageCollectionModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectStorageCollectionModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectStorageCollectionModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectStorageCollectionModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'elements', + }; +} + diff --git a/lib/model/project_storage_collection_model_all_of_links.dart b/lib/model/project_storage_collection_model_all_of_links.dart new file mode 100644 index 0000000..76a816c --- /dev/null +++ b/lib/model/project_storage_collection_model_all_of_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectStorageCollectionModelAllOfLinks { + /// Returns a new [ProjectStorageCollectionModelAllOfLinks] instance. + ProjectStorageCollectionModelAllOfLinks({ + required this.self, + }); + + ProjectStorageCollectionModelAllOfLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectStorageCollectionModelAllOfLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'ProjectStorageCollectionModelAllOfLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [ProjectStorageCollectionModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectStorageCollectionModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectStorageCollectionModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectStorageCollectionModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectStorageCollectionModelAllOfLinks( + self: ProjectStorageCollectionModelAllOfLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectStorageCollectionModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectStorageCollectionModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectStorageCollectionModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectStorageCollectionModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/project_storage_collection_model_all_of_links_self.dart b/lib/model/project_storage_collection_model_all_of_links_self.dart new file mode 100644 index 0000000..ca64244 --- /dev/null +++ b/lib/model/project_storage_collection_model_all_of_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectStorageCollectionModelAllOfLinksSelf { + /// Returns a new [ProjectStorageCollectionModelAllOfLinksSelf] instance. + ProjectStorageCollectionModelAllOfLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectStorageCollectionModelAllOfLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectStorageCollectionModelAllOfLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectStorageCollectionModelAllOfLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectStorageCollectionModelAllOfLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectStorageCollectionModelAllOfLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectStorageCollectionModelAllOfLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectStorageCollectionModelAllOfLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectStorageCollectionModelAllOfLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectStorageCollectionModelAllOfLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectStorageCollectionModelAllOfLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectStorageCollectionModelAllOfLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_storage_model.dart b/lib/model/project_storage_model.dart new file mode 100644 index 0000000..a2f82a6 --- /dev/null +++ b/lib/model/project_storage_model.dart @@ -0,0 +1,308 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectStorageModel { + /// Returns a new [ProjectStorageModel] instance. + ProjectStorageModel({ + required this.type, + required this.id, + required this.projectFolderMode, + required this.createdAt, + required this.updatedAt, + this.links, + }); + + ProjectStorageModelTypeEnum type; + + /// The project storage's id + /// + /// Minimum value: 1 + int id; + + ProjectStorageModelProjectFolderModeEnum projectFolderMode; + + /// Time of creation + DateTime createdAt; + + /// Time of the most recent change to the project storage + DateTime updatedAt; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ProjectStorageModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectStorageModel && + other.type == type && + other.id == id && + other.projectFolderMode == projectFolderMode && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (id.hashCode) + + (projectFolderMode.hashCode) + + (createdAt.hashCode) + + (updatedAt.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'ProjectStorageModel[type=$type, id=$id, projectFolderMode=$projectFolderMode, createdAt=$createdAt, updatedAt=$updatedAt, links=$links]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'id'] = this.id; + json[r'projectFolderMode'] = this.projectFolderMode; + json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); + json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [ProjectStorageModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectStorageModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectStorageModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectStorageModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectStorageModel( + type: ProjectStorageModelTypeEnum.fromJson(json[r'_type'])!, + id: mapValueOfType(json, r'id')!, + projectFolderMode: ProjectStorageModelProjectFolderModeEnum.fromJson(json[r'projectFolderMode'])!, + createdAt: mapDateTime(json, r'createdAt', r'')!, + updatedAt: mapDateTime(json, r'updatedAt', r'')!, + links: ProjectStorageModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectStorageModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectStorageModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectStorageModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectStorageModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'id', + 'projectFolderMode', + 'createdAt', + 'updatedAt', + }; +} + + +class ProjectStorageModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const ProjectStorageModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const projectStorage = ProjectStorageModelTypeEnum._(r'ProjectStorage'); + + /// List of all possible values in this [enum][ProjectStorageModelTypeEnum]. + static const values = [ + projectStorage, + ]; + + static ProjectStorageModelTypeEnum? fromJson(dynamic value) => ProjectStorageModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectStorageModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [ProjectStorageModelTypeEnum] to String, +/// and [decode] dynamic data back to [ProjectStorageModelTypeEnum]. +class ProjectStorageModelTypeEnumTypeTransformer { + factory ProjectStorageModelTypeEnumTypeTransformer() => _instance ??= const ProjectStorageModelTypeEnumTypeTransformer._(); + + const ProjectStorageModelTypeEnumTypeTransformer._(); + + String encode(ProjectStorageModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a ProjectStorageModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + ProjectStorageModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'ProjectStorage': return ProjectStorageModelTypeEnum.projectStorage; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [ProjectStorageModelTypeEnumTypeTransformer] instance. + static ProjectStorageModelTypeEnumTypeTransformer? _instance; +} + + + +class ProjectStorageModelProjectFolderModeEnum { + /// Instantiate a new enum with the provided [value]. + const ProjectStorageModelProjectFolderModeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const inactive = ProjectStorageModelProjectFolderModeEnum._(r'inactive'); + static const manual = ProjectStorageModelProjectFolderModeEnum._(r'manual'); + + /// List of all possible values in this [enum][ProjectStorageModelProjectFolderModeEnum]. + static const values = [ + inactive, + manual, + ]; + + static ProjectStorageModelProjectFolderModeEnum? fromJson(dynamic value) => ProjectStorageModelProjectFolderModeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectStorageModelProjectFolderModeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [ProjectStorageModelProjectFolderModeEnum] to String, +/// and [decode] dynamic data back to [ProjectStorageModelProjectFolderModeEnum]. +class ProjectStorageModelProjectFolderModeEnumTypeTransformer { + factory ProjectStorageModelProjectFolderModeEnumTypeTransformer() => _instance ??= const ProjectStorageModelProjectFolderModeEnumTypeTransformer._(); + + const ProjectStorageModelProjectFolderModeEnumTypeTransformer._(); + + String encode(ProjectStorageModelProjectFolderModeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a ProjectStorageModelProjectFolderModeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + ProjectStorageModelProjectFolderModeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'inactive': return ProjectStorageModelProjectFolderModeEnum.inactive; + case r'manual': return ProjectStorageModelProjectFolderModeEnum.manual; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [ProjectStorageModelProjectFolderModeEnumTypeTransformer] instance. + static ProjectStorageModelProjectFolderModeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/project_storage_model_links.dart b/lib/model/project_storage_model_links.dart new file mode 100644 index 0000000..06080cc --- /dev/null +++ b/lib/model/project_storage_model_links.dart @@ -0,0 +1,150 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectStorageModelLinks { + /// Returns a new [ProjectStorageModelLinks] instance. + ProjectStorageModelLinks({ + required this.self, + required this.creator, + required this.storage, + required this.project, + this.projectFolder, + }); + + ProjectStorageModelLinksSelf self; + + ProjectStorageModelLinksCreator creator; + + ProjectStorageModelLinksStorage storage; + + ProjectStorageModelLinksProject project; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ProjectStorageModelLinksProjectFolder? projectFolder; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectStorageModelLinks && + other.self == self && + other.creator == creator && + other.storage == storage && + other.project == project && + other.projectFolder == projectFolder; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (creator.hashCode) + + (storage.hashCode) + + (project.hashCode) + + (projectFolder == null ? 0 : projectFolder!.hashCode); + + @override + String toString() => 'ProjectStorageModelLinks[self=$self, creator=$creator, storage=$storage, project=$project, projectFolder=$projectFolder]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'creator'] = this.creator; + json[r'storage'] = this.storage; + json[r'project'] = this.project; + if (this.projectFolder != null) { + json[r'projectFolder'] = this.projectFolder; + } else { + json[r'projectFolder'] = null; + } + return json; + } + + /// Returns a new [ProjectStorageModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectStorageModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectStorageModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectStorageModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectStorageModelLinks( + self: ProjectStorageModelLinksSelf.fromJson(json[r'self'])!, + creator: ProjectStorageModelLinksCreator.fromJson(json[r'creator'])!, + storage: ProjectStorageModelLinksStorage.fromJson(json[r'storage'])!, + project: ProjectStorageModelLinksProject.fromJson(json[r'project'])!, + projectFolder: ProjectStorageModelLinksProjectFolder.fromJson(json[r'projectFolder']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectStorageModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectStorageModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectStorageModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectStorageModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'creator', + 'storage', + 'project', + }; +} + diff --git a/lib/model/project_storage_model_links_creator.dart b/lib/model/project_storage_model_links_creator.dart new file mode 100644 index 0000000..1eed6bf --- /dev/null +++ b/lib/model/project_storage_model_links_creator.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectStorageModelLinksCreator { + /// Returns a new [ProjectStorageModelLinksCreator] instance. + ProjectStorageModelLinksCreator({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectStorageModelLinksCreator && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectStorageModelLinksCreator[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectStorageModelLinksCreator] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectStorageModelLinksCreator? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectStorageModelLinksCreator[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectStorageModelLinksCreator[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectStorageModelLinksCreator( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectStorageModelLinksCreator.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectStorageModelLinksCreator.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectStorageModelLinksCreator-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectStorageModelLinksCreator.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_storage_model_links_project.dart b/lib/model/project_storage_model_links_project.dart new file mode 100644 index 0000000..3320360 --- /dev/null +++ b/lib/model/project_storage_model_links_project.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectStorageModelLinksProject { + /// Returns a new [ProjectStorageModelLinksProject] instance. + ProjectStorageModelLinksProject({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectStorageModelLinksProject && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectStorageModelLinksProject[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectStorageModelLinksProject] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectStorageModelLinksProject? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectStorageModelLinksProject[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectStorageModelLinksProject[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectStorageModelLinksProject( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectStorageModelLinksProject.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectStorageModelLinksProject.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectStorageModelLinksProject-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectStorageModelLinksProject.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_storage_model_links_project_folder.dart b/lib/model/project_storage_model_links_project_folder.dart new file mode 100644 index 0000000..770565a --- /dev/null +++ b/lib/model/project_storage_model_links_project_folder.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectStorageModelLinksProjectFolder { + /// Returns a new [ProjectStorageModelLinksProjectFolder] instance. + ProjectStorageModelLinksProjectFolder({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectStorageModelLinksProjectFolder && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectStorageModelLinksProjectFolder[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectStorageModelLinksProjectFolder] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectStorageModelLinksProjectFolder? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectStorageModelLinksProjectFolder[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectStorageModelLinksProjectFolder[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectStorageModelLinksProjectFolder( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectStorageModelLinksProjectFolder.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectStorageModelLinksProjectFolder.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectStorageModelLinksProjectFolder-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectStorageModelLinksProjectFolder.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_storage_model_links_self.dart b/lib/model/project_storage_model_links_self.dart new file mode 100644 index 0000000..ddc107d --- /dev/null +++ b/lib/model/project_storage_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectStorageModelLinksSelf { + /// Returns a new [ProjectStorageModelLinksSelf] instance. + ProjectStorageModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectStorageModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectStorageModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectStorageModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectStorageModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectStorageModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectStorageModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectStorageModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectStorageModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectStorageModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectStorageModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectStorageModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/project_storage_model_links_storage.dart b/lib/model/project_storage_model_links_storage.dart new file mode 100644 index 0000000..b3cfb7d --- /dev/null +++ b/lib/model/project_storage_model_links_storage.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ProjectStorageModelLinksStorage { + /// Returns a new [ProjectStorageModelLinksStorage] instance. + ProjectStorageModelLinksStorage({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ProjectStorageModelLinksStorage && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ProjectStorageModelLinksStorage[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ProjectStorageModelLinksStorage] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ProjectStorageModelLinksStorage? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ProjectStorageModelLinksStorage[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ProjectStorageModelLinksStorage[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ProjectStorageModelLinksStorage( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ProjectStorageModelLinksStorage.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ProjectStorageModelLinksStorage.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ProjectStorageModelLinksStorage-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ProjectStorageModelLinksStorage.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/query_column_model.dart b/lib/model/query_column_model.dart new file mode 100644 index 0000000..c856328 --- /dev/null +++ b/lib/model/query_column_model.dart @@ -0,0 +1,127 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryColumnModel { + /// Returns a new [QueryColumnModel] instance. + QueryColumnModel({ + required this.id, + required this.name, + }); + + /// Query column id + Object? id; + + /// Query column name + Object? name; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryColumnModel && + other.id == id && + other.name == name; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode); + + @override + String toString() => 'QueryColumnModel[id=$id, name=$name]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + return json; + } + + /// Returns a new [QueryColumnModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryColumnModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryColumnModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryColumnModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryColumnModel( + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryColumnModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryColumnModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryColumnModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryColumnModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'name', + }; +} + diff --git a/lib/model/query_create_form.dart b/lib/model/query_create_form.dart new file mode 100644 index 0000000..94d4ec2 --- /dev/null +++ b/lib/model/query_create_form.dart @@ -0,0 +1,113 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryCreateForm { + /// Returns a new [QueryCreateForm] instance. + QueryCreateForm({ + this.name, + }); + + /// Query name. + Object? name; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryCreateForm && + other.name == name; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (name == null ? 0 : name!.hashCode); + + @override + String toString() => 'QueryCreateForm[name=$name]'; + + Map toJson() { + final json = {}; + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + return json; + } + + /// Returns a new [QueryCreateForm] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryCreateForm? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryCreateForm[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryCreateForm[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryCreateForm( + name: mapValueOfType(json, r'name'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryCreateForm.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryCreateForm.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryCreateForm-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryCreateForm.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/query_filter_instance_schema_model.dart b/lib/model/query_filter_instance_schema_model.dart new file mode 100644 index 0000000..dfea01c --- /dev/null +++ b/lib/model/query_filter_instance_schema_model.dart @@ -0,0 +1,144 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryFilterInstanceSchemaModel { + /// Returns a new [QueryFilterInstanceSchemaModel] instance. + QueryFilterInstanceSchemaModel({ + required this.name, + required this.filter, + this.links, + }); + + /// Describes the name attribute + Object? name; + + /// QuerySortBy name + Object? filter; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + QueryFilterInstanceSchemaModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryFilterInstanceSchemaModel && + other.name == name && + other.filter == filter && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (name == null ? 0 : name!.hashCode) + + (filter == null ? 0 : filter!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'QueryFilterInstanceSchemaModel[name=$name, filter=$filter, links=$links]'; + + Map toJson() { + final json = {}; + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.filter != null) { + json[r'filter'] = this.filter; + } else { + json[r'filter'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [QueryFilterInstanceSchemaModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryFilterInstanceSchemaModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryFilterInstanceSchemaModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryFilterInstanceSchemaModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryFilterInstanceSchemaModel( + name: mapValueOfType(json, r'name'), + filter: mapValueOfType(json, r'filter'), + links: QueryFilterInstanceSchemaModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryFilterInstanceSchemaModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryFilterInstanceSchemaModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryFilterInstanceSchemaModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryFilterInstanceSchemaModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'name', + 'filter', + }; +} + diff --git a/lib/model/query_filter_instance_schema_model_links.dart b/lib/model/query_filter_instance_schema_model_links.dart new file mode 100644 index 0000000..4222e7a --- /dev/null +++ b/lib/model/query_filter_instance_schema_model_links.dart @@ -0,0 +1,117 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryFilterInstanceSchemaModelLinks { + /// Returns a new [QueryFilterInstanceSchemaModelLinks] instance. + QueryFilterInstanceSchemaModelLinks({ + required this.self, + required this.filter, + }); + + QueryFilterInstanceSchemaModelLinksSelf self; + + QueryFilterInstanceSchemaModelLinksFilter filter; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryFilterInstanceSchemaModelLinks && + other.self == self && + other.filter == filter; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (filter.hashCode); + + @override + String toString() => 'QueryFilterInstanceSchemaModelLinks[self=$self, filter=$filter]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'filter'] = this.filter; + return json; + } + + /// Returns a new [QueryFilterInstanceSchemaModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryFilterInstanceSchemaModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryFilterInstanceSchemaModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryFilterInstanceSchemaModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryFilterInstanceSchemaModelLinks( + self: QueryFilterInstanceSchemaModelLinksSelf.fromJson(json[r'self'])!, + filter: QueryFilterInstanceSchemaModelLinksFilter.fromJson(json[r'filter'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryFilterInstanceSchemaModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryFilterInstanceSchemaModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryFilterInstanceSchemaModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryFilterInstanceSchemaModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'filter', + }; +} + diff --git a/lib/model/query_filter_instance_schema_model_links_filter.dart b/lib/model/query_filter_instance_schema_model_links_filter.dart new file mode 100644 index 0000000..b547125 --- /dev/null +++ b/lib/model/query_filter_instance_schema_model_links_filter.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryFilterInstanceSchemaModelLinksFilter { + /// Returns a new [QueryFilterInstanceSchemaModelLinksFilter] instance. + QueryFilterInstanceSchemaModelLinksFilter({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryFilterInstanceSchemaModelLinksFilter && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'QueryFilterInstanceSchemaModelLinksFilter[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [QueryFilterInstanceSchemaModelLinksFilter] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryFilterInstanceSchemaModelLinksFilter? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryFilterInstanceSchemaModelLinksFilter[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryFilterInstanceSchemaModelLinksFilter[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryFilterInstanceSchemaModelLinksFilter( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryFilterInstanceSchemaModelLinksFilter.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryFilterInstanceSchemaModelLinksFilter.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryFilterInstanceSchemaModelLinksFilter-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryFilterInstanceSchemaModelLinksFilter.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/query_filter_instance_schema_model_links_self.dart b/lib/model/query_filter_instance_schema_model_links_self.dart new file mode 100644 index 0000000..44a0172 --- /dev/null +++ b/lib/model/query_filter_instance_schema_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryFilterInstanceSchemaModelLinksSelf { + /// Returns a new [QueryFilterInstanceSchemaModelLinksSelf] instance. + QueryFilterInstanceSchemaModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryFilterInstanceSchemaModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'QueryFilterInstanceSchemaModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [QueryFilterInstanceSchemaModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryFilterInstanceSchemaModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryFilterInstanceSchemaModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryFilterInstanceSchemaModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryFilterInstanceSchemaModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryFilterInstanceSchemaModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryFilterInstanceSchemaModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryFilterInstanceSchemaModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryFilterInstanceSchemaModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/query_filter_model.dart b/lib/model/query_filter_model.dart new file mode 100644 index 0000000..5fa1510 --- /dev/null +++ b/lib/model/query_filter_model.dart @@ -0,0 +1,114 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryFilterModel { + /// Returns a new [QueryFilterModel] instance. + QueryFilterModel({ + required this.id, + }); + + /// QueryFilter id + Object? id; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryFilterModel && + other.id == id; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode); + + @override + String toString() => 'QueryFilterModel[id=$id]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + return json; + } + + /// Returns a new [QueryFilterModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryFilterModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryFilterModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryFilterModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryFilterModel( + id: mapValueOfType(json, r'id'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryFilterModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryFilterModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryFilterModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryFilterModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + }; +} + diff --git a/lib/model/query_model.dart b/lib/model/query_model.dart new file mode 100644 index 0000000..378f69c --- /dev/null +++ b/lib/model/query_model.dart @@ -0,0 +1,322 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryModel { + /// Returns a new [QueryModel] instance. + QueryModel({ + this.id, + this.name, + this.filters = const [], + this.sums, + this.timelineVisible, + this.timelineLabels = const [], + this.timelineZoomLevel, + this.timestamps, + this.highlightingMode, + this.showHierarchies, + this.hidden, + this.public, + this.starred, + required this.createdAt, + required this.updatedAt, + this.links, + }); + + /// Query id + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// Query name + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? name; + + List filters; + + /// Should sums (of supported properties) be shown? + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? sums; + + /// Should the timeline mode be shown? + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? timelineVisible; + + List timelineLabels; + + /// Which zoom level should the timeline be rendered in? + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? timelineZoomLevel; + + /// Timestamps to filter by when showing changed attributes on work packages. + Object? timestamps; + + /// Which highlighting mode should the table have? + Object? highlightingMode; + + /// Should the hierarchy mode be enabled? + Object? showHierarchies; + + /// Should the query be hidden from the query list? + Object? hidden; + + /// Can users besides the owner see the query? + Object? public; + + /// Should the query be highlighted to the user? + Object? starred; + + /// Time of creation + Object? createdAt; + + /// Time of the most recent change to the query + Object? updatedAt; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + QueryModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryModel && + other.id == id && + other.name == name && + _deepEquality.equals(other.filters, filters) && + other.sums == sums && + other.timelineVisible == timelineVisible && + _deepEquality.equals(other.timelineLabels, timelineLabels) && + other.timelineZoomLevel == timelineZoomLevel && + other.timestamps == timestamps && + other.highlightingMode == highlightingMode && + other.showHierarchies == showHierarchies && + other.hidden == hidden && + other.public == public && + other.starred == starred && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (filters.hashCode) + + (sums == null ? 0 : sums!.hashCode) + + (timelineVisible == null ? 0 : timelineVisible!.hashCode) + + (timelineLabels.hashCode) + + (timelineZoomLevel == null ? 0 : timelineZoomLevel!.hashCode) + + (timestamps == null ? 0 : timestamps!.hashCode) + + (highlightingMode == null ? 0 : highlightingMode!.hashCode) + + (showHierarchies == null ? 0 : showHierarchies!.hashCode) + + (hidden == null ? 0 : hidden!.hashCode) + + (public == null ? 0 : public!.hashCode) + + (starred == null ? 0 : starred!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'QueryModel[id=$id, name=$name, filters=$filters, sums=$sums, timelineVisible=$timelineVisible, timelineLabels=$timelineLabels, timelineZoomLevel=$timelineZoomLevel, timestamps=$timestamps, highlightingMode=$highlightingMode, showHierarchies=$showHierarchies, hidden=$hidden, public=$public, starred=$starred, createdAt=$createdAt, updatedAt=$updatedAt, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + json[r'filters'] = this.filters; + if (this.sums != null) { + json[r'sums'] = this.sums; + } else { + json[r'sums'] = null; + } + if (this.timelineVisible != null) { + json[r'timelineVisible'] = this.timelineVisible; + } else { + json[r'timelineVisible'] = null; + } + json[r'timelineLabels'] = this.timelineLabels; + if (this.timelineZoomLevel != null) { + json[r'timelineZoomLevel'] = this.timelineZoomLevel; + } else { + json[r'timelineZoomLevel'] = null; + } + if (this.timestamps != null) { + json[r'timestamps'] = this.timestamps; + } else { + json[r'timestamps'] = null; + } + if (this.highlightingMode != null) { + json[r'highlightingMode'] = this.highlightingMode; + } else { + json[r'highlightingMode'] = null; + } + if (this.showHierarchies != null) { + json[r'showHierarchies'] = this.showHierarchies; + } else { + json[r'showHierarchies'] = null; + } + if (this.hidden != null) { + json[r'hidden'] = this.hidden; + } else { + json[r'hidden'] = null; + } + if (this.public != null) { + json[r'public'] = this.public; + } else { + json[r'public'] = null; + } + if (this.starred != null) { + json[r'starred'] = this.starred; + } else { + json[r'starred'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt; + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt; + } else { + json[r'updatedAt'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [QueryModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryModel( + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name'), + filters: QueryFilterInstanceSchemaModel.listFromJson(json[r'filters']), + sums: mapValueOfType(json, r'sums'), + timelineVisible: mapValueOfType(json, r'timelineVisible'), + timelineLabels: json[r'timelineLabels'] is Iterable + ? (json[r'timelineLabels'] as Iterable).cast().toList(growable: false) + : const [], + timelineZoomLevel: mapValueOfType(json, r'timelineZoomLevel'), + timestamps: mapValueOfType(json, r'timestamps'), + highlightingMode: mapValueOfType(json, r'highlightingMode'), + showHierarchies: mapValueOfType(json, r'showHierarchies'), + hidden: mapValueOfType(json, r'hidden'), + public: mapValueOfType(json, r'public'), + starred: mapValueOfType(json, r'starred'), + createdAt: mapValueOfType(json, r'createdAt'), + updatedAt: mapValueOfType(json, r'updatedAt'), + links: QueryModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'createdAt', + 'updatedAt', + }; +} + diff --git a/lib/model/query_model_links.dart b/lib/model/query_model_links.dart new file mode 100644 index 0000000..a1580aa --- /dev/null +++ b/lib/model/query_model_links.dart @@ -0,0 +1,169 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryModelLinks { + /// Returns a new [QueryModelLinks] instance. + QueryModelLinks({ + this.star, + this.unstar, + this.update, + this.updateImmediately, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + QueryModelLinksStar? star; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + QueryModelLinksUnstar? unstar; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + QueryModelLinksUpdate? update; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + QueryModelLinksUpdateImmediately? updateImmediately; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryModelLinks && + other.star == star && + other.unstar == unstar && + other.update == update && + other.updateImmediately == updateImmediately; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (star == null ? 0 : star!.hashCode) + + (unstar == null ? 0 : unstar!.hashCode) + + (update == null ? 0 : update!.hashCode) + + (updateImmediately == null ? 0 : updateImmediately!.hashCode); + + @override + String toString() => 'QueryModelLinks[star=$star, unstar=$unstar, update=$update, updateImmediately=$updateImmediately]'; + + Map toJson() { + final json = {}; + if (this.star != null) { + json[r'star'] = this.star; + } else { + json[r'star'] = null; + } + if (this.unstar != null) { + json[r'unstar'] = this.unstar; + } else { + json[r'unstar'] = null; + } + if (this.update != null) { + json[r'update'] = this.update; + } else { + json[r'update'] = null; + } + if (this.updateImmediately != null) { + json[r'updateImmediately'] = this.updateImmediately; + } else { + json[r'updateImmediately'] = null; + } + return json; + } + + /// Returns a new [QueryModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryModelLinks( + star: QueryModelLinksStar.fromJson(json[r'star']), + unstar: QueryModelLinksUnstar.fromJson(json[r'unstar']), + update: QueryModelLinksUpdate.fromJson(json[r'update']), + updateImmediately: QueryModelLinksUpdateImmediately.fromJson(json[r'updateImmediately']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/query_model_links_star.dart b/lib/model/query_model_links_star.dart new file mode 100644 index 0000000..0ca293f --- /dev/null +++ b/lib/model/query_model_links_star.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryModelLinksStar { + /// Returns a new [QueryModelLinksStar] instance. + QueryModelLinksStar({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryModelLinksStar && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'QueryModelLinksStar[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [QueryModelLinksStar] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryModelLinksStar? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryModelLinksStar[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryModelLinksStar[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryModelLinksStar( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryModelLinksStar.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryModelLinksStar.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryModelLinksStar-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryModelLinksStar.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/query_model_links_unstar.dart b/lib/model/query_model_links_unstar.dart new file mode 100644 index 0000000..c5c9ff4 --- /dev/null +++ b/lib/model/query_model_links_unstar.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryModelLinksUnstar { + /// Returns a new [QueryModelLinksUnstar] instance. + QueryModelLinksUnstar({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryModelLinksUnstar && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'QueryModelLinksUnstar[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [QueryModelLinksUnstar] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryModelLinksUnstar? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryModelLinksUnstar[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryModelLinksUnstar[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryModelLinksUnstar( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryModelLinksUnstar.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryModelLinksUnstar.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryModelLinksUnstar-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryModelLinksUnstar.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/query_model_links_update.dart b/lib/model/query_model_links_update.dart new file mode 100644 index 0000000..6d4cabc --- /dev/null +++ b/lib/model/query_model_links_update.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryModelLinksUpdate { + /// Returns a new [QueryModelLinksUpdate] instance. + QueryModelLinksUpdate({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryModelLinksUpdate && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'QueryModelLinksUpdate[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [QueryModelLinksUpdate] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryModelLinksUpdate? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryModelLinksUpdate[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryModelLinksUpdate[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryModelLinksUpdate( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryModelLinksUpdate.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryModelLinksUpdate.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryModelLinksUpdate-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryModelLinksUpdate.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/query_model_links_update_immediately.dart b/lib/model/query_model_links_update_immediately.dart new file mode 100644 index 0000000..d54b3ea --- /dev/null +++ b/lib/model/query_model_links_update_immediately.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryModelLinksUpdateImmediately { + /// Returns a new [QueryModelLinksUpdateImmediately] instance. + QueryModelLinksUpdateImmediately({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryModelLinksUpdateImmediately && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'QueryModelLinksUpdateImmediately[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [QueryModelLinksUpdateImmediately] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryModelLinksUpdateImmediately? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryModelLinksUpdateImmediately[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryModelLinksUpdateImmediately[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryModelLinksUpdateImmediately( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryModelLinksUpdateImmediately.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryModelLinksUpdateImmediately.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryModelLinksUpdateImmediately-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryModelLinksUpdateImmediately.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/query_operator_model.dart b/lib/model/query_operator_model.dart new file mode 100644 index 0000000..ac80353 --- /dev/null +++ b/lib/model/query_operator_model.dart @@ -0,0 +1,127 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryOperatorModel { + /// Returns a new [QueryOperatorModel] instance. + QueryOperatorModel({ + required this.id, + required this.name, + }); + + /// Query operator id + Object? id; + + /// Query operator name + Object? name; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryOperatorModel && + other.id == id && + other.name == name; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode); + + @override + String toString() => 'QueryOperatorModel[id=$id, name=$name]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + return json; + } + + /// Returns a new [QueryOperatorModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryOperatorModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryOperatorModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryOperatorModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryOperatorModel( + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryOperatorModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryOperatorModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryOperatorModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryOperatorModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'name', + }; +} + diff --git a/lib/model/query_sort_by_model.dart b/lib/model/query_sort_by_model.dart new file mode 100644 index 0000000..b9fc3eb --- /dev/null +++ b/lib/model/query_sort_by_model.dart @@ -0,0 +1,127 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QuerySortByModel { + /// Returns a new [QuerySortByModel] instance. + QuerySortByModel({ + required this.id, + required this.name, + }); + + /// QuerySortBy id + Object? id; + + /// QuerySortBy name + Object? name; + + @override + bool operator ==(Object other) => identical(this, other) || other is QuerySortByModel && + other.id == id && + other.name == name; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode); + + @override + String toString() => 'QuerySortByModel[id=$id, name=$name]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + return json; + } + + /// Returns a new [QuerySortByModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QuerySortByModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QuerySortByModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QuerySortByModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QuerySortByModel( + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QuerySortByModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QuerySortByModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QuerySortByModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QuerySortByModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'name', + }; +} + diff --git a/lib/model/query_update_form.dart b/lib/model/query_update_form.dart new file mode 100644 index 0000000..74b8d8e --- /dev/null +++ b/lib/model/query_update_form.dart @@ -0,0 +1,113 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryUpdateForm { + /// Returns a new [QueryUpdateForm] instance. + QueryUpdateForm({ + this.name, + }); + + /// Query name. + Object? name; + + @override + bool operator ==(Object other) => identical(this, other) || other is QueryUpdateForm && + other.name == name; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (name == null ? 0 : name!.hashCode); + + @override + String toString() => 'QueryUpdateForm[name=$name]'; + + Map toJson() { + final json = {}; + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + return json; + } + + /// Returns a new [QueryUpdateForm] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static QueryUpdateForm? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "QueryUpdateForm[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "QueryUpdateForm[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return QueryUpdateForm( + name: mapValueOfType(json, r'name'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = QueryUpdateForm.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = QueryUpdateForm.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of QueryUpdateForm-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = QueryUpdateForm.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/relation_model.dart b/lib/model/relation_model.dart new file mode 100644 index 0000000..82f8111 --- /dev/null +++ b/lib/model/relation_model.dart @@ -0,0 +1,192 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RelationModel { + /// Returns a new [RelationModel] instance. + RelationModel({ + this.id, + this.name, + this.type, + this.reverseType, + this.description, + this.delayStar, + this.links, + }); + + /// Relation ID + Object? id; + + /// The internationalized name of this kind of relation + Object? name; + + /// Which kind of relation (blocks, precedes, etc.) + Object? type; + + /// The kind of relation from the other WP's perspective + Object? reverseType; + + /// Short text further describing the relation + Object? description; + + /// The delay in days between closing of `from` and start of `to` + /// + /// Minimum value: 0 + Object? delayStar; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + RelationModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is RelationModel && + other.id == id && + other.name == name && + other.type == type && + other.reverseType == reverseType && + other.description == description && + other.delayStar == delayStar && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (reverseType == null ? 0 : reverseType!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (delayStar == null ? 0 : delayStar!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'RelationModel[id=$id, name=$name, type=$type, reverseType=$reverseType, description=$description, delayStar=$delayStar, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.reverseType != null) { + json[r'reverseType'] = this.reverseType; + } else { + json[r'reverseType'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.delayStar != null) { + json[r'delay*'] = this.delayStar; + } else { + json[r'delay*'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [RelationModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RelationModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RelationModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RelationModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RelationModel( + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name'), + type: mapValueOfType(json, r'type'), + reverseType: mapValueOfType(json, r'reverseType'), + description: mapValueOfType(json, r'description'), + delayStar: mapValueOfType(json, r'delay*'), + links: RelationModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RelationModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RelationModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RelationModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RelationModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/relation_model_links.dart b/lib/model/relation_model_links.dart new file mode 100644 index 0000000..50d8559 --- /dev/null +++ b/lib/model/relation_model_links.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RelationModelLinks { + /// Returns a new [RelationModelLinks] instance. + RelationModelLinks({ + this.update, + this.updateImmediately, + this.delete, + required this.self, + required this.schema, + required this.from, + required this.to, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + RelationModelLinksUpdate? update; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + RelationModelLinksUpdateImmediately? updateImmediately; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + RelationModelLinksDelete? delete; + + RelationModelLinksSelf self; + + RelationModelLinksSchema schema; + + RelationModelLinksFrom from; + + RelationModelLinksTo to; + + @override + bool operator ==(Object other) => identical(this, other) || other is RelationModelLinks && + other.update == update && + other.updateImmediately == updateImmediately && + other.delete == delete && + other.self == self && + other.schema == schema && + other.from == from && + other.to == to; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (update == null ? 0 : update!.hashCode) + + (updateImmediately == null ? 0 : updateImmediately!.hashCode) + + (delete == null ? 0 : delete!.hashCode) + + (self.hashCode) + + (schema.hashCode) + + (from.hashCode) + + (to.hashCode); + + @override + String toString() => 'RelationModelLinks[update=$update, updateImmediately=$updateImmediately, delete=$delete, self=$self, schema=$schema, from=$from, to=$to]'; + + Map toJson() { + final json = {}; + if (this.update != null) { + json[r'update'] = this.update; + } else { + json[r'update'] = null; + } + if (this.updateImmediately != null) { + json[r'updateImmediately'] = this.updateImmediately; + } else { + json[r'updateImmediately'] = null; + } + if (this.delete != null) { + json[r'delete'] = this.delete; + } else { + json[r'delete'] = null; + } + json[r'self'] = this.self; + json[r'schema'] = this.schema; + json[r'from'] = this.from; + json[r'to'] = this.to; + return json; + } + + /// Returns a new [RelationModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RelationModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RelationModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RelationModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RelationModelLinks( + update: RelationModelLinksUpdate.fromJson(json[r'update']), + updateImmediately: RelationModelLinksUpdateImmediately.fromJson(json[r'updateImmediately']), + delete: RelationModelLinksDelete.fromJson(json[r'delete']), + self: RelationModelLinksSelf.fromJson(json[r'self'])!, + schema: RelationModelLinksSchema.fromJson(json[r'schema'])!, + from: RelationModelLinksFrom.fromJson(json[r'from'])!, + to: RelationModelLinksTo.fromJson(json[r'to'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RelationModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RelationModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RelationModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RelationModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'schema', + 'from', + 'to', + }; +} + diff --git a/lib/model/relation_model_links_delete.dart b/lib/model/relation_model_links_delete.dart new file mode 100644 index 0000000..87a8524 --- /dev/null +++ b/lib/model/relation_model_links_delete.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RelationModelLinksDelete { + /// Returns a new [RelationModelLinksDelete] instance. + RelationModelLinksDelete({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RelationModelLinksDelete && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RelationModelLinksDelete[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RelationModelLinksDelete] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RelationModelLinksDelete? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RelationModelLinksDelete[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RelationModelLinksDelete[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RelationModelLinksDelete( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RelationModelLinksDelete.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RelationModelLinksDelete.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RelationModelLinksDelete-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RelationModelLinksDelete.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/relation_model_links_from.dart b/lib/model/relation_model_links_from.dart new file mode 100644 index 0000000..764394c --- /dev/null +++ b/lib/model/relation_model_links_from.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RelationModelLinksFrom { + /// Returns a new [RelationModelLinksFrom] instance. + RelationModelLinksFrom({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RelationModelLinksFrom && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RelationModelLinksFrom[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RelationModelLinksFrom] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RelationModelLinksFrom? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RelationModelLinksFrom[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RelationModelLinksFrom[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RelationModelLinksFrom( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RelationModelLinksFrom.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RelationModelLinksFrom.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RelationModelLinksFrom-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RelationModelLinksFrom.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/relation_model_links_schema.dart b/lib/model/relation_model_links_schema.dart new file mode 100644 index 0000000..6d9a15c --- /dev/null +++ b/lib/model/relation_model_links_schema.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RelationModelLinksSchema { + /// Returns a new [RelationModelLinksSchema] instance. + RelationModelLinksSchema({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RelationModelLinksSchema && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RelationModelLinksSchema[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RelationModelLinksSchema] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RelationModelLinksSchema? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RelationModelLinksSchema[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RelationModelLinksSchema[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RelationModelLinksSchema( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RelationModelLinksSchema.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RelationModelLinksSchema.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RelationModelLinksSchema-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RelationModelLinksSchema.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/relation_model_links_self.dart b/lib/model/relation_model_links_self.dart new file mode 100644 index 0000000..8a0d81a --- /dev/null +++ b/lib/model/relation_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RelationModelLinksSelf { + /// Returns a new [RelationModelLinksSelf] instance. + RelationModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RelationModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RelationModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RelationModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RelationModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RelationModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RelationModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RelationModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RelationModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RelationModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RelationModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RelationModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/relation_model_links_to.dart b/lib/model/relation_model_links_to.dart new file mode 100644 index 0000000..bbc0f0c --- /dev/null +++ b/lib/model/relation_model_links_to.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RelationModelLinksTo { + /// Returns a new [RelationModelLinksTo] instance. + RelationModelLinksTo({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RelationModelLinksTo && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RelationModelLinksTo[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RelationModelLinksTo] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RelationModelLinksTo? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RelationModelLinksTo[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RelationModelLinksTo[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RelationModelLinksTo( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RelationModelLinksTo.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RelationModelLinksTo.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RelationModelLinksTo-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RelationModelLinksTo.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/relation_model_links_update.dart b/lib/model/relation_model_links_update.dart new file mode 100644 index 0000000..e730871 --- /dev/null +++ b/lib/model/relation_model_links_update.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RelationModelLinksUpdate { + /// Returns a new [RelationModelLinksUpdate] instance. + RelationModelLinksUpdate({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RelationModelLinksUpdate && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RelationModelLinksUpdate[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RelationModelLinksUpdate] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RelationModelLinksUpdate? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RelationModelLinksUpdate[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RelationModelLinksUpdate[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RelationModelLinksUpdate( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RelationModelLinksUpdate.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RelationModelLinksUpdate.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RelationModelLinksUpdate-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RelationModelLinksUpdate.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/relation_model_links_update_immediately.dart b/lib/model/relation_model_links_update_immediately.dart new file mode 100644 index 0000000..bee2a75 --- /dev/null +++ b/lib/model/relation_model_links_update_immediately.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RelationModelLinksUpdateImmediately { + /// Returns a new [RelationModelLinksUpdateImmediately] instance. + RelationModelLinksUpdateImmediately({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RelationModelLinksUpdateImmediately && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RelationModelLinksUpdateImmediately[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RelationModelLinksUpdateImmediately] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RelationModelLinksUpdateImmediately? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RelationModelLinksUpdateImmediately[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RelationModelLinksUpdateImmediately[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RelationModelLinksUpdateImmediately( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RelationModelLinksUpdateImmediately.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RelationModelLinksUpdateImmediately.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RelationModelLinksUpdateImmediately-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RelationModelLinksUpdateImmediately.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/revision_model.dart b/lib/model/revision_model.dart new file mode 100644 index 0000000..e372dce --- /dev/null +++ b/lib/model/revision_model.dart @@ -0,0 +1,190 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RevisionModel { + /// Returns a new [RevisionModel] instance. + RevisionModel({ + this.id, + required this.identifier, + required this.formattedIdentifier, + required this.authorName, + required this.message, + required this.createdAt, + this.links, + }); + + /// Revision's id, assigned by OpenProject + Object? id; + + /// The raw SCM identifier of the revision (e.g. full SHA hash) + Object? identifier; + + /// The SCM identifier of the revision, formatted (e.g. shortened unambiguous SHA hash). May be identical to identifier in many cases + Object? formattedIdentifier; + + /// The name of the author that committed this revision. Note that this name is retrieved from the repository and does not identify a user in OpenProject. + Object? authorName; + + RevisionModelMessage message; + + /// The time this revision was committed to the repository + Object? createdAt; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + RevisionModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is RevisionModel && + other.id == id && + other.identifier == identifier && + other.formattedIdentifier == formattedIdentifier && + other.authorName == authorName && + other.message == message && + other.createdAt == createdAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode) + + (formattedIdentifier == null ? 0 : formattedIdentifier!.hashCode) + + (authorName == null ? 0 : authorName!.hashCode) + + (message.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'RevisionModel[id=$id, identifier=$identifier, formattedIdentifier=$formattedIdentifier, authorName=$authorName, message=$message, createdAt=$createdAt, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + if (this.formattedIdentifier != null) { + json[r'formattedIdentifier'] = this.formattedIdentifier; + } else { + json[r'formattedIdentifier'] = null; + } + if (this.authorName != null) { + json[r'authorName'] = this.authorName; + } else { + json[r'authorName'] = null; + } + json[r'message'] = this.message; + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt; + } else { + json[r'createdAt'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [RevisionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RevisionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RevisionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RevisionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RevisionModel( + id: mapValueOfType(json, r'id'), + identifier: mapValueOfType(json, r'identifier'), + formattedIdentifier: mapValueOfType(json, r'formattedIdentifier'), + authorName: mapValueOfType(json, r'authorName'), + message: RevisionModelMessage.fromJson(json[r'message'])!, + createdAt: mapValueOfType(json, r'createdAt'), + links: RevisionModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RevisionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RevisionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RevisionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RevisionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'identifier', + 'formattedIdentifier', + 'authorName', + 'message', + 'createdAt', + }; +} + diff --git a/lib/model/revision_model_links.dart b/lib/model/revision_model_links.dart new file mode 100644 index 0000000..85440ad --- /dev/null +++ b/lib/model/revision_model_links.dart @@ -0,0 +1,142 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RevisionModelLinks { + /// Returns a new [RevisionModelLinks] instance. + RevisionModelLinks({ + required this.self, + required this.project, + this.author, + required this.showRevision, + }); + + RevisionModelLinksSelf self; + + RevisionModelLinksProject project; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + RevisionModelLinksAuthor? author; + + RevisionModelLinksShowRevision showRevision; + + @override + bool operator ==(Object other) => identical(this, other) || other is RevisionModelLinks && + other.self == self && + other.project == project && + other.author == author && + other.showRevision == showRevision; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (project.hashCode) + + (author == null ? 0 : author!.hashCode) + + (showRevision.hashCode); + + @override + String toString() => 'RevisionModelLinks[self=$self, project=$project, author=$author, showRevision=$showRevision]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'project'] = this.project; + if (this.author != null) { + json[r'author'] = this.author; + } else { + json[r'author'] = null; + } + json[r'showRevision'] = this.showRevision; + return json; + } + + /// Returns a new [RevisionModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RevisionModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RevisionModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RevisionModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RevisionModelLinks( + self: RevisionModelLinksSelf.fromJson(json[r'self'])!, + project: RevisionModelLinksProject.fromJson(json[r'project'])!, + author: RevisionModelLinksAuthor.fromJson(json[r'author']), + showRevision: RevisionModelLinksShowRevision.fromJson(json[r'showRevision'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RevisionModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RevisionModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RevisionModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RevisionModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'project', + 'showRevision', + }; +} + diff --git a/lib/model/revision_model_links_author.dart b/lib/model/revision_model_links_author.dart new file mode 100644 index 0000000..1d16c17 --- /dev/null +++ b/lib/model/revision_model_links_author.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RevisionModelLinksAuthor { + /// Returns a new [RevisionModelLinksAuthor] instance. + RevisionModelLinksAuthor({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RevisionModelLinksAuthor && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RevisionModelLinksAuthor[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RevisionModelLinksAuthor] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RevisionModelLinksAuthor? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RevisionModelLinksAuthor[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RevisionModelLinksAuthor[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RevisionModelLinksAuthor( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RevisionModelLinksAuthor.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RevisionModelLinksAuthor.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RevisionModelLinksAuthor-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RevisionModelLinksAuthor.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/revision_model_links_project.dart b/lib/model/revision_model_links_project.dart new file mode 100644 index 0000000..fc9f0d2 --- /dev/null +++ b/lib/model/revision_model_links_project.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RevisionModelLinksProject { + /// Returns a new [RevisionModelLinksProject] instance. + RevisionModelLinksProject({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RevisionModelLinksProject && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RevisionModelLinksProject[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RevisionModelLinksProject] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RevisionModelLinksProject? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RevisionModelLinksProject[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RevisionModelLinksProject[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RevisionModelLinksProject( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RevisionModelLinksProject.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RevisionModelLinksProject.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RevisionModelLinksProject-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RevisionModelLinksProject.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/revision_model_links_self.dart b/lib/model/revision_model_links_self.dart new file mode 100644 index 0000000..9b9c66a --- /dev/null +++ b/lib/model/revision_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RevisionModelLinksSelf { + /// Returns a new [RevisionModelLinksSelf] instance. + RevisionModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RevisionModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RevisionModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RevisionModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RevisionModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RevisionModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RevisionModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RevisionModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RevisionModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RevisionModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RevisionModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RevisionModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/revision_model_links_show_revision.dart b/lib/model/revision_model_links_show_revision.dart new file mode 100644 index 0000000..2608d71 --- /dev/null +++ b/lib/model/revision_model_links_show_revision.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RevisionModelLinksShowRevision { + /// Returns a new [RevisionModelLinksShowRevision] instance. + RevisionModelLinksShowRevision({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RevisionModelLinksShowRevision && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RevisionModelLinksShowRevision[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RevisionModelLinksShowRevision] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RevisionModelLinksShowRevision? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RevisionModelLinksShowRevision[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RevisionModelLinksShowRevision[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RevisionModelLinksShowRevision( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RevisionModelLinksShowRevision.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RevisionModelLinksShowRevision.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RevisionModelLinksShowRevision-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RevisionModelLinksShowRevision.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/revision_model_message.dart b/lib/model/revision_model_message.dart new file mode 100644 index 0000000..8aa8fa0 --- /dev/null +++ b/lib/model/revision_model_message.dart @@ -0,0 +1,223 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RevisionModelMessage { + /// Returns a new [RevisionModelMessage] instance. + RevisionModelMessage({ + required this.format, + this.raw, + this.html, + }); + + /// Indicates the formatting language of the raw text + RevisionModelMessageFormatEnum format; + + /// The raw text, as entered by the user + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? raw; + + /// The text converted to HTML according to the format + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? html; + + @override + bool operator ==(Object other) => identical(this, other) || other is RevisionModelMessage && + other.format == format && + other.raw == raw && + other.html == html; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (format.hashCode) + + (raw == null ? 0 : raw!.hashCode) + + (html == null ? 0 : html!.hashCode); + + @override + String toString() => 'RevisionModelMessage[format=$format, raw=$raw, html=$html]'; + + Map toJson() { + final json = {}; + json[r'format'] = this.format; + if (this.raw != null) { + json[r'raw'] = this.raw; + } else { + json[r'raw'] = null; + } + if (this.html != null) { + json[r'html'] = this.html; + } else { + json[r'html'] = null; + } + return json; + } + + /// Returns a new [RevisionModelMessage] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RevisionModelMessage? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RevisionModelMessage[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RevisionModelMessage[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RevisionModelMessage( + format: RevisionModelMessageFormatEnum.fromJson(json[r'format'])!, + raw: mapValueOfType(json, r'raw'), + html: mapValueOfType(json, r'html'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RevisionModelMessage.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RevisionModelMessage.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RevisionModelMessage-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RevisionModelMessage.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'format', + }; +} + +/// Indicates the formatting language of the raw text +class RevisionModelMessageFormatEnum { + /// Instantiate a new enum with the provided [value]. + const RevisionModelMessageFormatEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const plain = RevisionModelMessageFormatEnum._(r'plain'); + static const markdown = RevisionModelMessageFormatEnum._(r'markdown'); + static const custom = RevisionModelMessageFormatEnum._(r'custom'); + + /// List of all possible values in this [enum][RevisionModelMessageFormatEnum]. + static const values = [ + plain, + markdown, + custom, + ]; + + static RevisionModelMessageFormatEnum? fromJson(dynamic value) => RevisionModelMessageFormatEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RevisionModelMessageFormatEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [RevisionModelMessageFormatEnum] to String, +/// and [decode] dynamic data back to [RevisionModelMessageFormatEnum]. +class RevisionModelMessageFormatEnumTypeTransformer { + factory RevisionModelMessageFormatEnumTypeTransformer() => _instance ??= const RevisionModelMessageFormatEnumTypeTransformer._(); + + const RevisionModelMessageFormatEnumTypeTransformer._(); + + String encode(RevisionModelMessageFormatEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a RevisionModelMessageFormatEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + RevisionModelMessageFormatEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'plain': return RevisionModelMessageFormatEnum.plain; + case r'markdown': return RevisionModelMessageFormatEnum.markdown; + case r'custom': return RevisionModelMessageFormatEnum.custom; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [RevisionModelMessageFormatEnumTypeTransformer] instance. + static RevisionModelMessageFormatEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/role_model.dart b/lib/model/role_model.dart new file mode 100644 index 0000000..6909b34 --- /dev/null +++ b/lib/model/role_model.dart @@ -0,0 +1,227 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RoleModel { + /// Returns a new [RoleModel] instance. + RoleModel({ + this.type, + this.id, + required this.name, + this.links, + }); + + RoleModelTypeEnum? type; + + /// Role id + /// + /// Minimum value: 1 + Object? id; + + /// Role name + Object? name; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + RoleModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is RoleModel && + other.type == type && + other.id == id && + other.name == name && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'RoleModel[type=$type, id=$id, name=$name, links=$links]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [RoleModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RoleModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RoleModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RoleModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RoleModel( + type: Object.fromJson(json[r'_type']), + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name'), + links: RoleModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RoleModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RoleModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RoleModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RoleModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'name', + }; +} + + +class RoleModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const RoleModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const role = RoleModelTypeEnum._('Role'); + + /// List of all possible values in this [enum][RoleModelTypeEnum]. + static const values = [ + role, + ]; + + static RoleModelTypeEnum? fromJson(dynamic value) => RoleModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RoleModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [RoleModelTypeEnum] to Object, +/// and [decode] dynamic data back to [RoleModelTypeEnum]. +class RoleModelTypeEnumTypeTransformer { + factory RoleModelTypeEnumTypeTransformer() => _instance ??= const RoleModelTypeEnumTypeTransformer._(); + + const RoleModelTypeEnumTypeTransformer._(); + + Object encode(RoleModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a RoleModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + RoleModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'Role': return RoleModelTypeEnum.role; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [RoleModelTypeEnumTypeTransformer] instance. + static RoleModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/role_model_links.dart b/lib/model/role_model_links.dart new file mode 100644 index 0000000..bc272fe --- /dev/null +++ b/lib/model/role_model_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RoleModelLinks { + /// Returns a new [RoleModelLinks] instance. + RoleModelLinks({ + required this.self, + }); + + RoleModelLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is RoleModelLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'RoleModelLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [RoleModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RoleModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RoleModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RoleModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RoleModelLinks( + self: RoleModelLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RoleModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RoleModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RoleModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RoleModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/role_model_links_self.dart b/lib/model/role_model_links_self.dart new file mode 100644 index 0000000..4182543 --- /dev/null +++ b/lib/model/role_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RoleModelLinksSelf { + /// Returns a new [RoleModelLinksSelf] instance. + RoleModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RoleModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RoleModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RoleModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RoleModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RoleModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RoleModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RoleModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RoleModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RoleModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RoleModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RoleModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/root_model.dart b/lib/model/root_model.dart new file mode 100644 index 0000000..5aee3ff --- /dev/null +++ b/lib/model/root_model.dart @@ -0,0 +1,217 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RootModel { + /// Returns a new [RootModel] instance. + RootModel({ + required this.type, + required this.instanceName, + this.coreVersion, + required this.links, + }); + + RootModelTypeEnum? type; + + /// The name of the OpenProject instance + Object? instanceName; + + /// The OpenProject core version number for the instance # Conditions **Permission** requires admin privileges + Object? coreVersion; + + RootModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is RootModel && + other.type == type && + other.instanceName == instanceName && + other.coreVersion == coreVersion && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (instanceName == null ? 0 : instanceName!.hashCode) + + (coreVersion == null ? 0 : coreVersion!.hashCode) + + (links.hashCode); + + @override + String toString() => 'RootModel[type=$type, instanceName=$instanceName, coreVersion=$coreVersion, links=$links]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.instanceName != null) { + json[r'instanceName'] = this.instanceName; + } else { + json[r'instanceName'] = null; + } + if (this.coreVersion != null) { + json[r'coreVersion'] = this.coreVersion; + } else { + json[r'coreVersion'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [RootModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RootModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RootModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RootModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RootModel( + type: Object.fromJson(json[r'_type']), + instanceName: mapValueOfType(json, r'instanceName'), + coreVersion: mapValueOfType(json, r'coreVersion'), + links: RootModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RootModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RootModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RootModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RootModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'instanceName', + '_links', + }; +} + + +class RootModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const RootModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const root = RootModelTypeEnum._('Root'); + + /// List of all possible values in this [enum][RootModelTypeEnum]. + static const values = [ + root, + ]; + + static RootModelTypeEnum? fromJson(dynamic value) => RootModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RootModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [RootModelTypeEnum] to Object, +/// and [decode] dynamic data back to [RootModelTypeEnum]. +class RootModelTypeEnumTypeTransformer { + factory RootModelTypeEnumTypeTransformer() => _instance ??= const RootModelTypeEnumTypeTransformer._(); + + const RootModelTypeEnumTypeTransformer._(); + + Object encode(RootModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a RootModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + RootModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'Root': return RootModelTypeEnum.root; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [RootModelTypeEnumTypeTransformer] instance. + static RootModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/root_model_links.dart b/lib/model/root_model_links.dart new file mode 100644 index 0000000..3d03f3e --- /dev/null +++ b/lib/model/root_model_links.dart @@ -0,0 +1,189 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RootModelLinks { + /// Returns a new [RootModelLinks] instance. + RootModelLinks({ + required this.self, + required this.configuration, + required this.memberships, + required this.priorities, + required this.relations, + required this.statuses, + required this.timeEntries, + required this.types, + required this.user, + required this.userPreferences, + required this.workPackages, + }); + + RootModelLinksSelf self; + + RootModelLinksConfiguration configuration; + + RootModelLinksMemberships memberships; + + RootModelLinksPriorities priorities; + + RootModelLinksRelations relations; + + RootModelLinksStatuses statuses; + + RootModelLinksTimeEntries timeEntries; + + RootModelLinksTypes types; + + RootModelLinksUser user; + + RootModelLinksUserPreferences userPreferences; + + RootModelLinksWorkPackages workPackages; + + @override + bool operator ==(Object other) => identical(this, other) || other is RootModelLinks && + other.self == self && + other.configuration == configuration && + other.memberships == memberships && + other.priorities == priorities && + other.relations == relations && + other.statuses == statuses && + other.timeEntries == timeEntries && + other.types == types && + other.user == user && + other.userPreferences == userPreferences && + other.workPackages == workPackages; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (configuration.hashCode) + + (memberships.hashCode) + + (priorities.hashCode) + + (relations.hashCode) + + (statuses.hashCode) + + (timeEntries.hashCode) + + (types.hashCode) + + (user.hashCode) + + (userPreferences.hashCode) + + (workPackages.hashCode); + + @override + String toString() => 'RootModelLinks[self=$self, configuration=$configuration, memberships=$memberships, priorities=$priorities, relations=$relations, statuses=$statuses, timeEntries=$timeEntries, types=$types, user=$user, userPreferences=$userPreferences, workPackages=$workPackages]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'configuration'] = this.configuration; + json[r'memberships'] = this.memberships; + json[r'priorities'] = this.priorities; + json[r'relations'] = this.relations; + json[r'statuses'] = this.statuses; + json[r'time_entries'] = this.timeEntries; + json[r'types'] = this.types; + json[r'user'] = this.user; + json[r'userPreferences'] = this.userPreferences; + json[r'workPackages'] = this.workPackages; + return json; + } + + /// Returns a new [RootModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RootModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RootModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RootModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RootModelLinks( + self: RootModelLinksSelf.fromJson(json[r'self'])!, + configuration: RootModelLinksConfiguration.fromJson(json[r'configuration'])!, + memberships: RootModelLinksMemberships.fromJson(json[r'memberships'])!, + priorities: RootModelLinksPriorities.fromJson(json[r'priorities'])!, + relations: RootModelLinksRelations.fromJson(json[r'relations'])!, + statuses: RootModelLinksStatuses.fromJson(json[r'statuses'])!, + timeEntries: RootModelLinksTimeEntries.fromJson(json[r'time_entries'])!, + types: RootModelLinksTypes.fromJson(json[r'types'])!, + user: RootModelLinksUser.fromJson(json[r'user'])!, + userPreferences: RootModelLinksUserPreferences.fromJson(json[r'userPreferences'])!, + workPackages: RootModelLinksWorkPackages.fromJson(json[r'workPackages'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RootModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RootModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RootModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RootModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'configuration', + 'memberships', + 'priorities', + 'relations', + 'statuses', + 'time_entries', + 'types', + 'user', + 'userPreferences', + 'workPackages', + }; +} + diff --git a/lib/model/root_model_links_configuration.dart b/lib/model/root_model_links_configuration.dart new file mode 100644 index 0000000..1a5a38f --- /dev/null +++ b/lib/model/root_model_links_configuration.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RootModelLinksConfiguration { + /// Returns a new [RootModelLinksConfiguration] instance. + RootModelLinksConfiguration({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RootModelLinksConfiguration && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RootModelLinksConfiguration[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RootModelLinksConfiguration] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RootModelLinksConfiguration? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RootModelLinksConfiguration[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RootModelLinksConfiguration[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RootModelLinksConfiguration( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RootModelLinksConfiguration.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RootModelLinksConfiguration.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RootModelLinksConfiguration-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RootModelLinksConfiguration.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/root_model_links_memberships.dart b/lib/model/root_model_links_memberships.dart new file mode 100644 index 0000000..6b3de65 --- /dev/null +++ b/lib/model/root_model_links_memberships.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RootModelLinksMemberships { + /// Returns a new [RootModelLinksMemberships] instance. + RootModelLinksMemberships({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RootModelLinksMemberships && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RootModelLinksMemberships[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RootModelLinksMemberships] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RootModelLinksMemberships? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RootModelLinksMemberships[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RootModelLinksMemberships[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RootModelLinksMemberships( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RootModelLinksMemberships.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RootModelLinksMemberships.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RootModelLinksMemberships-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RootModelLinksMemberships.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/root_model_links_priorities.dart b/lib/model/root_model_links_priorities.dart new file mode 100644 index 0000000..89fe635 --- /dev/null +++ b/lib/model/root_model_links_priorities.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RootModelLinksPriorities { + /// Returns a new [RootModelLinksPriorities] instance. + RootModelLinksPriorities({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RootModelLinksPriorities && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RootModelLinksPriorities[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RootModelLinksPriorities] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RootModelLinksPriorities? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RootModelLinksPriorities[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RootModelLinksPriorities[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RootModelLinksPriorities( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RootModelLinksPriorities.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RootModelLinksPriorities.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RootModelLinksPriorities-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RootModelLinksPriorities.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/root_model_links_relations.dart b/lib/model/root_model_links_relations.dart new file mode 100644 index 0000000..0c615c1 --- /dev/null +++ b/lib/model/root_model_links_relations.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RootModelLinksRelations { + /// Returns a new [RootModelLinksRelations] instance. + RootModelLinksRelations({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RootModelLinksRelations && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RootModelLinksRelations[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RootModelLinksRelations] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RootModelLinksRelations? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RootModelLinksRelations[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RootModelLinksRelations[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RootModelLinksRelations( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RootModelLinksRelations.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RootModelLinksRelations.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RootModelLinksRelations-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RootModelLinksRelations.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/root_model_links_self.dart b/lib/model/root_model_links_self.dart new file mode 100644 index 0000000..952bc3f --- /dev/null +++ b/lib/model/root_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RootModelLinksSelf { + /// Returns a new [RootModelLinksSelf] instance. + RootModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RootModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RootModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RootModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RootModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RootModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RootModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RootModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RootModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RootModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RootModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RootModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/root_model_links_statuses.dart b/lib/model/root_model_links_statuses.dart new file mode 100644 index 0000000..eae9020 --- /dev/null +++ b/lib/model/root_model_links_statuses.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RootModelLinksStatuses { + /// Returns a new [RootModelLinksStatuses] instance. + RootModelLinksStatuses({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RootModelLinksStatuses && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RootModelLinksStatuses[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RootModelLinksStatuses] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RootModelLinksStatuses? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RootModelLinksStatuses[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RootModelLinksStatuses[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RootModelLinksStatuses( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RootModelLinksStatuses.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RootModelLinksStatuses.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RootModelLinksStatuses-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RootModelLinksStatuses.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/root_model_links_time_entries.dart b/lib/model/root_model_links_time_entries.dart new file mode 100644 index 0000000..f773ecf --- /dev/null +++ b/lib/model/root_model_links_time_entries.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RootModelLinksTimeEntries { + /// Returns a new [RootModelLinksTimeEntries] instance. + RootModelLinksTimeEntries({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RootModelLinksTimeEntries && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RootModelLinksTimeEntries[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RootModelLinksTimeEntries] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RootModelLinksTimeEntries? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RootModelLinksTimeEntries[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RootModelLinksTimeEntries[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RootModelLinksTimeEntries( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RootModelLinksTimeEntries.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RootModelLinksTimeEntries.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RootModelLinksTimeEntries-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RootModelLinksTimeEntries.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/root_model_links_types.dart b/lib/model/root_model_links_types.dart new file mode 100644 index 0000000..498b356 --- /dev/null +++ b/lib/model/root_model_links_types.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RootModelLinksTypes { + /// Returns a new [RootModelLinksTypes] instance. + RootModelLinksTypes({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RootModelLinksTypes && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RootModelLinksTypes[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RootModelLinksTypes] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RootModelLinksTypes? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RootModelLinksTypes[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RootModelLinksTypes[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RootModelLinksTypes( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RootModelLinksTypes.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RootModelLinksTypes.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RootModelLinksTypes-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RootModelLinksTypes.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/root_model_links_user.dart b/lib/model/root_model_links_user.dart new file mode 100644 index 0000000..15e73f9 --- /dev/null +++ b/lib/model/root_model_links_user.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RootModelLinksUser { + /// Returns a new [RootModelLinksUser] instance. + RootModelLinksUser({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RootModelLinksUser && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RootModelLinksUser[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RootModelLinksUser] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RootModelLinksUser? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RootModelLinksUser[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RootModelLinksUser[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RootModelLinksUser( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RootModelLinksUser.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RootModelLinksUser.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RootModelLinksUser-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RootModelLinksUser.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/root_model_links_user_preferences.dart b/lib/model/root_model_links_user_preferences.dart new file mode 100644 index 0000000..b277ad4 --- /dev/null +++ b/lib/model/root_model_links_user_preferences.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RootModelLinksUserPreferences { + /// Returns a new [RootModelLinksUserPreferences] instance. + RootModelLinksUserPreferences({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RootModelLinksUserPreferences && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RootModelLinksUserPreferences[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RootModelLinksUserPreferences] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RootModelLinksUserPreferences? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RootModelLinksUserPreferences[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RootModelLinksUserPreferences[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RootModelLinksUserPreferences( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RootModelLinksUserPreferences.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RootModelLinksUserPreferences.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RootModelLinksUserPreferences-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RootModelLinksUserPreferences.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/root_model_links_work_packages.dart b/lib/model/root_model_links_work_packages.dart new file mode 100644 index 0000000..edd56d9 --- /dev/null +++ b/lib/model/root_model_links_work_packages.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class RootModelLinksWorkPackages { + /// Returns a new [RootModelLinksWorkPackages] instance. + RootModelLinksWorkPackages({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is RootModelLinksWorkPackages && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'RootModelLinksWorkPackages[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [RootModelLinksWorkPackages] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static RootModelLinksWorkPackages? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "RootModelLinksWorkPackages[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "RootModelLinksWorkPackages[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return RootModelLinksWorkPackages( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = RootModelLinksWorkPackages.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = RootModelLinksWorkPackages.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of RootModelLinksWorkPackages-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = RootModelLinksWorkPackages.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/schema_model.dart b/lib/model/schema_model.dart new file mode 100644 index 0000000..c3210ce --- /dev/null +++ b/lib/model/schema_model.dart @@ -0,0 +1,204 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SchemaModel { + /// Returns a new [SchemaModel] instance. + SchemaModel({ + required this.type, + this.dependencies, + required this.links, + }); + + SchemaModelTypeEnum? type; + + /// A list of dependencies between one property's value and another property + Object? dependencies; + + SchemaModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is SchemaModel && + other.type == type && + other.dependencies == dependencies && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (dependencies == null ? 0 : dependencies!.hashCode) + + (links.hashCode); + + @override + String toString() => 'SchemaModel[type=$type, dependencies=$dependencies, links=$links]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.dependencies != null) { + json[r'_dependencies'] = this.dependencies; + } else { + json[r'_dependencies'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [SchemaModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SchemaModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "SchemaModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "SchemaModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SchemaModel( + type: Object.fromJson(json[r'_type']), + dependencies: mapValueOfType(json, r'_dependencies'), + links: SchemaModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SchemaModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SchemaModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SchemaModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SchemaModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + '_links', + }; +} + + +class SchemaModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const SchemaModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const schema = SchemaModelTypeEnum._('Schema'); + + /// List of all possible values in this [enum][SchemaModelTypeEnum]. + static const values = [ + schema, + ]; + + static SchemaModelTypeEnum? fromJson(dynamic value) => SchemaModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SchemaModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [SchemaModelTypeEnum] to Object, +/// and [decode] dynamic data back to [SchemaModelTypeEnum]. +class SchemaModelTypeEnumTypeTransformer { + factory SchemaModelTypeEnumTypeTransformer() => _instance ??= const SchemaModelTypeEnumTypeTransformer._(); + + const SchemaModelTypeEnumTypeTransformer._(); + + Object encode(SchemaModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a SchemaModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + SchemaModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'Schema': return SchemaModelTypeEnum.schema; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [SchemaModelTypeEnumTypeTransformer] instance. + static SchemaModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/schema_model_links.dart b/lib/model/schema_model_links.dart new file mode 100644 index 0000000..880ea0b --- /dev/null +++ b/lib/model/schema_model_links.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SchemaModelLinks { + /// Returns a new [SchemaModelLinks] instance. + SchemaModelLinks({ + this.self, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SchemaModelLinksSelf? self; + + @override + bool operator ==(Object other) => identical(this, other) || other is SchemaModelLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self == null ? 0 : self!.hashCode); + + @override + String toString() => 'SchemaModelLinks[self=$self]'; + + Map toJson() { + final json = {}; + if (this.self != null) { + json[r'self'] = this.self; + } else { + json[r'self'] = null; + } + return json; + } + + /// Returns a new [SchemaModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SchemaModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "SchemaModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "SchemaModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SchemaModelLinks( + self: SchemaModelLinksSelf.fromJson(json[r'self']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SchemaModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SchemaModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SchemaModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SchemaModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/schema_model_links_self.dart b/lib/model/schema_model_links_self.dart new file mode 100644 index 0000000..8e9aea2 --- /dev/null +++ b/lib/model/schema_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SchemaModelLinksSelf { + /// Returns a new [SchemaModelLinksSelf] instance. + SchemaModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is SchemaModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'SchemaModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [SchemaModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SchemaModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "SchemaModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "SchemaModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SchemaModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SchemaModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SchemaModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SchemaModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SchemaModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/show_or_validate_form_request.dart b/lib/model/show_or_validate_form_request.dart new file mode 100644 index 0000000..88c7e9b --- /dev/null +++ b/lib/model/show_or_validate_form_request.dart @@ -0,0 +1,152 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ShowOrValidateFormRequest { + /// Returns a new [ShowOrValidateFormRequest] instance. + ShowOrValidateFormRequest({ + this.type, + this.lockVersion, + this.subject, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + num? lockVersion; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? subject; + + @override + bool operator ==(Object other) => identical(this, other) || other is ShowOrValidateFormRequest && + other.type == type && + other.lockVersion == lockVersion && + other.subject == subject; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (lockVersion == null ? 0 : lockVersion!.hashCode) + + (subject == null ? 0 : subject!.hashCode); + + @override + String toString() => 'ShowOrValidateFormRequest[type=$type, lockVersion=$lockVersion, subject=$subject]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.lockVersion != null) { + json[r'lockVersion'] = this.lockVersion; + } else { + json[r'lockVersion'] = null; + } + if (this.subject != null) { + json[r'subject'] = this.subject; + } else { + json[r'subject'] = null; + } + return json; + } + + /// Returns a new [ShowOrValidateFormRequest] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ShowOrValidateFormRequest? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ShowOrValidateFormRequest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ShowOrValidateFormRequest[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ShowOrValidateFormRequest( + type: mapValueOfType(json, r'_type'), + lockVersion: num.parse('${json[r'lockVersion']}'), + subject: mapValueOfType(json, r'subject'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ShowOrValidateFormRequest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ShowOrValidateFormRequest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ShowOrValidateFormRequest-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ShowOrValidateFormRequest.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/status_model.dart b/lib/model/status_model.dart new file mode 100644 index 0000000..2ab8db8 --- /dev/null +++ b/lib/model/status_model.dart @@ -0,0 +1,287 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StatusModel { + /// Returns a new [StatusModel] instance. + StatusModel({ + this.type, + this.id, + this.name, + this.position, + this.isDefault, + this.isClosed, + this.isReadonly, + this.defaultDoneRatio, + this.links, + }); + + StatusModelTypeEnum? type; + + /// Status id + /// + /// Minimum value: 1 + Object? id; + + /// Status name + Object? name; + + /// Sort index of the status + Object? position; + + Object? isDefault; + + /// are tickets of this status considered closed? + Object? isClosed; + + /// are tickets of this status read only? + Object? isReadonly; + + /// The percentageDone being applied when changing to this status + /// + /// Maximum value: 100 + Object? defaultDoneRatio; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + StatusModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is StatusModel && + other.type == type && + other.id == id && + other.name == name && + other.position == position && + other.isDefault == isDefault && + other.isClosed == isClosed && + other.isReadonly == isReadonly && + other.defaultDoneRatio == defaultDoneRatio && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (position == null ? 0 : position!.hashCode) + + (isDefault == null ? 0 : isDefault!.hashCode) + + (isClosed == null ? 0 : isClosed!.hashCode) + + (isReadonly == null ? 0 : isReadonly!.hashCode) + + (defaultDoneRatio == null ? 0 : defaultDoneRatio!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'StatusModel[type=$type, id=$id, name=$name, position=$position, isDefault=$isDefault, isClosed=$isClosed, isReadonly=$isReadonly, defaultDoneRatio=$defaultDoneRatio, links=$links]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.position != null) { + json[r'position'] = this.position; + } else { + json[r'position'] = null; + } + if (this.isDefault != null) { + json[r'isDefault'] = this.isDefault; + } else { + json[r'isDefault'] = null; + } + if (this.isClosed != null) { + json[r'isClosed'] = this.isClosed; + } else { + json[r'isClosed'] = null; + } + if (this.isReadonly != null) { + json[r'isReadonly'] = this.isReadonly; + } else { + json[r'isReadonly'] = null; + } + if (this.defaultDoneRatio != null) { + json[r'defaultDoneRatio'] = this.defaultDoneRatio; + } else { + json[r'defaultDoneRatio'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [StatusModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StatusModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StatusModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StatusModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StatusModel( + type: Object.fromJson(json[r'_type']), + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name'), + position: mapValueOfType(json, r'position'), + isDefault: mapValueOfType(json, r'isDefault'), + isClosed: mapValueOfType(json, r'isClosed'), + isReadonly: mapValueOfType(json, r'isReadonly'), + defaultDoneRatio: mapValueOfType(json, r'defaultDoneRatio'), + links: StatusModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StatusModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StatusModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StatusModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StatusModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + + +class StatusModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const StatusModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const status = StatusModelTypeEnum._('Status'); + + /// List of all possible values in this [enum][StatusModelTypeEnum]. + static const values = [ + status, + ]; + + static StatusModelTypeEnum? fromJson(dynamic value) => StatusModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StatusModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [StatusModelTypeEnum] to Object, +/// and [decode] dynamic data back to [StatusModelTypeEnum]. +class StatusModelTypeEnumTypeTransformer { + factory StatusModelTypeEnumTypeTransformer() => _instance ??= const StatusModelTypeEnumTypeTransformer._(); + + const StatusModelTypeEnumTypeTransformer._(); + + Object encode(StatusModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a StatusModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + StatusModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'Status': return StatusModelTypeEnum.status; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [StatusModelTypeEnumTypeTransformer] instance. + static StatusModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/status_model_links.dart b/lib/model/status_model_links.dart new file mode 100644 index 0000000..e53b597 --- /dev/null +++ b/lib/model/status_model_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StatusModelLinks { + /// Returns a new [StatusModelLinks] instance. + StatusModelLinks({ + required this.self, + }); + + StatusModelLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is StatusModelLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'StatusModelLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [StatusModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StatusModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StatusModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StatusModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StatusModelLinks( + self: StatusModelLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StatusModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StatusModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StatusModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StatusModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/status_model_links_self.dart b/lib/model/status_model_links_self.dart new file mode 100644 index 0000000..f387264 --- /dev/null +++ b/lib/model/status_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StatusModelLinksSelf { + /// Returns a new [StatusModelLinksSelf] instance. + StatusModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is StatusModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'StatusModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [StatusModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StatusModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StatusModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StatusModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StatusModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StatusModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StatusModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StatusModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StatusModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/storage_file_model.dart b/lib/model/storage_file_model.dart new file mode 100644 index 0000000..7d19eb4 --- /dev/null +++ b/lib/model/storage_file_model.dart @@ -0,0 +1,333 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageFileModel { + /// Returns a new [StorageFileModel] instance. + StorageFileModel({ + required this.id, + required this.name, + this.mimeType, + this.size, + this.createdAt, + this.lastModifiedAt, + this.createdByName, + this.lastModifiedByName, + required this.type, + required this.location, + required this.links, + }); + + /// Linked file's id on the origin + String id; + + /// Linked file's name on the origin + String name; + + /// MIME type of the linked file. To link a folder entity, the custom MIME type `application/x-op-directory` MUST be provided. Otherwise it defaults back to an unknown MIME type. + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? mimeType; + + /// file size on origin in bytes + /// + /// Minimum value: 0 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? size; + + /// Timestamp of the creation datetime of the file on the origin + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? createdAt; + + /// Timestamp of the datetime of the last modification of the file on the origin + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? lastModifiedAt; + + /// Display name of the author that created the file on the origin + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? createdByName; + + /// Display name of the author that modified the file on the origin last + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? lastModifiedByName; + + StorageFileModelTypeEnum? type; + + /// Location identification for file in storage + Object? location; + + StorageFileModelAllOfLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageFileModel && + other.id == id && + other.name == name && + other.mimeType == mimeType && + other.size == size && + other.createdAt == createdAt && + other.lastModifiedAt == lastModifiedAt && + other.createdByName == createdByName && + other.lastModifiedByName == lastModifiedByName && + other.type == type && + other.location == location && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (name.hashCode) + + (mimeType == null ? 0 : mimeType!.hashCode) + + (size == null ? 0 : size!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (lastModifiedAt == null ? 0 : lastModifiedAt!.hashCode) + + (createdByName == null ? 0 : createdByName!.hashCode) + + (lastModifiedByName == null ? 0 : lastModifiedByName!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (location == null ? 0 : location!.hashCode) + + (links.hashCode); + + @override + String toString() => 'StorageFileModel[id=$id, name=$name, mimeType=$mimeType, size=$size, createdAt=$createdAt, lastModifiedAt=$lastModifiedAt, createdByName=$createdByName, lastModifiedByName=$lastModifiedByName, type=$type, location=$location, links=$links]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'name'] = this.name; + if (this.mimeType != null) { + json[r'mimeType'] = this.mimeType; + } else { + json[r'mimeType'] = null; + } + if (this.size != null) { + json[r'size'] = this.size; + } else { + json[r'size'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String(); + } else { + json[r'createdAt'] = null; + } + if (this.lastModifiedAt != null) { + json[r'lastModifiedAt'] = this.lastModifiedAt!.toUtc().toIso8601String(); + } else { + json[r'lastModifiedAt'] = null; + } + if (this.createdByName != null) { + json[r'createdByName'] = this.createdByName; + } else { + json[r'createdByName'] = null; + } + if (this.lastModifiedByName != null) { + json[r'lastModifiedByName'] = this.lastModifiedByName; + } else { + json[r'lastModifiedByName'] = null; + } + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.location != null) { + json[r'location'] = this.location; + } else { + json[r'location'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [StorageFileModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageFileModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageFileModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageFileModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageFileModel( + id: mapValueOfType(json, r'id')!, + name: mapValueOfType(json, r'name')!, + mimeType: mapValueOfType(json, r'mimeType'), + size: mapValueOfType(json, r'size'), + createdAt: mapDateTime(json, r'createdAt', r''), + lastModifiedAt: mapDateTime(json, r'lastModifiedAt', r''), + createdByName: mapValueOfType(json, r'createdByName'), + lastModifiedByName: mapValueOfType(json, r'lastModifiedByName'), + type: Object.fromJson(json[r'_type']), + location: mapValueOfType(json, r'location'), + links: StorageFileModelAllOfLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageFileModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageFileModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageFileModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageFileModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'name', + '_type', + 'location', + '_links', + }; +} + + +class StorageFileModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const StorageFileModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const storageFile = StorageFileModelTypeEnum._('StorageFile'); + + /// List of all possible values in this [enum][StorageFileModelTypeEnum]. + static const values = [ + storageFile, + ]; + + static StorageFileModelTypeEnum? fromJson(dynamic value) => StorageFileModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageFileModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [StorageFileModelTypeEnum] to Object, +/// and [decode] dynamic data back to [StorageFileModelTypeEnum]. +class StorageFileModelTypeEnumTypeTransformer { + factory StorageFileModelTypeEnumTypeTransformer() => _instance ??= const StorageFileModelTypeEnumTypeTransformer._(); + + const StorageFileModelTypeEnumTypeTransformer._(); + + Object encode(StorageFileModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a StorageFileModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + StorageFileModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'StorageFile': return StorageFileModelTypeEnum.storageFile; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [StorageFileModelTypeEnumTypeTransformer] instance. + static StorageFileModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/storage_file_model_all_of_links.dart b/lib/model/storage_file_model_all_of_links.dart new file mode 100644 index 0000000..56fee9e --- /dev/null +++ b/lib/model/storage_file_model_all_of_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageFileModelAllOfLinks { + /// Returns a new [StorageFileModelAllOfLinks] instance. + StorageFileModelAllOfLinks({ + required this.self, + }); + + StorageFileModelAllOfLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageFileModelAllOfLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'StorageFileModelAllOfLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [StorageFileModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageFileModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageFileModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageFileModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageFileModelAllOfLinks( + self: StorageFileModelAllOfLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageFileModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageFileModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageFileModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageFileModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/storage_file_model_all_of_links_self.dart b/lib/model/storage_file_model_all_of_links_self.dart new file mode 100644 index 0000000..f007192 --- /dev/null +++ b/lib/model/storage_file_model_all_of_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageFileModelAllOfLinksSelf { + /// Returns a new [StorageFileModelAllOfLinksSelf] instance. + StorageFileModelAllOfLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageFileModelAllOfLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'StorageFileModelAllOfLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [StorageFileModelAllOfLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageFileModelAllOfLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageFileModelAllOfLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageFileModelAllOfLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageFileModelAllOfLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageFileModelAllOfLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageFileModelAllOfLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageFileModelAllOfLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageFileModelAllOfLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/storage_file_upload_link_model.dart b/lib/model/storage_file_upload_link_model.dart new file mode 100644 index 0000000..3f61b65 --- /dev/null +++ b/lib/model/storage_file_upload_link_model.dart @@ -0,0 +1,192 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageFileUploadLinkModel { + /// Returns a new [StorageFileUploadLinkModel] instance. + StorageFileUploadLinkModel({ + required this.type, + required this.links, + }); + + StorageFileUploadLinkModelTypeEnum? type; + + StorageFileUploadLinkModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageFileUploadLinkModel && + other.type == type && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (links.hashCode); + + @override + String toString() => 'StorageFileUploadLinkModel[type=$type, links=$links]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [StorageFileUploadLinkModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageFileUploadLinkModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageFileUploadLinkModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageFileUploadLinkModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageFileUploadLinkModel( + type: Object.fromJson(json[r'_type']), + links: StorageFileUploadLinkModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageFileUploadLinkModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageFileUploadLinkModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageFileUploadLinkModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageFileUploadLinkModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + '_links', + }; +} + + +class StorageFileUploadLinkModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const StorageFileUploadLinkModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const uploadLink = StorageFileUploadLinkModelTypeEnum._('UploadLink'); + + /// List of all possible values in this [enum][StorageFileUploadLinkModelTypeEnum]. + static const values = [ + uploadLink, + ]; + + static StorageFileUploadLinkModelTypeEnum? fromJson(dynamic value) => StorageFileUploadLinkModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageFileUploadLinkModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [StorageFileUploadLinkModelTypeEnum] to Object, +/// and [decode] dynamic data back to [StorageFileUploadLinkModelTypeEnum]. +class StorageFileUploadLinkModelTypeEnumTypeTransformer { + factory StorageFileUploadLinkModelTypeEnumTypeTransformer() => _instance ??= const StorageFileUploadLinkModelTypeEnumTypeTransformer._(); + + const StorageFileUploadLinkModelTypeEnumTypeTransformer._(); + + Object encode(StorageFileUploadLinkModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a StorageFileUploadLinkModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + StorageFileUploadLinkModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'UploadLink': return StorageFileUploadLinkModelTypeEnum.uploadLink; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [StorageFileUploadLinkModelTypeEnumTypeTransformer] instance. + static StorageFileUploadLinkModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/storage_file_upload_link_model_links.dart b/lib/model/storage_file_upload_link_model_links.dart new file mode 100644 index 0000000..94001f9 --- /dev/null +++ b/lib/model/storage_file_upload_link_model_links.dart @@ -0,0 +1,117 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageFileUploadLinkModelLinks { + /// Returns a new [StorageFileUploadLinkModelLinks] instance. + StorageFileUploadLinkModelLinks({ + required this.self, + required this.destination, + }); + + StorageFileUploadLinkModelLinksSelf self; + + StorageFileUploadLinkModelLinksDestination destination; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageFileUploadLinkModelLinks && + other.self == self && + other.destination == destination; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (destination.hashCode); + + @override + String toString() => 'StorageFileUploadLinkModelLinks[self=$self, destination=$destination]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'destination'] = this.destination; + return json; + } + + /// Returns a new [StorageFileUploadLinkModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageFileUploadLinkModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageFileUploadLinkModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageFileUploadLinkModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageFileUploadLinkModelLinks( + self: StorageFileUploadLinkModelLinksSelf.fromJson(json[r'self'])!, + destination: StorageFileUploadLinkModelLinksDestination.fromJson(json[r'destination'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageFileUploadLinkModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageFileUploadLinkModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageFileUploadLinkModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageFileUploadLinkModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'destination', + }; +} + diff --git a/lib/model/storage_file_upload_link_model_links_destination.dart b/lib/model/storage_file_upload_link_model_links_destination.dart new file mode 100644 index 0000000..1de4967 --- /dev/null +++ b/lib/model/storage_file_upload_link_model_links_destination.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageFileUploadLinkModelLinksDestination { + /// Returns a new [StorageFileUploadLinkModelLinksDestination] instance. + StorageFileUploadLinkModelLinksDestination({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageFileUploadLinkModelLinksDestination && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'StorageFileUploadLinkModelLinksDestination[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [StorageFileUploadLinkModelLinksDestination] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageFileUploadLinkModelLinksDestination? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageFileUploadLinkModelLinksDestination[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageFileUploadLinkModelLinksDestination[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageFileUploadLinkModelLinksDestination( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageFileUploadLinkModelLinksDestination.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageFileUploadLinkModelLinksDestination.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageFileUploadLinkModelLinksDestination-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageFileUploadLinkModelLinksDestination.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/storage_file_upload_link_model_links_self.dart b/lib/model/storage_file_upload_link_model_links_self.dart new file mode 100644 index 0000000..c097af0 --- /dev/null +++ b/lib/model/storage_file_upload_link_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageFileUploadLinkModelLinksSelf { + /// Returns a new [StorageFileUploadLinkModelLinksSelf] instance. + StorageFileUploadLinkModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageFileUploadLinkModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'StorageFileUploadLinkModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [StorageFileUploadLinkModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageFileUploadLinkModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageFileUploadLinkModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageFileUploadLinkModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageFileUploadLinkModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageFileUploadLinkModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageFileUploadLinkModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageFileUploadLinkModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageFileUploadLinkModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/storage_file_upload_preparation_model.dart b/lib/model/storage_file_upload_preparation_model.dart new file mode 100644 index 0000000..4d9a108 --- /dev/null +++ b/lib/model/storage_file_upload_preparation_model.dart @@ -0,0 +1,142 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageFileUploadPreparationModel { + /// Returns a new [StorageFileUploadPreparationModel] instance. + StorageFileUploadPreparationModel({ + required this.projectId, + required this.fileName, + required this.parent, + }); + + /// The project identifier, from where a user starts uploading a file. + /// + /// Minimum value: 1 + Object? projectId; + + /// The file name. + Object? fileName; + + /// The directory to which the file is to be uploaded. For root directories, the value `/` must be provided. + Object? parent; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageFileUploadPreparationModel && + other.projectId == projectId && + other.fileName == fileName && + other.parent == parent; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (projectId == null ? 0 : projectId!.hashCode) + + (fileName == null ? 0 : fileName!.hashCode) + + (parent == null ? 0 : parent!.hashCode); + + @override + String toString() => 'StorageFileUploadPreparationModel[projectId=$projectId, fileName=$fileName, parent=$parent]'; + + Map toJson() { + final json = {}; + if (this.projectId != null) { + json[r'projectId'] = this.projectId; + } else { + json[r'projectId'] = null; + } + if (this.fileName != null) { + json[r'fileName'] = this.fileName; + } else { + json[r'fileName'] = null; + } + if (this.parent != null) { + json[r'parent'] = this.parent; + } else { + json[r'parent'] = null; + } + return json; + } + + /// Returns a new [StorageFileUploadPreparationModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageFileUploadPreparationModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageFileUploadPreparationModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageFileUploadPreparationModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageFileUploadPreparationModel( + projectId: mapValueOfType(json, r'projectId'), + fileName: mapValueOfType(json, r'fileName'), + parent: mapValueOfType(json, r'parent'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageFileUploadPreparationModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageFileUploadPreparationModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageFileUploadPreparationModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageFileUploadPreparationModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'projectId', + 'fileName', + 'parent', + }; +} + diff --git a/lib/model/storage_files_model.dart b/lib/model/storage_files_model.dart new file mode 100644 index 0000000..0d692ce --- /dev/null +++ b/lib/model/storage_files_model.dart @@ -0,0 +1,226 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageFilesModel { + /// Returns a new [StorageFilesModel] instance. + StorageFilesModel({ + required this.type, + required this.files, + required this.parent, + required this.ancestors, + required this.links, + }); + + StorageFilesModelTypeEnum? type; + + /// List of files provided by the selected storage. + Object? files; + + StorageFilesModelParent parent; + + /// List of ancestors of the parent directory. Can be empty, if parent directory was root directory. + Object? ancestors; + + StorageFileModelAllOfLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageFilesModel && + other.type == type && + other.files == files && + other.parent == parent && + other.ancestors == ancestors && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (files == null ? 0 : files!.hashCode) + + (parent.hashCode) + + (ancestors == null ? 0 : ancestors!.hashCode) + + (links.hashCode); + + @override + String toString() => 'StorageFilesModel[type=$type, files=$files, parent=$parent, ancestors=$ancestors, links=$links]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.files != null) { + json[r'files'] = this.files; + } else { + json[r'files'] = null; + } + json[r'parent'] = this.parent; + if (this.ancestors != null) { + json[r'ancestors'] = this.ancestors; + } else { + json[r'ancestors'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [StorageFilesModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageFilesModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageFilesModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageFilesModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageFilesModel( + type: Object.fromJson(json[r'_type']), + files: mapValueOfType(json, r'files'), + parent: StorageFilesModelParent.fromJson(json[r'parent'])!, + ancestors: mapValueOfType(json, r'ancestors'), + links: StorageFileModelAllOfLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageFilesModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageFilesModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageFilesModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageFilesModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'files', + 'parent', + 'ancestors', + '_links', + }; +} + + +class StorageFilesModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const StorageFilesModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const storageFiles = StorageFilesModelTypeEnum._('StorageFiles'); + + /// List of all possible values in this [enum][StorageFilesModelTypeEnum]. + static const values = [ + storageFiles, + ]; + + static StorageFilesModelTypeEnum? fromJson(dynamic value) => StorageFilesModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageFilesModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [StorageFilesModelTypeEnum] to Object, +/// and [decode] dynamic data back to [StorageFilesModelTypeEnum]. +class StorageFilesModelTypeEnumTypeTransformer { + factory StorageFilesModelTypeEnumTypeTransformer() => _instance ??= const StorageFilesModelTypeEnumTypeTransformer._(); + + const StorageFilesModelTypeEnumTypeTransformer._(); + + Object encode(StorageFilesModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a StorageFilesModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + StorageFilesModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'StorageFiles': return StorageFilesModelTypeEnum.storageFiles; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [StorageFilesModelTypeEnumTypeTransformer] instance. + static StorageFilesModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/storage_files_model_parent.dart b/lib/model/storage_files_model_parent.dart new file mode 100644 index 0000000..4df22eb --- /dev/null +++ b/lib/model/storage_files_model_parent.dart @@ -0,0 +1,333 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageFilesModelParent { + /// Returns a new [StorageFilesModelParent] instance. + StorageFilesModelParent({ + required this.id, + required this.name, + this.mimeType, + this.size, + this.createdAt, + this.lastModifiedAt, + this.createdByName, + this.lastModifiedByName, + required this.type, + required this.location, + required this.links, + }); + + /// Linked file's id on the origin + String id; + + /// Linked file's name on the origin + String name; + + /// MIME type of the linked file. To link a folder entity, the custom MIME type `application/x-op-directory` MUST be provided. Otherwise it defaults back to an unknown MIME type. + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? mimeType; + + /// file size on origin in bytes + /// + /// Minimum value: 0 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? size; + + /// Timestamp of the creation datetime of the file on the origin + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? createdAt; + + /// Timestamp of the datetime of the last modification of the file on the origin + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? lastModifiedAt; + + /// Display name of the author that created the file on the origin + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? createdByName; + + /// Display name of the author that modified the file on the origin last + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? lastModifiedByName; + + StorageFilesModelParentTypeEnum? type; + + /// Location identification for file in storage + Object? location; + + StorageFileModelAllOfLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageFilesModelParent && + other.id == id && + other.name == name && + other.mimeType == mimeType && + other.size == size && + other.createdAt == createdAt && + other.lastModifiedAt == lastModifiedAt && + other.createdByName == createdByName && + other.lastModifiedByName == lastModifiedByName && + other.type == type && + other.location == location && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id.hashCode) + + (name.hashCode) + + (mimeType == null ? 0 : mimeType!.hashCode) + + (size == null ? 0 : size!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (lastModifiedAt == null ? 0 : lastModifiedAt!.hashCode) + + (createdByName == null ? 0 : createdByName!.hashCode) + + (lastModifiedByName == null ? 0 : lastModifiedByName!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (location == null ? 0 : location!.hashCode) + + (links.hashCode); + + @override + String toString() => 'StorageFilesModelParent[id=$id, name=$name, mimeType=$mimeType, size=$size, createdAt=$createdAt, lastModifiedAt=$lastModifiedAt, createdByName=$createdByName, lastModifiedByName=$lastModifiedByName, type=$type, location=$location, links=$links]'; + + Map toJson() { + final json = {}; + json[r'id'] = this.id; + json[r'name'] = this.name; + if (this.mimeType != null) { + json[r'mimeType'] = this.mimeType; + } else { + json[r'mimeType'] = null; + } + if (this.size != null) { + json[r'size'] = this.size; + } else { + json[r'size'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String(); + } else { + json[r'createdAt'] = null; + } + if (this.lastModifiedAt != null) { + json[r'lastModifiedAt'] = this.lastModifiedAt!.toUtc().toIso8601String(); + } else { + json[r'lastModifiedAt'] = null; + } + if (this.createdByName != null) { + json[r'createdByName'] = this.createdByName; + } else { + json[r'createdByName'] = null; + } + if (this.lastModifiedByName != null) { + json[r'lastModifiedByName'] = this.lastModifiedByName; + } else { + json[r'lastModifiedByName'] = null; + } + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.location != null) { + json[r'location'] = this.location; + } else { + json[r'location'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [StorageFilesModelParent] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageFilesModelParent? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageFilesModelParent[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageFilesModelParent[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageFilesModelParent( + id: mapValueOfType(json, r'id')!, + name: mapValueOfType(json, r'name')!, + mimeType: mapValueOfType(json, r'mimeType'), + size: mapValueOfType(json, r'size'), + createdAt: mapDateTime(json, r'createdAt', r''), + lastModifiedAt: mapDateTime(json, r'lastModifiedAt', r''), + createdByName: mapValueOfType(json, r'createdByName'), + lastModifiedByName: mapValueOfType(json, r'lastModifiedByName'), + type: Object.fromJson(json[r'_type']), + location: mapValueOfType(json, r'location'), + links: StorageFileModelAllOfLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageFilesModelParent.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageFilesModelParent.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageFilesModelParent-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageFilesModelParent.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + 'name', + '_type', + 'location', + '_links', + }; +} + + +class StorageFilesModelParentTypeEnum { + /// Instantiate a new enum with the provided [value]. + const StorageFilesModelParentTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const storageFile = StorageFilesModelParentTypeEnum._('StorageFile'); + + /// List of all possible values in this [enum][StorageFilesModelParentTypeEnum]. + static const values = [ + storageFile, + ]; + + static StorageFilesModelParentTypeEnum? fromJson(dynamic value) => StorageFilesModelParentTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageFilesModelParentTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [StorageFilesModelParentTypeEnum] to Object, +/// and [decode] dynamic data back to [StorageFilesModelParentTypeEnum]. +class StorageFilesModelParentTypeEnumTypeTransformer { + factory StorageFilesModelParentTypeEnumTypeTransformer() => _instance ??= const StorageFilesModelParentTypeEnumTypeTransformer._(); + + const StorageFilesModelParentTypeEnumTypeTransformer._(); + + Object encode(StorageFilesModelParentTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a StorageFilesModelParentTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + StorageFilesModelParentTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'StorageFile': return StorageFilesModelParentTypeEnum.storageFile; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [StorageFilesModelParentTypeEnumTypeTransformer] instance. + static StorageFilesModelParentTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/storage_read_model.dart b/lib/model/storage_read_model.dart new file mode 100644 index 0000000..694bbf0 --- /dev/null +++ b/lib/model/storage_read_model.dart @@ -0,0 +1,271 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageReadModel { + /// Returns a new [StorageReadModel] instance. + StorageReadModel({ + required this.id, + required this.type, + required this.name, + this.hasApplicationPassword, + this.createdAt, + this.updatedAt, + this.embedded, + required this.links, + }); + + /// Storage id + Object? id; + + StorageReadModelTypeEnum? type; + + /// Storage name + Object? name; + + /// Whether the storage has the application password to use for the Nextcloud storage. Ignored if the provider type is not Nextcloud + Object? hasApplicationPassword; + + /// Time of creation + Object? createdAt; + + /// Time of the most recent change to the storage + Object? updatedAt; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + StorageReadModelEmbedded? embedded; + + StorageReadModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageReadModel && + other.id == id && + other.type == type && + other.name == name && + other.hasApplicationPassword == hasApplicationPassword && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.embedded == embedded && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (hasApplicationPassword == null ? 0 : hasApplicationPassword!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (embedded == null ? 0 : embedded!.hashCode) + + (links.hashCode); + + @override + String toString() => 'StorageReadModel[id=$id, type=$type, name=$name, hasApplicationPassword=$hasApplicationPassword, createdAt=$createdAt, updatedAt=$updatedAt, embedded=$embedded, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.hasApplicationPassword != null) { + json[r'hasApplicationPassword'] = this.hasApplicationPassword; + } else { + json[r'hasApplicationPassword'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt; + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt; + } else { + json[r'updatedAt'] = null; + } + if (this.embedded != null) { + json[r'_embedded'] = this.embedded; + } else { + json[r'_embedded'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [StorageReadModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageReadModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageReadModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageReadModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageReadModel( + id: mapValueOfType(json, r'id'), + type: Object.fromJson(json[r'_type']), + name: mapValueOfType(json, r'name'), + hasApplicationPassword: mapValueOfType(json, r'hasApplicationPassword'), + createdAt: mapValueOfType(json, r'createdAt'), + updatedAt: mapValueOfType(json, r'updatedAt'), + embedded: StorageReadModelEmbedded.fromJson(json[r'_embedded']), + links: StorageReadModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageReadModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageReadModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageReadModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageReadModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'id', + '_type', + 'name', + '_links', + }; +} + + +class StorageReadModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const StorageReadModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const storage = StorageReadModelTypeEnum._('Storage'); + + /// List of all possible values in this [enum][StorageReadModelTypeEnum]. + static const values = [ + storage, + ]; + + static StorageReadModelTypeEnum? fromJson(dynamic value) => StorageReadModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageReadModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [StorageReadModelTypeEnum] to Object, +/// and [decode] dynamic data back to [StorageReadModelTypeEnum]. +class StorageReadModelTypeEnumTypeTransformer { + factory StorageReadModelTypeEnumTypeTransformer() => _instance ??= const StorageReadModelTypeEnumTypeTransformer._(); + + const StorageReadModelTypeEnumTypeTransformer._(); + + Object encode(StorageReadModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a StorageReadModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + StorageReadModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'Storage': return StorageReadModelTypeEnum.storage; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [StorageReadModelTypeEnumTypeTransformer] instance. + static StorageReadModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/storage_read_model_embedded.dart b/lib/model/storage_read_model_embedded.dart new file mode 100644 index 0000000..e9a429a --- /dev/null +++ b/lib/model/storage_read_model_embedded.dart @@ -0,0 +1,117 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageReadModelEmbedded { + /// Returns a new [StorageReadModelEmbedded] instance. + StorageReadModelEmbedded({ + required this.oauthApplication, + required this.oauthClientCredentials, + }); + + OAuthApplicationReadModel oauthApplication; + + OAuthClientCredentialsReadModel oauthClientCredentials; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageReadModelEmbedded && + other.oauthApplication == oauthApplication && + other.oauthClientCredentials == oauthClientCredentials; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (oauthApplication.hashCode) + + (oauthClientCredentials.hashCode); + + @override + String toString() => 'StorageReadModelEmbedded[oauthApplication=$oauthApplication, oauthClientCredentials=$oauthClientCredentials]'; + + Map toJson() { + final json = {}; + json[r'oauthApplication'] = this.oauthApplication; + json[r'oauthClientCredentials'] = this.oauthClientCredentials; + return json; + } + + /// Returns a new [StorageReadModelEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageReadModelEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageReadModelEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageReadModelEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageReadModelEmbedded( + oauthApplication: OAuthApplicationReadModel.fromJson(json[r'oauthApplication'])!, + oauthClientCredentials: OAuthClientCredentialsReadModel.fromJson(json[r'oauthClientCredentials'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageReadModelEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageReadModelEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageReadModelEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageReadModelEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'oauthApplication', + 'oauthClientCredentials', + }; +} + diff --git a/lib/model/storage_read_model_links.dart b/lib/model/storage_read_model_links.dart new file mode 100644 index 0000000..f8d879c --- /dev/null +++ b/lib/model/storage_read_model_links.dart @@ -0,0 +1,192 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageReadModelLinks { + /// Returns a new [StorageReadModelLinks] instance. + StorageReadModelLinks({ + required this.self, + required this.type, + required this.origin, + required this.open, + required this.authorizationState, + this.authorize, + this.oauthApplication, + this.oauthClientCredentials, + }); + + StorageReadModelLinksSelf self; + + StorageReadModelLinksType type; + + StorageReadModelLinksOrigin origin; + + StorageReadModelLinksOpen open; + + StorageReadModelLinksAuthorizationState authorizationState; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + StorageReadModelLinksAuthorize? authorize; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + StorageReadModelLinksOauthApplication? oauthApplication; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + StorageReadModelLinksOauthClientCredentials? oauthClientCredentials; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageReadModelLinks && + other.self == self && + other.type == type && + other.origin == origin && + other.open == open && + other.authorizationState == authorizationState && + other.authorize == authorize && + other.oauthApplication == oauthApplication && + other.oauthClientCredentials == oauthClientCredentials; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (type.hashCode) + + (origin.hashCode) + + (open.hashCode) + + (authorizationState.hashCode) + + (authorize == null ? 0 : authorize!.hashCode) + + (oauthApplication == null ? 0 : oauthApplication!.hashCode) + + (oauthClientCredentials == null ? 0 : oauthClientCredentials!.hashCode); + + @override + String toString() => 'StorageReadModelLinks[self=$self, type=$type, origin=$origin, open=$open, authorizationState=$authorizationState, authorize=$authorize, oauthApplication=$oauthApplication, oauthClientCredentials=$oauthClientCredentials]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'type'] = this.type; + json[r'origin'] = this.origin; + json[r'open'] = this.open; + json[r'authorizationState'] = this.authorizationState; + if (this.authorize != null) { + json[r'authorize'] = this.authorize; + } else { + json[r'authorize'] = null; + } + if (this.oauthApplication != null) { + json[r'oauthApplication'] = this.oauthApplication; + } else { + json[r'oauthApplication'] = null; + } + if (this.oauthClientCredentials != null) { + json[r'oauthClientCredentials'] = this.oauthClientCredentials; + } else { + json[r'oauthClientCredentials'] = null; + } + return json; + } + + /// Returns a new [StorageReadModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageReadModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageReadModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageReadModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageReadModelLinks( + self: StorageReadModelLinksSelf.fromJson(json[r'self'])!, + type: StorageReadModelLinksType.fromJson(json[r'type'])!, + origin: StorageReadModelLinksOrigin.fromJson(json[r'origin'])!, + open: StorageReadModelLinksOpen.fromJson(json[r'open'])!, + authorizationState: StorageReadModelLinksAuthorizationState.fromJson(json[r'authorizationState'])!, + authorize: StorageReadModelLinksAuthorize.fromJson(json[r'authorize']), + oauthApplication: StorageReadModelLinksOauthApplication.fromJson(json[r'oauthApplication']), + oauthClientCredentials: StorageReadModelLinksOauthClientCredentials.fromJson(json[r'oauthClientCredentials']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageReadModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageReadModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageReadModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageReadModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'type', + 'origin', + 'open', + 'authorizationState', + }; +} + diff --git a/lib/model/storage_read_model_links_authorization_state.dart b/lib/model/storage_read_model_links_authorization_state.dart new file mode 100644 index 0000000..33db2d8 --- /dev/null +++ b/lib/model/storage_read_model_links_authorization_state.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageReadModelLinksAuthorizationState { + /// Returns a new [StorageReadModelLinksAuthorizationState] instance. + StorageReadModelLinksAuthorizationState({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageReadModelLinksAuthorizationState && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'StorageReadModelLinksAuthorizationState[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [StorageReadModelLinksAuthorizationState] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageReadModelLinksAuthorizationState? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageReadModelLinksAuthorizationState[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageReadModelLinksAuthorizationState[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageReadModelLinksAuthorizationState( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageReadModelLinksAuthorizationState.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageReadModelLinksAuthorizationState.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageReadModelLinksAuthorizationState-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageReadModelLinksAuthorizationState.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/storage_read_model_links_authorize.dart b/lib/model/storage_read_model_links_authorize.dart new file mode 100644 index 0000000..0fe897c --- /dev/null +++ b/lib/model/storage_read_model_links_authorize.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageReadModelLinksAuthorize { + /// Returns a new [StorageReadModelLinksAuthorize] instance. + StorageReadModelLinksAuthorize({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageReadModelLinksAuthorize && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'StorageReadModelLinksAuthorize[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [StorageReadModelLinksAuthorize] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageReadModelLinksAuthorize? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageReadModelLinksAuthorize[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageReadModelLinksAuthorize[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageReadModelLinksAuthorize( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageReadModelLinksAuthorize.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageReadModelLinksAuthorize.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageReadModelLinksAuthorize-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageReadModelLinksAuthorize.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/storage_read_model_links_oauth_application.dart b/lib/model/storage_read_model_links_oauth_application.dart new file mode 100644 index 0000000..9112bac --- /dev/null +++ b/lib/model/storage_read_model_links_oauth_application.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageReadModelLinksOauthApplication { + /// Returns a new [StorageReadModelLinksOauthApplication] instance. + StorageReadModelLinksOauthApplication({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageReadModelLinksOauthApplication && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'StorageReadModelLinksOauthApplication[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [StorageReadModelLinksOauthApplication] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageReadModelLinksOauthApplication? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageReadModelLinksOauthApplication[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageReadModelLinksOauthApplication[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageReadModelLinksOauthApplication( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageReadModelLinksOauthApplication.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageReadModelLinksOauthApplication.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageReadModelLinksOauthApplication-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageReadModelLinksOauthApplication.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/storage_read_model_links_oauth_client_credentials.dart b/lib/model/storage_read_model_links_oauth_client_credentials.dart new file mode 100644 index 0000000..564d188 --- /dev/null +++ b/lib/model/storage_read_model_links_oauth_client_credentials.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageReadModelLinksOauthClientCredentials { + /// Returns a new [StorageReadModelLinksOauthClientCredentials] instance. + StorageReadModelLinksOauthClientCredentials({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageReadModelLinksOauthClientCredentials && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'StorageReadModelLinksOauthClientCredentials[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [StorageReadModelLinksOauthClientCredentials] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageReadModelLinksOauthClientCredentials? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageReadModelLinksOauthClientCredentials[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageReadModelLinksOauthClientCredentials[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageReadModelLinksOauthClientCredentials( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageReadModelLinksOauthClientCredentials.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageReadModelLinksOauthClientCredentials.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageReadModelLinksOauthClientCredentials-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageReadModelLinksOauthClientCredentials.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/storage_read_model_links_open.dart b/lib/model/storage_read_model_links_open.dart new file mode 100644 index 0000000..714470a --- /dev/null +++ b/lib/model/storage_read_model_links_open.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageReadModelLinksOpen { + /// Returns a new [StorageReadModelLinksOpen] instance. + StorageReadModelLinksOpen({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageReadModelLinksOpen && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'StorageReadModelLinksOpen[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [StorageReadModelLinksOpen] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageReadModelLinksOpen? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageReadModelLinksOpen[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageReadModelLinksOpen[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageReadModelLinksOpen( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageReadModelLinksOpen.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageReadModelLinksOpen.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageReadModelLinksOpen-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageReadModelLinksOpen.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/storage_read_model_links_origin.dart b/lib/model/storage_read_model_links_origin.dart new file mode 100644 index 0000000..660252f --- /dev/null +++ b/lib/model/storage_read_model_links_origin.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageReadModelLinksOrigin { + /// Returns a new [StorageReadModelLinksOrigin] instance. + StorageReadModelLinksOrigin({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageReadModelLinksOrigin && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'StorageReadModelLinksOrigin[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [StorageReadModelLinksOrigin] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageReadModelLinksOrigin? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageReadModelLinksOrigin[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageReadModelLinksOrigin[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageReadModelLinksOrigin( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageReadModelLinksOrigin.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageReadModelLinksOrigin.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageReadModelLinksOrigin-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageReadModelLinksOrigin.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/storage_read_model_links_self.dart b/lib/model/storage_read_model_links_self.dart new file mode 100644 index 0000000..894f8b4 --- /dev/null +++ b/lib/model/storage_read_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageReadModelLinksSelf { + /// Returns a new [StorageReadModelLinksSelf] instance. + StorageReadModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageReadModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'StorageReadModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [StorageReadModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageReadModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageReadModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageReadModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageReadModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageReadModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageReadModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageReadModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageReadModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/storage_read_model_links_type.dart b/lib/model/storage_read_model_links_type.dart new file mode 100644 index 0000000..aa579c4 --- /dev/null +++ b/lib/model/storage_read_model_links_type.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageReadModelLinksType { + /// Returns a new [StorageReadModelLinksType] instance. + StorageReadModelLinksType({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageReadModelLinksType && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'StorageReadModelLinksType[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [StorageReadModelLinksType] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageReadModelLinksType? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageReadModelLinksType[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageReadModelLinksType[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageReadModelLinksType( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageReadModelLinksType.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageReadModelLinksType.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageReadModelLinksType-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageReadModelLinksType.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/storage_write_model.dart b/lib/model/storage_write_model.dart new file mode 100644 index 0000000..2f8fecc --- /dev/null +++ b/lib/model/storage_write_model.dart @@ -0,0 +1,142 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageWriteModel { + /// Returns a new [StorageWriteModel] instance. + StorageWriteModel({ + this.name, + this.applicationPassword, + this.links, + }); + + /// Storage name, if not provided, falls back to a default. + Object? name; + + /// The application password to use for the Nextcloud storage. Ignored if the provider type is not Nextcloud. If a string is provided, the password is set and automatic management is enabled for the storage. If null is provided, the password is unset and automatic management is disabled for the storage. + Object? applicationPassword; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + StorageWriteModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageWriteModel && + other.name == name && + other.applicationPassword == applicationPassword && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (name == null ? 0 : name!.hashCode) + + (applicationPassword == null ? 0 : applicationPassword!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'StorageWriteModel[name=$name, applicationPassword=$applicationPassword, links=$links]'; + + Map toJson() { + final json = {}; + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.applicationPassword != null) { + json[r'applicationPassword'] = this.applicationPassword; + } else { + json[r'applicationPassword'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [StorageWriteModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageWriteModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageWriteModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageWriteModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageWriteModel( + name: mapValueOfType(json, r'name'), + applicationPassword: mapValueOfType(json, r'applicationPassword'), + links: StorageWriteModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageWriteModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageWriteModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageWriteModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageWriteModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/storage_write_model_links.dart b/lib/model/storage_write_model_links.dart new file mode 100644 index 0000000..feaaa8e --- /dev/null +++ b/lib/model/storage_write_model_links.dart @@ -0,0 +1,117 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageWriteModelLinks { + /// Returns a new [StorageWriteModelLinks] instance. + StorageWriteModelLinks({ + required this.origin, + required this.type, + }); + + StorageWriteModelLinksOrigin origin; + + StorageWriteModelLinksType type; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageWriteModelLinks && + other.origin == origin && + other.type == type; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (origin.hashCode) + + (type.hashCode); + + @override + String toString() => 'StorageWriteModelLinks[origin=$origin, type=$type]'; + + Map toJson() { + final json = {}; + json[r'origin'] = this.origin; + json[r'type'] = this.type; + return json; + } + + /// Returns a new [StorageWriteModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageWriteModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageWriteModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageWriteModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageWriteModelLinks( + origin: StorageWriteModelLinksOrigin.fromJson(json[r'origin'])!, + type: StorageWriteModelLinksType.fromJson(json[r'type'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageWriteModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageWriteModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageWriteModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageWriteModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'origin', + 'type', + }; +} + diff --git a/lib/model/storage_write_model_links_origin.dart b/lib/model/storage_write_model_links_origin.dart new file mode 100644 index 0000000..28714cf --- /dev/null +++ b/lib/model/storage_write_model_links_origin.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageWriteModelLinksOrigin { + /// Returns a new [StorageWriteModelLinksOrigin] instance. + StorageWriteModelLinksOrigin({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageWriteModelLinksOrigin && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'StorageWriteModelLinksOrigin[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [StorageWriteModelLinksOrigin] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageWriteModelLinksOrigin? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageWriteModelLinksOrigin[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageWriteModelLinksOrigin[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageWriteModelLinksOrigin( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageWriteModelLinksOrigin.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageWriteModelLinksOrigin.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageWriteModelLinksOrigin-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageWriteModelLinksOrigin.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/storage_write_model_links_type.dart b/lib/model/storage_write_model_links_type.dart new file mode 100644 index 0000000..efcb3c7 --- /dev/null +++ b/lib/model/storage_write_model_links_type.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class StorageWriteModelLinksType { + /// Returns a new [StorageWriteModelLinksType] instance. + StorageWriteModelLinksType({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is StorageWriteModelLinksType && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'StorageWriteModelLinksType[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [StorageWriteModelLinksType] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static StorageWriteModelLinksType? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "StorageWriteModelLinksType[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "StorageWriteModelLinksType[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return StorageWriteModelLinksType( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = StorageWriteModelLinksType.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = StorageWriteModelLinksType.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of StorageWriteModelLinksType-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = StorageWriteModelLinksType.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/time_entry_activity_model.dart b/lib/model/time_entry_activity_model.dart new file mode 100644 index 0000000..48dc3e2 --- /dev/null +++ b/lib/model/time_entry_activity_model.dart @@ -0,0 +1,254 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryActivityModel { + /// Returns a new [TimeEntryActivityModel] instance. + TimeEntryActivityModel({ + required this.type, + required this.id, + required this.name, + required this.position, + required this.default_, + required this.embedded, + required this.links, + }); + + TimeEntryActivityModelTypeEnum? type; + + /// Time entry id + /// + /// Minimum value: 1 + Object? id; + + /// The human readable name chosen for this activity + Object? name; + + /// The rank the activity has in a list of activities + Object? position; + + /// Flag to signal whether this activity is the default activity + Object? default_; + + TimeEntryActivityModelEmbedded embedded; + + TimeEntryActivityModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryActivityModel && + other.type == type && + other.id == id && + other.name == name && + other.position == position && + other.default_ == default_ && + other.embedded == embedded && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (position == null ? 0 : position!.hashCode) + + (default_ == null ? 0 : default_!.hashCode) + + (embedded.hashCode) + + (links.hashCode); + + @override + String toString() => 'TimeEntryActivityModel[type=$type, id=$id, name=$name, position=$position, default_=$default_, embedded=$embedded, links=$links]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.position != null) { + json[r'position'] = this.position; + } else { + json[r'position'] = null; + } + if (this.default_ != null) { + json[r'default'] = this.default_; + } else { + json[r'default'] = null; + } + json[r'_embedded'] = this.embedded; + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [TimeEntryActivityModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryActivityModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryActivityModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryActivityModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryActivityModel( + type: Object.fromJson(json[r'_type']), + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name'), + position: mapValueOfType(json, r'position'), + default_: mapValueOfType(json, r'default'), + embedded: TimeEntryActivityModelEmbedded.fromJson(json[r'_embedded'])!, + links: TimeEntryActivityModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryActivityModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryActivityModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryActivityModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryActivityModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'id', + 'name', + 'position', + 'default', + '_embedded', + '_links', + }; +} + + +class TimeEntryActivityModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const TimeEntryActivityModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const timeEntriesActivity = TimeEntryActivityModelTypeEnum._('TimeEntriesActivity'); + + /// List of all possible values in this [enum][TimeEntryActivityModelTypeEnum]. + static const values = [ + timeEntriesActivity, + ]; + + static TimeEntryActivityModelTypeEnum? fromJson(dynamic value) => TimeEntryActivityModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryActivityModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [TimeEntryActivityModelTypeEnum] to Object, +/// and [decode] dynamic data back to [TimeEntryActivityModelTypeEnum]. +class TimeEntryActivityModelTypeEnumTypeTransformer { + factory TimeEntryActivityModelTypeEnumTypeTransformer() => _instance ??= const TimeEntryActivityModelTypeEnumTypeTransformer._(); + + const TimeEntryActivityModelTypeEnumTypeTransformer._(); + + Object encode(TimeEntryActivityModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a TimeEntryActivityModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + TimeEntryActivityModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'TimeEntriesActivity': return TimeEntryActivityModelTypeEnum.timeEntriesActivity; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [TimeEntryActivityModelTypeEnumTypeTransformer] instance. + static TimeEntryActivityModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/time_entry_activity_model_embedded.dart b/lib/model/time_entry_activity_model_embedded.dart new file mode 100644 index 0000000..ed3cd0a --- /dev/null +++ b/lib/model/time_entry_activity_model_embedded.dart @@ -0,0 +1,113 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryActivityModelEmbedded { + /// Returns a new [TimeEntryActivityModelEmbedded] instance. + TimeEntryActivityModelEmbedded({ + required this.projects, + }); + + Object? projects; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryActivityModelEmbedded && + other.projects == projects; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (projects == null ? 0 : projects!.hashCode); + + @override + String toString() => 'TimeEntryActivityModelEmbedded[projects=$projects]'; + + Map toJson() { + final json = {}; + if (this.projects != null) { + json[r'projects'] = this.projects; + } else { + json[r'projects'] = null; + } + return json; + } + + /// Returns a new [TimeEntryActivityModelEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryActivityModelEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryActivityModelEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryActivityModelEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryActivityModelEmbedded( + projects: mapValueOfType(json, r'projects'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryActivityModelEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryActivityModelEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryActivityModelEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryActivityModelEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'projects', + }; +} + diff --git a/lib/model/time_entry_activity_model_links.dart b/lib/model/time_entry_activity_model_links.dart new file mode 100644 index 0000000..db23301 --- /dev/null +++ b/lib/model/time_entry_activity_model_links.dart @@ -0,0 +1,121 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryActivityModelLinks { + /// Returns a new [TimeEntryActivityModelLinks] instance. + TimeEntryActivityModelLinks({ + required this.self, + required this.projects, + }); + + TimeEntryActivityModelLinksSelf self; + + Object? projects; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryActivityModelLinks && + other.self == self && + other.projects == projects; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (projects == null ? 0 : projects!.hashCode); + + @override + String toString() => 'TimeEntryActivityModelLinks[self=$self, projects=$projects]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + if (this.projects != null) { + json[r'projects'] = this.projects; + } else { + json[r'projects'] = null; + } + return json; + } + + /// Returns a new [TimeEntryActivityModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryActivityModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryActivityModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryActivityModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryActivityModelLinks( + self: TimeEntryActivityModelLinksSelf.fromJson(json[r'self'])!, + projects: mapValueOfType(json, r'projects'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryActivityModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryActivityModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryActivityModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryActivityModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'projects', + }; +} + diff --git a/lib/model/time_entry_activity_model_links_self.dart b/lib/model/time_entry_activity_model_links_self.dart new file mode 100644 index 0000000..2ca35c4 --- /dev/null +++ b/lib/model/time_entry_activity_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryActivityModelLinksSelf { + /// Returns a new [TimeEntryActivityModelLinksSelf] instance. + TimeEntryActivityModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryActivityModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'TimeEntryActivityModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [TimeEntryActivityModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryActivityModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryActivityModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryActivityModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryActivityModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryActivityModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryActivityModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryActivityModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryActivityModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/time_entry_collection_model.dart b/lib/model/time_entry_collection_model.dart new file mode 100644 index 0000000..f0bbbf9 --- /dev/null +++ b/lib/model/time_entry_collection_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryCollectionModel { + /// Returns a new [TimeEntryCollectionModel] instance. + TimeEntryCollectionModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.embedded, + }); + + TimeEntryCollectionModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + TimeEntryCollectionModelAllOfLinks links; + + TimeEntryCollectionModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryCollectionModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'TimeEntryCollectionModel[type=$type, total=$total, count=$count, links=$links, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [TimeEntryCollectionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryCollectionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryCollectionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryCollectionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryCollectionModel( + type: TimeEntryCollectionModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: TimeEntryCollectionModelAllOfLinks.fromJson(json[r'_links'])!, + embedded: TimeEntryCollectionModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryCollectionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryCollectionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryCollectionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryCollectionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + '_embedded', + }; +} + + +class TimeEntryCollectionModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const TimeEntryCollectionModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = TimeEntryCollectionModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][TimeEntryCollectionModelTypeEnum]. + static const values = [ + collection, + ]; + + static TimeEntryCollectionModelTypeEnum? fromJson(dynamic value) => TimeEntryCollectionModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryCollectionModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [TimeEntryCollectionModelTypeEnum] to String, +/// and [decode] dynamic data back to [TimeEntryCollectionModelTypeEnum]. +class TimeEntryCollectionModelTypeEnumTypeTransformer { + factory TimeEntryCollectionModelTypeEnumTypeTransformer() => _instance ??= const TimeEntryCollectionModelTypeEnumTypeTransformer._(); + + const TimeEntryCollectionModelTypeEnumTypeTransformer._(); + + String encode(TimeEntryCollectionModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a TimeEntryCollectionModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + TimeEntryCollectionModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return TimeEntryCollectionModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [TimeEntryCollectionModelTypeEnumTypeTransformer] instance. + static TimeEntryCollectionModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/time_entry_collection_model_all_of_embedded.dart b/lib/model/time_entry_collection_model_all_of_embedded.dart new file mode 100644 index 0000000..85a85b9 --- /dev/null +++ b/lib/model/time_entry_collection_model_all_of_embedded.dart @@ -0,0 +1,113 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryCollectionModelAllOfEmbedded { + /// Returns a new [TimeEntryCollectionModelAllOfEmbedded] instance. + TimeEntryCollectionModelAllOfEmbedded({ + required this.elements, + }); + + Object? elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryCollectionModelAllOfEmbedded && + other.elements == elements; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements == null ? 0 : elements!.hashCode); + + @override + String toString() => 'TimeEntryCollectionModelAllOfEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + if (this.elements != null) { + json[r'elements'] = this.elements; + } else { + json[r'elements'] = null; + } + return json; + } + + /// Returns a new [TimeEntryCollectionModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryCollectionModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryCollectionModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryCollectionModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryCollectionModelAllOfEmbedded( + elements: mapValueOfType(json, r'elements'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryCollectionModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryCollectionModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryCollectionModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryCollectionModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'elements', + }; +} + diff --git a/lib/model/time_entry_collection_model_all_of_links.dart b/lib/model/time_entry_collection_model_all_of_links.dart new file mode 100644 index 0000000..9c61e24 --- /dev/null +++ b/lib/model/time_entry_collection_model_all_of_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryCollectionModelAllOfLinks { + /// Returns a new [TimeEntryCollectionModelAllOfLinks] instance. + TimeEntryCollectionModelAllOfLinks({ + required this.self, + }); + + TimeEntryCollectionModelAllOfLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryCollectionModelAllOfLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'TimeEntryCollectionModelAllOfLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [TimeEntryCollectionModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryCollectionModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryCollectionModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryCollectionModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryCollectionModelAllOfLinks( + self: TimeEntryCollectionModelAllOfLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryCollectionModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryCollectionModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryCollectionModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryCollectionModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/time_entry_collection_model_all_of_links_self.dart b/lib/model/time_entry_collection_model_all_of_links_self.dart new file mode 100644 index 0000000..4f0203e --- /dev/null +++ b/lib/model/time_entry_collection_model_all_of_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryCollectionModelAllOfLinksSelf { + /// Returns a new [TimeEntryCollectionModelAllOfLinksSelf] instance. + TimeEntryCollectionModelAllOfLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryCollectionModelAllOfLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'TimeEntryCollectionModelAllOfLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [TimeEntryCollectionModelAllOfLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryCollectionModelAllOfLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryCollectionModelAllOfLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryCollectionModelAllOfLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryCollectionModelAllOfLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryCollectionModelAllOfLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryCollectionModelAllOfLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryCollectionModelAllOfLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryCollectionModelAllOfLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/time_entry_model.dart b/lib/model/time_entry_model.dart new file mode 100644 index 0000000..15b81db --- /dev/null +++ b/lib/model/time_entry_model.dart @@ -0,0 +1,209 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryModel { + /// Returns a new [TimeEntryModel] instance. + TimeEntryModel({ + this.id, + this.comment, + this.spentOn, + this.hours, + this.ongoing, + this.createdAt, + this.updatedAt, + this.links, + }); + + /// The id of the time entry + /// + /// Minimum value: 1 + Object? id; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + TimeEntryModelComment? comment; + + /// The date the expenditure is booked for + Object? spentOn; + + /// The time quantifying the expenditure + Object? hours; + + /// Whether the time entry is actively tracking time + Object? ongoing; + + /// The time the time entry was created + Object? createdAt; + + /// The time the time entry was last updated + Object? updatedAt; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + TimeEntryModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryModel && + other.id == id && + other.comment == comment && + other.spentOn == spentOn && + other.hours == hours && + other.ongoing == ongoing && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (comment == null ? 0 : comment!.hashCode) + + (spentOn == null ? 0 : spentOn!.hashCode) + + (hours == null ? 0 : hours!.hashCode) + + (ongoing == null ? 0 : ongoing!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'TimeEntryModel[id=$id, comment=$comment, spentOn=$spentOn, hours=$hours, ongoing=$ongoing, createdAt=$createdAt, updatedAt=$updatedAt, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.comment != null) { + json[r'comment'] = this.comment; + } else { + json[r'comment'] = null; + } + if (this.spentOn != null) { + json[r'spentOn'] = this.spentOn; + } else { + json[r'spentOn'] = null; + } + if (this.hours != null) { + json[r'hours'] = this.hours; + } else { + json[r'hours'] = null; + } + if (this.ongoing != null) { + json[r'ongoing'] = this.ongoing; + } else { + json[r'ongoing'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt; + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt; + } else { + json[r'updatedAt'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [TimeEntryModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryModel( + id: mapValueOfType(json, r'id'), + comment: TimeEntryModelComment.fromJson(json[r'comment']), + spentOn: mapValueOfType(json, r'spentOn'), + hours: mapValueOfType(json, r'hours'), + ongoing: mapValueOfType(json, r'ongoing'), + createdAt: mapValueOfType(json, r'createdAt'), + updatedAt: mapValueOfType(json, r'updatedAt'), + links: TimeEntryModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/time_entry_model_comment.dart b/lib/model/time_entry_model_comment.dart new file mode 100644 index 0000000..8232797 --- /dev/null +++ b/lib/model/time_entry_model_comment.dart @@ -0,0 +1,223 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryModelComment { + /// Returns a new [TimeEntryModelComment] instance. + TimeEntryModelComment({ + required this.format, + this.raw, + this.html, + }); + + /// Indicates the formatting language of the raw text + TimeEntryModelCommentFormatEnum format; + + /// The raw text, as entered by the user + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? raw; + + /// The text converted to HTML according to the format + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? html; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryModelComment && + other.format == format && + other.raw == raw && + other.html == html; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (format.hashCode) + + (raw == null ? 0 : raw!.hashCode) + + (html == null ? 0 : html!.hashCode); + + @override + String toString() => 'TimeEntryModelComment[format=$format, raw=$raw, html=$html]'; + + Map toJson() { + final json = {}; + json[r'format'] = this.format; + if (this.raw != null) { + json[r'raw'] = this.raw; + } else { + json[r'raw'] = null; + } + if (this.html != null) { + json[r'html'] = this.html; + } else { + json[r'html'] = null; + } + return json; + } + + /// Returns a new [TimeEntryModelComment] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryModelComment? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryModelComment[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryModelComment[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryModelComment( + format: TimeEntryModelCommentFormatEnum.fromJson(json[r'format'])!, + raw: mapValueOfType(json, r'raw'), + html: mapValueOfType(json, r'html'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryModelComment.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryModelComment.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryModelComment-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryModelComment.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'format', + }; +} + +/// Indicates the formatting language of the raw text +class TimeEntryModelCommentFormatEnum { + /// Instantiate a new enum with the provided [value]. + const TimeEntryModelCommentFormatEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const plain = TimeEntryModelCommentFormatEnum._(r'plain'); + static const markdown = TimeEntryModelCommentFormatEnum._(r'markdown'); + static const custom = TimeEntryModelCommentFormatEnum._(r'custom'); + + /// List of all possible values in this [enum][TimeEntryModelCommentFormatEnum]. + static const values = [ + plain, + markdown, + custom, + ]; + + static TimeEntryModelCommentFormatEnum? fromJson(dynamic value) => TimeEntryModelCommentFormatEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryModelCommentFormatEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [TimeEntryModelCommentFormatEnum] to String, +/// and [decode] dynamic data back to [TimeEntryModelCommentFormatEnum]. +class TimeEntryModelCommentFormatEnumTypeTransformer { + factory TimeEntryModelCommentFormatEnumTypeTransformer() => _instance ??= const TimeEntryModelCommentFormatEnumTypeTransformer._(); + + const TimeEntryModelCommentFormatEnumTypeTransformer._(); + + String encode(TimeEntryModelCommentFormatEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a TimeEntryModelCommentFormatEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + TimeEntryModelCommentFormatEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'plain': return TimeEntryModelCommentFormatEnum.plain; + case r'markdown': return TimeEntryModelCommentFormatEnum.markdown; + case r'custom': return TimeEntryModelCommentFormatEnum.custom; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [TimeEntryModelCommentFormatEnumTypeTransformer] instance. + static TimeEntryModelCommentFormatEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/time_entry_model_links.dart b/lib/model/time_entry_model_links.dart new file mode 100644 index 0000000..37e9c83 --- /dev/null +++ b/lib/model/time_entry_model_links.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryModelLinks { + /// Returns a new [TimeEntryModelLinks] instance. + TimeEntryModelLinks({ + required this.self, + this.updateImmediately, + this.update, + this.delete, + this.schema, + required this.project, + this.workPackage, + required this.user, + required this.activity, + }); + + TimeEntryModelLinksSelf self; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + TimeEntryModelLinksUpdateImmediately? updateImmediately; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + TimeEntryModelLinksUpdate? update; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + TimeEntryModelLinksDelete? delete; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + TimeEntryModelLinksSchema? schema; + + TimeEntryModelLinksProject project; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + TimeEntryModelLinksWorkPackage? workPackage; + + TimeEntryModelLinksUser user; + + TimeEntryModelLinksActivity activity; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryModelLinks && + other.self == self && + other.updateImmediately == updateImmediately && + other.update == update && + other.delete == delete && + other.schema == schema && + other.project == project && + other.workPackage == workPackage && + other.user == user && + other.activity == activity; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (updateImmediately == null ? 0 : updateImmediately!.hashCode) + + (update == null ? 0 : update!.hashCode) + + (delete == null ? 0 : delete!.hashCode) + + (schema == null ? 0 : schema!.hashCode) + + (project.hashCode) + + (workPackage == null ? 0 : workPackage!.hashCode) + + (user.hashCode) + + (activity.hashCode); + + @override + String toString() => 'TimeEntryModelLinks[self=$self, updateImmediately=$updateImmediately, update=$update, delete=$delete, schema=$schema, project=$project, workPackage=$workPackage, user=$user, activity=$activity]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + if (this.updateImmediately != null) { + json[r'updateImmediately'] = this.updateImmediately; + } else { + json[r'updateImmediately'] = null; + } + if (this.update != null) { + json[r'update'] = this.update; + } else { + json[r'update'] = null; + } + if (this.delete != null) { + json[r'delete'] = this.delete; + } else { + json[r'delete'] = null; + } + if (this.schema != null) { + json[r'schema'] = this.schema; + } else { + json[r'schema'] = null; + } + json[r'project'] = this.project; + if (this.workPackage != null) { + json[r'workPackage'] = this.workPackage; + } else { + json[r'workPackage'] = null; + } + json[r'user'] = this.user; + json[r'activity'] = this.activity; + return json; + } + + /// Returns a new [TimeEntryModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryModelLinks( + self: TimeEntryModelLinksSelf.fromJson(json[r'self'])!, + updateImmediately: TimeEntryModelLinksUpdateImmediately.fromJson(json[r'updateImmediately']), + update: TimeEntryModelLinksUpdate.fromJson(json[r'update']), + delete: TimeEntryModelLinksDelete.fromJson(json[r'delete']), + schema: TimeEntryModelLinksSchema.fromJson(json[r'schema']), + project: TimeEntryModelLinksProject.fromJson(json[r'project'])!, + workPackage: TimeEntryModelLinksWorkPackage.fromJson(json[r'workPackage']), + user: TimeEntryModelLinksUser.fromJson(json[r'user'])!, + activity: TimeEntryModelLinksActivity.fromJson(json[r'activity'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'project', + 'user', + 'activity', + }; +} + diff --git a/lib/model/time_entry_model_links_activity.dart b/lib/model/time_entry_model_links_activity.dart new file mode 100644 index 0000000..ffccfaf --- /dev/null +++ b/lib/model/time_entry_model_links_activity.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryModelLinksActivity { + /// Returns a new [TimeEntryModelLinksActivity] instance. + TimeEntryModelLinksActivity({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryModelLinksActivity && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'TimeEntryModelLinksActivity[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [TimeEntryModelLinksActivity] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryModelLinksActivity? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryModelLinksActivity[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryModelLinksActivity[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryModelLinksActivity( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryModelLinksActivity.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryModelLinksActivity.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryModelLinksActivity-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryModelLinksActivity.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/time_entry_model_links_delete.dart b/lib/model/time_entry_model_links_delete.dart new file mode 100644 index 0000000..dfbd8ba --- /dev/null +++ b/lib/model/time_entry_model_links_delete.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryModelLinksDelete { + /// Returns a new [TimeEntryModelLinksDelete] instance. + TimeEntryModelLinksDelete({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryModelLinksDelete && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'TimeEntryModelLinksDelete[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [TimeEntryModelLinksDelete] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryModelLinksDelete? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryModelLinksDelete[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryModelLinksDelete[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryModelLinksDelete( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryModelLinksDelete.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryModelLinksDelete.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryModelLinksDelete-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryModelLinksDelete.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/time_entry_model_links_project.dart b/lib/model/time_entry_model_links_project.dart new file mode 100644 index 0000000..ffbb1e3 --- /dev/null +++ b/lib/model/time_entry_model_links_project.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryModelLinksProject { + /// Returns a new [TimeEntryModelLinksProject] instance. + TimeEntryModelLinksProject({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryModelLinksProject && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'TimeEntryModelLinksProject[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [TimeEntryModelLinksProject] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryModelLinksProject? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryModelLinksProject[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryModelLinksProject[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryModelLinksProject( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryModelLinksProject.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryModelLinksProject.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryModelLinksProject-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryModelLinksProject.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/time_entry_model_links_schema.dart b/lib/model/time_entry_model_links_schema.dart new file mode 100644 index 0000000..ece7e1e --- /dev/null +++ b/lib/model/time_entry_model_links_schema.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryModelLinksSchema { + /// Returns a new [TimeEntryModelLinksSchema] instance. + TimeEntryModelLinksSchema({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryModelLinksSchema && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'TimeEntryModelLinksSchema[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [TimeEntryModelLinksSchema] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryModelLinksSchema? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryModelLinksSchema[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryModelLinksSchema[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryModelLinksSchema( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryModelLinksSchema.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryModelLinksSchema.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryModelLinksSchema-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryModelLinksSchema.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/time_entry_model_links_self.dart b/lib/model/time_entry_model_links_self.dart new file mode 100644 index 0000000..7238ae4 --- /dev/null +++ b/lib/model/time_entry_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryModelLinksSelf { + /// Returns a new [TimeEntryModelLinksSelf] instance. + TimeEntryModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'TimeEntryModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [TimeEntryModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/time_entry_model_links_update.dart b/lib/model/time_entry_model_links_update.dart new file mode 100644 index 0000000..38d732f --- /dev/null +++ b/lib/model/time_entry_model_links_update.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryModelLinksUpdate { + /// Returns a new [TimeEntryModelLinksUpdate] instance. + TimeEntryModelLinksUpdate({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryModelLinksUpdate && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'TimeEntryModelLinksUpdate[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [TimeEntryModelLinksUpdate] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryModelLinksUpdate? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryModelLinksUpdate[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryModelLinksUpdate[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryModelLinksUpdate( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryModelLinksUpdate.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryModelLinksUpdate.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryModelLinksUpdate-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryModelLinksUpdate.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/time_entry_model_links_update_immediately.dart b/lib/model/time_entry_model_links_update_immediately.dart new file mode 100644 index 0000000..75f83d7 --- /dev/null +++ b/lib/model/time_entry_model_links_update_immediately.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryModelLinksUpdateImmediately { + /// Returns a new [TimeEntryModelLinksUpdateImmediately] instance. + TimeEntryModelLinksUpdateImmediately({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryModelLinksUpdateImmediately && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'TimeEntryModelLinksUpdateImmediately[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [TimeEntryModelLinksUpdateImmediately] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryModelLinksUpdateImmediately? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryModelLinksUpdateImmediately[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryModelLinksUpdateImmediately[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryModelLinksUpdateImmediately( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryModelLinksUpdateImmediately.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryModelLinksUpdateImmediately.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryModelLinksUpdateImmediately-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryModelLinksUpdateImmediately.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/time_entry_model_links_user.dart b/lib/model/time_entry_model_links_user.dart new file mode 100644 index 0000000..cdd476c --- /dev/null +++ b/lib/model/time_entry_model_links_user.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryModelLinksUser { + /// Returns a new [TimeEntryModelLinksUser] instance. + TimeEntryModelLinksUser({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryModelLinksUser && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'TimeEntryModelLinksUser[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [TimeEntryModelLinksUser] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryModelLinksUser? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryModelLinksUser[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryModelLinksUser[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryModelLinksUser( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryModelLinksUser.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryModelLinksUser.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryModelLinksUser-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryModelLinksUser.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/time_entry_model_links_work_package.dart b/lib/model/time_entry_model_links_work_package.dart new file mode 100644 index 0000000..9196d54 --- /dev/null +++ b/lib/model/time_entry_model_links_work_package.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TimeEntryModelLinksWorkPackage { + /// Returns a new [TimeEntryModelLinksWorkPackage] instance. + TimeEntryModelLinksWorkPackage({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is TimeEntryModelLinksWorkPackage && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'TimeEntryModelLinksWorkPackage[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [TimeEntryModelLinksWorkPackage] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TimeEntryModelLinksWorkPackage? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TimeEntryModelLinksWorkPackage[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TimeEntryModelLinksWorkPackage[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TimeEntryModelLinksWorkPackage( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TimeEntryModelLinksWorkPackage.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TimeEntryModelLinksWorkPackage.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TimeEntryModelLinksWorkPackage-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TimeEntryModelLinksWorkPackage.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/type_model.dart b/lib/model/type_model.dart new file mode 100644 index 0000000..6301bf4 --- /dev/null +++ b/lib/model/type_model.dart @@ -0,0 +1,214 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TypeModel { + /// Returns a new [TypeModel] instance. + TypeModel({ + this.id, + this.name, + this.color, + this.position, + this.isDefault, + this.isMilestone, + this.createdAt, + this.updatedAt, + this.links, + }); + + /// Type id + Object? id; + + /// Type name + Object? name; + + /// The color used to represent this type + Object? color; + + /// Sort index of the type + Object? position; + + /// Is this type active by default in new projects? + Object? isDefault; + + /// Do work packages of this type represent a milestone? + Object? isMilestone; + + /// Time of creation + Object? createdAt; + + /// Time of the most recent change to the user + Object? updatedAt; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + TypeModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is TypeModel && + other.id == id && + other.name == name && + other.color == color && + other.position == position && + other.isDefault == isDefault && + other.isMilestone == isMilestone && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (color == null ? 0 : color!.hashCode) + + (position == null ? 0 : position!.hashCode) + + (isDefault == null ? 0 : isDefault!.hashCode) + + (isMilestone == null ? 0 : isMilestone!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'TypeModel[id=$id, name=$name, color=$color, position=$position, isDefault=$isDefault, isMilestone=$isMilestone, createdAt=$createdAt, updatedAt=$updatedAt, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.color != null) { + json[r'color'] = this.color; + } else { + json[r'color'] = null; + } + if (this.position != null) { + json[r'position'] = this.position; + } else { + json[r'position'] = null; + } + if (this.isDefault != null) { + json[r'isDefault'] = this.isDefault; + } else { + json[r'isDefault'] = null; + } + if (this.isMilestone != null) { + json[r'isMilestone'] = this.isMilestone; + } else { + json[r'isMilestone'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt; + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt; + } else { + json[r'updatedAt'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [TypeModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TypeModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TypeModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TypeModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TypeModel( + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name'), + color: mapValueOfType(json, r'color'), + position: mapValueOfType(json, r'position'), + isDefault: mapValueOfType(json, r'isDefault'), + isMilestone: mapValueOfType(json, r'isMilestone'), + createdAt: mapValueOfType(json, r'createdAt'), + updatedAt: mapValueOfType(json, r'updatedAt'), + links: TypeModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TypeModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TypeModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TypeModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TypeModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/type_model_links.dart b/lib/model/type_model_links.dart new file mode 100644 index 0000000..d9d0b5f --- /dev/null +++ b/lib/model/type_model_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TypeModelLinks { + /// Returns a new [TypeModelLinks] instance. + TypeModelLinks({ + required this.self, + }); + + TypeModelLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is TypeModelLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'TypeModelLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [TypeModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TypeModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TypeModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TypeModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TypeModelLinks( + self: TypeModelLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TypeModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TypeModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TypeModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TypeModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/type_model_links_self.dart b/lib/model/type_model_links_self.dart new file mode 100644 index 0000000..ef6bc24 --- /dev/null +++ b/lib/model/type_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TypeModelLinksSelf { + /// Returns a new [TypeModelLinksSelf] instance. + TypeModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is TypeModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'TypeModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [TypeModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TypeModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TypeModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TypeModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TypeModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TypeModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TypeModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TypeModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TypeModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/update_activity_request.dart b/lib/model/update_activity_request.dart new file mode 100644 index 0000000..25d777b --- /dev/null +++ b/lib/model/update_activity_request.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UpdateActivityRequest { + /// Returns a new [UpdateActivityRequest] instance. + UpdateActivityRequest({ + this.comment, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + UpdateActivityRequestComment? comment; + + @override + bool operator ==(Object other) => identical(this, other) || other is UpdateActivityRequest && + other.comment == comment; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (comment == null ? 0 : comment!.hashCode); + + @override + String toString() => 'UpdateActivityRequest[comment=$comment]'; + + Map toJson() { + final json = {}; + if (this.comment != null) { + json[r'comment'] = this.comment; + } else { + json[r'comment'] = null; + } + return json; + } + + /// Returns a new [UpdateActivityRequest] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UpdateActivityRequest? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UpdateActivityRequest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UpdateActivityRequest[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UpdateActivityRequest( + comment: UpdateActivityRequestComment.fromJson(json[r'comment']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UpdateActivityRequest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UpdateActivityRequest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UpdateActivityRequest-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UpdateActivityRequest.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/update_activity_request_comment.dart b/lib/model/update_activity_request_comment.dart new file mode 100644 index 0000000..7d70ba2 --- /dev/null +++ b/lib/model/update_activity_request_comment.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UpdateActivityRequestComment { + /// Returns a new [UpdateActivityRequestComment] instance. + UpdateActivityRequestComment({ + this.raw, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? raw; + + @override + bool operator ==(Object other) => identical(this, other) || other is UpdateActivityRequestComment && + other.raw == raw; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (raw == null ? 0 : raw!.hashCode); + + @override + String toString() => 'UpdateActivityRequestComment[raw=$raw]'; + + Map toJson() { + final json = {}; + if (this.raw != null) { + json[r'raw'] = this.raw; + } else { + json[r'raw'] = null; + } + return json; + } + + /// Returns a new [UpdateActivityRequestComment] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UpdateActivityRequestComment? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UpdateActivityRequestComment[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UpdateActivityRequestComment[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UpdateActivityRequestComment( + raw: mapValueOfType(json, r'raw'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UpdateActivityRequestComment.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UpdateActivityRequestComment.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UpdateActivityRequestComment-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UpdateActivityRequestComment.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/update_user_preferences_request.dart b/lib/model/update_user_preferences_request.dart new file mode 100644 index 0000000..72fb8db --- /dev/null +++ b/lib/model/update_user_preferences_request.dart @@ -0,0 +1,135 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UpdateUserPreferencesRequest { + /// Returns a new [UpdateUserPreferencesRequest] instance. + UpdateUserPreferencesRequest({ + this.autoHidePopups, + this.timeZone, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? autoHidePopups; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? timeZone; + + @override + bool operator ==(Object other) => identical(this, other) || other is UpdateUserPreferencesRequest && + other.autoHidePopups == autoHidePopups && + other.timeZone == timeZone; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (autoHidePopups == null ? 0 : autoHidePopups!.hashCode) + + (timeZone == null ? 0 : timeZone!.hashCode); + + @override + String toString() => 'UpdateUserPreferencesRequest[autoHidePopups=$autoHidePopups, timeZone=$timeZone]'; + + Map toJson() { + final json = {}; + if (this.autoHidePopups != null) { + json[r'autoHidePopups'] = this.autoHidePopups; + } else { + json[r'autoHidePopups'] = null; + } + if (this.timeZone != null) { + json[r'timeZone'] = this.timeZone; + } else { + json[r'timeZone'] = null; + } + return json; + } + + /// Returns a new [UpdateUserPreferencesRequest] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UpdateUserPreferencesRequest? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UpdateUserPreferencesRequest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UpdateUserPreferencesRequest[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UpdateUserPreferencesRequest( + autoHidePopups: mapValueOfType(json, r'autoHidePopups'), + timeZone: mapValueOfType(json, r'timeZone'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UpdateUserPreferencesRequest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UpdateUserPreferencesRequest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UpdateUserPreferencesRequest-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UpdateUserPreferencesRequest.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/user_collection_model.dart b/lib/model/user_collection_model.dart new file mode 100644 index 0000000..9b82dc9 --- /dev/null +++ b/lib/model/user_collection_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UserCollectionModel { + /// Returns a new [UserCollectionModel] instance. + UserCollectionModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.embedded, + }); + + UserCollectionModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + UserCollectionModelAllOfLinks links; + + UserCollectionModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserCollectionModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'UserCollectionModel[type=$type, total=$total, count=$count, links=$links, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [UserCollectionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserCollectionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UserCollectionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserCollectionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserCollectionModel( + type: UserCollectionModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: UserCollectionModelAllOfLinks.fromJson(json[r'_links'])!, + embedded: UserCollectionModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserCollectionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserCollectionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserCollectionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UserCollectionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + '_embedded', + }; +} + + +class UserCollectionModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const UserCollectionModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = UserCollectionModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][UserCollectionModelTypeEnum]. + static const values = [ + collection, + ]; + + static UserCollectionModelTypeEnum? fromJson(dynamic value) => UserCollectionModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserCollectionModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [UserCollectionModelTypeEnum] to String, +/// and [decode] dynamic data back to [UserCollectionModelTypeEnum]. +class UserCollectionModelTypeEnumTypeTransformer { + factory UserCollectionModelTypeEnumTypeTransformer() => _instance ??= const UserCollectionModelTypeEnumTypeTransformer._(); + + const UserCollectionModelTypeEnumTypeTransformer._(); + + String encode(UserCollectionModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a UserCollectionModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + UserCollectionModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return UserCollectionModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [UserCollectionModelTypeEnumTypeTransformer] instance. + static UserCollectionModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/user_collection_model_all_of_embedded.dart b/lib/model/user_collection_model_all_of_embedded.dart new file mode 100644 index 0000000..78b9af1 --- /dev/null +++ b/lib/model/user_collection_model_all_of_embedded.dart @@ -0,0 +1,113 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UserCollectionModelAllOfEmbedded { + /// Returns a new [UserCollectionModelAllOfEmbedded] instance. + UserCollectionModelAllOfEmbedded({ + required this.elements, + }); + + Object? elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserCollectionModelAllOfEmbedded && + other.elements == elements; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements == null ? 0 : elements!.hashCode); + + @override + String toString() => 'UserCollectionModelAllOfEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + if (this.elements != null) { + json[r'elements'] = this.elements; + } else { + json[r'elements'] = null; + } + return json; + } + + /// Returns a new [UserCollectionModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserCollectionModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UserCollectionModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserCollectionModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserCollectionModelAllOfEmbedded( + elements: mapValueOfType(json, r'elements'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserCollectionModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserCollectionModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserCollectionModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UserCollectionModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'elements', + }; +} + diff --git a/lib/model/user_collection_model_all_of_links.dart b/lib/model/user_collection_model_all_of_links.dart new file mode 100644 index 0000000..9ee5bff --- /dev/null +++ b/lib/model/user_collection_model_all_of_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UserCollectionModelAllOfLinks { + /// Returns a new [UserCollectionModelAllOfLinks] instance. + UserCollectionModelAllOfLinks({ + required this.self, + }); + + UserCollectionModelAllOfLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserCollectionModelAllOfLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'UserCollectionModelAllOfLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [UserCollectionModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserCollectionModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UserCollectionModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserCollectionModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserCollectionModelAllOfLinks( + self: UserCollectionModelAllOfLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserCollectionModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserCollectionModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserCollectionModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UserCollectionModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/user_collection_model_all_of_links_self.dart b/lib/model/user_collection_model_all_of_links_self.dart new file mode 100644 index 0000000..55cd6b9 --- /dev/null +++ b/lib/model/user_collection_model_all_of_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UserCollectionModelAllOfLinksSelf { + /// Returns a new [UserCollectionModelAllOfLinksSelf] instance. + UserCollectionModelAllOfLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserCollectionModelAllOfLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'UserCollectionModelAllOfLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [UserCollectionModelAllOfLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserCollectionModelAllOfLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UserCollectionModelAllOfLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserCollectionModelAllOfLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserCollectionModelAllOfLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserCollectionModelAllOfLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserCollectionModelAllOfLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserCollectionModelAllOfLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UserCollectionModelAllOfLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/user_create_model.dart b/lib/model/user_create_model.dart new file mode 100644 index 0000000..23ac1ed --- /dev/null +++ b/lib/model/user_create_model.dart @@ -0,0 +1,197 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UserCreateModel { + /// Returns a new [UserCreateModel] instance. + UserCreateModel({ + required this.admin, + required this.email, + required this.login, + this.password, + required this.firstName, + required this.lastName, + this.status, + required this.language, + }); + + Object? admin; + + Object? email; + + Object? login; + + /// The users password. *Conditions:* Only writable on creation, not on update. + Object? password; + + Object? firstName; + + Object? lastName; + + /// The current activation status of the user. *Conditions:* Only writable on creation, not on update. + Object? status; + + Object? language; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserCreateModel && + other.admin == admin && + other.email == email && + other.login == login && + other.password == password && + other.firstName == firstName && + other.lastName == lastName && + other.status == status && + other.language == language; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (admin == null ? 0 : admin!.hashCode) + + (email == null ? 0 : email!.hashCode) + + (login == null ? 0 : login!.hashCode) + + (password == null ? 0 : password!.hashCode) + + (firstName == null ? 0 : firstName!.hashCode) + + (lastName == null ? 0 : lastName!.hashCode) + + (status == null ? 0 : status!.hashCode) + + (language == null ? 0 : language!.hashCode); + + @override + String toString() => 'UserCreateModel[admin=$admin, email=$email, login=$login, password=$password, firstName=$firstName, lastName=$lastName, status=$status, language=$language]'; + + Map toJson() { + final json = {}; + if (this.admin != null) { + json[r'admin'] = this.admin; + } else { + json[r'admin'] = null; + } + if (this.email != null) { + json[r'email'] = this.email; + } else { + json[r'email'] = null; + } + if (this.login != null) { + json[r'login'] = this.login; + } else { + json[r'login'] = null; + } + if (this.password != null) { + json[r'password'] = this.password; + } else { + json[r'password'] = null; + } + if (this.firstName != null) { + json[r'firstName'] = this.firstName; + } else { + json[r'firstName'] = null; + } + if (this.lastName != null) { + json[r'lastName'] = this.lastName; + } else { + json[r'lastName'] = null; + } + if (this.status != null) { + json[r'status'] = this.status; + } else { + json[r'status'] = null; + } + if (this.language != null) { + json[r'language'] = this.language; + } else { + json[r'language'] = null; + } + return json; + } + + /// Returns a new [UserCreateModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserCreateModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UserCreateModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserCreateModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserCreateModel( + admin: mapValueOfType(json, r'admin'), + email: mapValueOfType(json, r'email'), + login: mapValueOfType(json, r'login'), + password: mapValueOfType(json, r'password'), + firstName: mapValueOfType(json, r'firstName'), + lastName: mapValueOfType(json, r'lastName'), + status: mapValueOfType(json, r'status'), + language: mapValueOfType(json, r'language'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserCreateModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserCreateModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserCreateModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UserCreateModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'admin', + 'email', + 'login', + 'firstName', + 'lastName', + 'language', + }; +} + diff --git a/lib/model/user_model.dart b/lib/model/user_model.dart new file mode 100644 index 0000000..8e17373 --- /dev/null +++ b/lib/model/user_model.dart @@ -0,0 +1,353 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UserModel { + /// Returns a new [UserModel] instance. + UserModel({ + required this.type, + required this.id, + this.login, + this.firstName, + this.lastName, + required this.name, + this.email, + this.admin, + required this.avatar, + this.status, + this.language, + this.identityUrl, + this.createdAt, + this.updatedAt, + required this.links, + }); + + UserModelTypeEnum? type; + + /// User's id + /// + /// Minimum value: 0 + Object? id; + + /// User's login name # Conditions **Permission**: Administrator, manage_user global permission + Object? login; + + /// User's first name # Conditions **Permission**: Administrator, manage_user global permission + Object? firstName; + + /// User's last name # Conditions **Permission**: Administrator, manage_user global permission + Object? lastName; + + /// User's full name, formatting depends on instance settings + Object? name; + + /// User's email address # Conditions E-Mail address not hidden, **Permission**: Administrator, manage_user global permission + Object? email; + + /// Flag indicating whether or not the user is an admin # Conditions **Permission**: Administrator + Object? admin; + + /// URL to user's avatar + Object? avatar; + + /// The current activation status of the user (see below) + Object? status; + + /// User's language | ISO 639-1 format # Conditions **Permission**: Administrator, manage_user global permission + Object? language; + + /// User's identity_url for OmniAuth authentication # Conditions **Permission**: Administrator + Object? identityUrl; + + /// Time of creation + Object? createdAt; + + /// Time of the most recent change to the user + Object? updatedAt; + + UserModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserModel && + other.type == type && + other.id == id && + other.login == login && + other.firstName == firstName && + other.lastName == lastName && + other.name == name && + other.email == email && + other.admin == admin && + other.avatar == avatar && + other.status == status && + other.language == language && + other.identityUrl == identityUrl && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (id == null ? 0 : id!.hashCode) + + (login == null ? 0 : login!.hashCode) + + (firstName == null ? 0 : firstName!.hashCode) + + (lastName == null ? 0 : lastName!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (email == null ? 0 : email!.hashCode) + + (admin == null ? 0 : admin!.hashCode) + + (avatar == null ? 0 : avatar!.hashCode) + + (status == null ? 0 : status!.hashCode) + + (language == null ? 0 : language!.hashCode) + + (identityUrl == null ? 0 : identityUrl!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (links.hashCode); + + @override + String toString() => 'UserModel[type=$type, id=$id, login=$login, firstName=$firstName, lastName=$lastName, name=$name, email=$email, admin=$admin, avatar=$avatar, status=$status, language=$language, identityUrl=$identityUrl, createdAt=$createdAt, updatedAt=$updatedAt, links=$links]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.login != null) { + json[r'login'] = this.login; + } else { + json[r'login'] = null; + } + if (this.firstName != null) { + json[r'firstName'] = this.firstName; + } else { + json[r'firstName'] = null; + } + if (this.lastName != null) { + json[r'lastName'] = this.lastName; + } else { + json[r'lastName'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.email != null) { + json[r'email'] = this.email; + } else { + json[r'email'] = null; + } + if (this.admin != null) { + json[r'admin'] = this.admin; + } else { + json[r'admin'] = null; + } + if (this.avatar != null) { + json[r'avatar'] = this.avatar; + } else { + json[r'avatar'] = null; + } + if (this.status != null) { + json[r'status'] = this.status; + } else { + json[r'status'] = null; + } + if (this.language != null) { + json[r'language'] = this.language; + } else { + json[r'language'] = null; + } + if (this.identityUrl != null) { + json[r'identityUrl'] = this.identityUrl; + } else { + json[r'identityUrl'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt; + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt; + } else { + json[r'updatedAt'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [UserModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UserModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserModel( + type: Object.fromJson(json[r'_type']), + id: mapValueOfType(json, r'id'), + login: mapValueOfType(json, r'login'), + firstName: mapValueOfType(json, r'firstName'), + lastName: mapValueOfType(json, r'lastName'), + name: mapValueOfType(json, r'name'), + email: mapValueOfType(json, r'email'), + admin: mapValueOfType(json, r'admin'), + avatar: mapValueOfType(json, r'avatar'), + status: mapValueOfType(json, r'status'), + language: mapValueOfType(json, r'language'), + identityUrl: mapValueOfType(json, r'identityUrl'), + createdAt: mapValueOfType(json, r'createdAt'), + updatedAt: mapValueOfType(json, r'updatedAt'), + links: UserModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UserModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'id', + 'name', + 'avatar', + '_links', + }; +} + + +class UserModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const UserModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const user = UserModelTypeEnum._('User'); + + /// List of all possible values in this [enum][UserModelTypeEnum]. + static const values = [ + user, + ]; + + static UserModelTypeEnum? fromJson(dynamic value) => UserModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [UserModelTypeEnum] to Object, +/// and [decode] dynamic data back to [UserModelTypeEnum]. +class UserModelTypeEnumTypeTransformer { + factory UserModelTypeEnumTypeTransformer() => _instance ??= const UserModelTypeEnumTypeTransformer._(); + + const UserModelTypeEnumTypeTransformer._(); + + Object encode(UserModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a UserModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + UserModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'User': return UserModelTypeEnum.user; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [UserModelTypeEnumTypeTransformer] instance. + static UserModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/user_model_links.dart b/lib/model/user_model_links.dart new file mode 100644 index 0000000..03d5960 --- /dev/null +++ b/lib/model/user_model_links.dart @@ -0,0 +1,193 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UserModelLinks { + /// Returns a new [UserModelLinks] instance. + UserModelLinks({ + required this.self, + required this.memberships, + required this.showUser, + this.updateImmediately, + this.lock, + this.unlock, + this.delete, + }); + + UserModelLinksSelf self; + + UserModelLinksMemberships memberships; + + UserModelLinksShowUser showUser; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + UserModelLinksUpdateImmediately? updateImmediately; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + UserModelLinksLock? lock; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + UserModelLinksUnlock? unlock; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + UserModelLinksDelete? delete; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserModelLinks && + other.self == self && + other.memberships == memberships && + other.showUser == showUser && + other.updateImmediately == updateImmediately && + other.lock == lock && + other.unlock == unlock && + other.delete == delete; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (memberships.hashCode) + + (showUser.hashCode) + + (updateImmediately == null ? 0 : updateImmediately!.hashCode) + + (lock == null ? 0 : lock!.hashCode) + + (unlock == null ? 0 : unlock!.hashCode) + + (delete == null ? 0 : delete!.hashCode); + + @override + String toString() => 'UserModelLinks[self=$self, memberships=$memberships, showUser=$showUser, updateImmediately=$updateImmediately, lock=$lock, unlock=$unlock, delete=$delete]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'memberships'] = this.memberships; + json[r'showUser'] = this.showUser; + if (this.updateImmediately != null) { + json[r'updateImmediately'] = this.updateImmediately; + } else { + json[r'updateImmediately'] = null; + } + if (this.lock != null) { + json[r'lock'] = this.lock; + } else { + json[r'lock'] = null; + } + if (this.unlock != null) { + json[r'unlock'] = this.unlock; + } else { + json[r'unlock'] = null; + } + if (this.delete != null) { + json[r'delete'] = this.delete; + } else { + json[r'delete'] = null; + } + return json; + } + + /// Returns a new [UserModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UserModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserModelLinks( + self: UserModelLinksSelf.fromJson(json[r'self'])!, + memberships: UserModelLinksMemberships.fromJson(json[r'memberships'])!, + showUser: UserModelLinksShowUser.fromJson(json[r'showUser'])!, + updateImmediately: UserModelLinksUpdateImmediately.fromJson(json[r'updateImmediately']), + lock: UserModelLinksLock.fromJson(json[r'lock']), + unlock: UserModelLinksUnlock.fromJson(json[r'unlock']), + delete: UserModelLinksDelete.fromJson(json[r'delete']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UserModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'memberships', + 'showUser', + }; +} + diff --git a/lib/model/user_model_links_delete.dart b/lib/model/user_model_links_delete.dart new file mode 100644 index 0000000..28118d4 --- /dev/null +++ b/lib/model/user_model_links_delete.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UserModelLinksDelete { + /// Returns a new [UserModelLinksDelete] instance. + UserModelLinksDelete({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserModelLinksDelete && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'UserModelLinksDelete[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [UserModelLinksDelete] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserModelLinksDelete? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UserModelLinksDelete[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserModelLinksDelete[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserModelLinksDelete( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserModelLinksDelete.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserModelLinksDelete.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserModelLinksDelete-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UserModelLinksDelete.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/user_model_links_lock.dart b/lib/model/user_model_links_lock.dart new file mode 100644 index 0000000..7c80229 --- /dev/null +++ b/lib/model/user_model_links_lock.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UserModelLinksLock { + /// Returns a new [UserModelLinksLock] instance. + UserModelLinksLock({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserModelLinksLock && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'UserModelLinksLock[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [UserModelLinksLock] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserModelLinksLock? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UserModelLinksLock[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserModelLinksLock[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserModelLinksLock( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserModelLinksLock.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserModelLinksLock.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserModelLinksLock-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UserModelLinksLock.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/user_model_links_memberships.dart b/lib/model/user_model_links_memberships.dart new file mode 100644 index 0000000..132484c --- /dev/null +++ b/lib/model/user_model_links_memberships.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UserModelLinksMemberships { + /// Returns a new [UserModelLinksMemberships] instance. + UserModelLinksMemberships({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserModelLinksMemberships && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'UserModelLinksMemberships[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [UserModelLinksMemberships] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserModelLinksMemberships? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UserModelLinksMemberships[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserModelLinksMemberships[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserModelLinksMemberships( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserModelLinksMemberships.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserModelLinksMemberships.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserModelLinksMemberships-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UserModelLinksMemberships.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/user_model_links_self.dart b/lib/model/user_model_links_self.dart new file mode 100644 index 0000000..564a3cc --- /dev/null +++ b/lib/model/user_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UserModelLinksSelf { + /// Returns a new [UserModelLinksSelf] instance. + UserModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'UserModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [UserModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UserModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UserModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/user_model_links_show_user.dart b/lib/model/user_model_links_show_user.dart new file mode 100644 index 0000000..13e5301 --- /dev/null +++ b/lib/model/user_model_links_show_user.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UserModelLinksShowUser { + /// Returns a new [UserModelLinksShowUser] instance. + UserModelLinksShowUser({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserModelLinksShowUser && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'UserModelLinksShowUser[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [UserModelLinksShowUser] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserModelLinksShowUser? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UserModelLinksShowUser[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserModelLinksShowUser[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserModelLinksShowUser( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserModelLinksShowUser.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserModelLinksShowUser.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserModelLinksShowUser-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UserModelLinksShowUser.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/user_model_links_unlock.dart b/lib/model/user_model_links_unlock.dart new file mode 100644 index 0000000..b9242ff --- /dev/null +++ b/lib/model/user_model_links_unlock.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UserModelLinksUnlock { + /// Returns a new [UserModelLinksUnlock] instance. + UserModelLinksUnlock({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserModelLinksUnlock && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'UserModelLinksUnlock[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [UserModelLinksUnlock] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserModelLinksUnlock? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UserModelLinksUnlock[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserModelLinksUnlock[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserModelLinksUnlock( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserModelLinksUnlock.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserModelLinksUnlock.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserModelLinksUnlock-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UserModelLinksUnlock.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/user_model_links_update_immediately.dart b/lib/model/user_model_links_update_immediately.dart new file mode 100644 index 0000000..e511328 --- /dev/null +++ b/lib/model/user_model_links_update_immediately.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class UserModelLinksUpdateImmediately { + /// Returns a new [UserModelLinksUpdateImmediately] instance. + UserModelLinksUpdateImmediately({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is UserModelLinksUpdateImmediately && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'UserModelLinksUpdateImmediately[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [UserModelLinksUpdateImmediately] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static UserModelLinksUpdateImmediately? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "UserModelLinksUpdateImmediately[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "UserModelLinksUpdateImmediately[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return UserModelLinksUpdateImmediately( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = UserModelLinksUpdateImmediately.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = UserModelLinksUpdateImmediately.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of UserModelLinksUpdateImmediately-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = UserModelLinksUpdateImmediately.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/values_property_model.dart b/lib/model/values_property_model.dart new file mode 100644 index 0000000..c2a2216 --- /dev/null +++ b/lib/model/values_property_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ValuesPropertyModel { + /// Returns a new [ValuesPropertyModel] instance. + ValuesPropertyModel({ + required this.type, + required this.property, + required this.value, + required this.links, + }); + + ValuesPropertyModelTypeEnum? type; + + /// The key of the key - value pair represented by the Values::Property + Object? property; + + /// The value of the key - value pair represented by the Values::Property + Object? value; + + ValuesPropertyModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is ValuesPropertyModel && + other.type == type && + other.property == property && + other.value == value && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (property == null ? 0 : property!.hashCode) + + (value == null ? 0 : value!.hashCode) + + (links.hashCode); + + @override + String toString() => 'ValuesPropertyModel[type=$type, property=$property, value=$value, links=$links]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.property != null) { + json[r'property'] = this.property; + } else { + json[r'property'] = null; + } + if (this.value != null) { + json[r'value'] = this.value; + } else { + json[r'value'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [ValuesPropertyModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ValuesPropertyModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ValuesPropertyModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ValuesPropertyModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ValuesPropertyModel( + type: Object.fromJson(json[r'_type']), + property: mapValueOfType(json, r'property'), + value: mapValueOfType(json, r'value'), + links: ValuesPropertyModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ValuesPropertyModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ValuesPropertyModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ValuesPropertyModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ValuesPropertyModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'property', + 'value', + '_links', + }; +} + + +class ValuesPropertyModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const ValuesPropertyModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const valuesColonColonProperty = ValuesPropertyModelTypeEnum._('Values::Property'); + + /// List of all possible values in this [enum][ValuesPropertyModelTypeEnum]. + static const values = [ + valuesColonColonProperty, + ]; + + static ValuesPropertyModelTypeEnum? fromJson(dynamic value) => ValuesPropertyModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ValuesPropertyModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [ValuesPropertyModelTypeEnum] to Object, +/// and [decode] dynamic data back to [ValuesPropertyModelTypeEnum]. +class ValuesPropertyModelTypeEnumTypeTransformer { + factory ValuesPropertyModelTypeEnumTypeTransformer() => _instance ??= const ValuesPropertyModelTypeEnumTypeTransformer._(); + + const ValuesPropertyModelTypeEnumTypeTransformer._(); + + Object encode(ValuesPropertyModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a ValuesPropertyModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + ValuesPropertyModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'Values::Property': return ValuesPropertyModelTypeEnum.valuesColonColonProperty; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [ValuesPropertyModelTypeEnumTypeTransformer] instance. + static ValuesPropertyModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/values_property_model_links.dart b/lib/model/values_property_model_links.dart new file mode 100644 index 0000000..c97ad97 --- /dev/null +++ b/lib/model/values_property_model_links.dart @@ -0,0 +1,117 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ValuesPropertyModelLinks { + /// Returns a new [ValuesPropertyModelLinks] instance. + ValuesPropertyModelLinks({ + required this.self, + required this.schema, + }); + + ValuesPropertyModelLinksSelf self; + + ValuesPropertyModelLinksSchema schema; + + @override + bool operator ==(Object other) => identical(this, other) || other is ValuesPropertyModelLinks && + other.self == self && + other.schema == schema; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode) + + (schema.hashCode); + + @override + String toString() => 'ValuesPropertyModelLinks[self=$self, schema=$schema]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + json[r'schema'] = this.schema; + return json; + } + + /// Returns a new [ValuesPropertyModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ValuesPropertyModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ValuesPropertyModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ValuesPropertyModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ValuesPropertyModelLinks( + self: ValuesPropertyModelLinksSelf.fromJson(json[r'self'])!, + schema: ValuesPropertyModelLinksSchema.fromJson(json[r'schema'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ValuesPropertyModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ValuesPropertyModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ValuesPropertyModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ValuesPropertyModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'schema', + }; +} + diff --git a/lib/model/values_property_model_links_schema.dart b/lib/model/values_property_model_links_schema.dart new file mode 100644 index 0000000..6c2339b --- /dev/null +++ b/lib/model/values_property_model_links_schema.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ValuesPropertyModelLinksSchema { + /// Returns a new [ValuesPropertyModelLinksSchema] instance. + ValuesPropertyModelLinksSchema({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ValuesPropertyModelLinksSchema && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ValuesPropertyModelLinksSchema[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ValuesPropertyModelLinksSchema] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ValuesPropertyModelLinksSchema? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ValuesPropertyModelLinksSchema[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ValuesPropertyModelLinksSchema[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ValuesPropertyModelLinksSchema( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ValuesPropertyModelLinksSchema.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ValuesPropertyModelLinksSchema.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ValuesPropertyModelLinksSchema-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ValuesPropertyModelLinksSchema.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/values_property_model_links_self.dart b/lib/model/values_property_model_links_self.dart new file mode 100644 index 0000000..c8a7e91 --- /dev/null +++ b/lib/model/values_property_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ValuesPropertyModelLinksSelf { + /// Returns a new [ValuesPropertyModelLinksSelf] instance. + ValuesPropertyModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is ValuesPropertyModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'ValuesPropertyModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [ValuesPropertyModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ValuesPropertyModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ValuesPropertyModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ValuesPropertyModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ValuesPropertyModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ValuesPropertyModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ValuesPropertyModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ValuesPropertyModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ValuesPropertyModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/version_model.dart b/lib/model/version_model.dart new file mode 100644 index 0000000..3cb713e --- /dev/null +++ b/lib/model/version_model.dart @@ -0,0 +1,234 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class VersionModel { + /// Returns a new [VersionModel] instance. + VersionModel({ + this.id, + required this.name, + this.description, + this.startDate, + this.endDate, + required this.status, + required this.sharing, + required this.createdAt, + required this.updatedAt, + this.links, + }); + + /// Version id + Object? id; + + /// Version name + Object? name; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ActivityModelComment? description; + + Object? startDate; + + Object? endDate; + + /// The current status of the version + Object? status; + + /// The current status of the version + Object? sharing; + + /// Time of creation + Object? createdAt; + + /// Time of the most recent change to the version + Object? updatedAt; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + VersionModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is VersionModel && + other.id == id && + other.name == name && + other.description == description && + other.startDate == startDate && + other.endDate == endDate && + other.status == status && + other.sharing == sharing && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (startDate == null ? 0 : startDate!.hashCode) + + (endDate == null ? 0 : endDate!.hashCode) + + (status == null ? 0 : status!.hashCode) + + (sharing == null ? 0 : sharing!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'VersionModel[id=$id, name=$name, description=$description, startDate=$startDate, endDate=$endDate, status=$status, sharing=$sharing, createdAt=$createdAt, updatedAt=$updatedAt, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.startDate != null) { + json[r'startDate'] = this.startDate; + } else { + json[r'startDate'] = null; + } + if (this.endDate != null) { + json[r'endDate'] = this.endDate; + } else { + json[r'endDate'] = null; + } + if (this.status != null) { + json[r'status'] = this.status; + } else { + json[r'status'] = null; + } + if (this.sharing != null) { + json[r'sharing'] = this.sharing; + } else { + json[r'sharing'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt; + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt; + } else { + json[r'updatedAt'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [VersionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static VersionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "VersionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "VersionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return VersionModel( + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name'), + description: ActivityModelComment.fromJson(json[r'description']), + startDate: mapValueOfType(json, r'startDate'), + endDate: mapValueOfType(json, r'endDate'), + status: mapValueOfType(json, r'status'), + sharing: mapValueOfType(json, r'sharing'), + createdAt: mapValueOfType(json, r'createdAt'), + updatedAt: mapValueOfType(json, r'updatedAt'), + links: VersionModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = VersionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = VersionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of VersionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = VersionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'name', + 'status', + 'sharing', + 'createdAt', + 'updatedAt', + }; +} + diff --git a/lib/model/version_model_links.dart b/lib/model/version_model_links.dart new file mode 100644 index 0000000..293a19a --- /dev/null +++ b/lib/model/version_model_links.dart @@ -0,0 +1,168 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class VersionModelLinks { + /// Returns a new [VersionModelLinks] instance. + VersionModelLinks({ + this.update, + this.updateImmediately, + required this.self, + this.definingProject, + required this.availableInProjects, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + VersionModelLinksUpdate? update; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + VersionModelLinksUpdateImmediately? updateImmediately; + + VersionModelLinksSelf self; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + VersionModelLinksDefiningProject? definingProject; + + VersionModelLinksAvailableInProjects availableInProjects; + + @override + bool operator ==(Object other) => identical(this, other) || other is VersionModelLinks && + other.update == update && + other.updateImmediately == updateImmediately && + other.self == self && + other.definingProject == definingProject && + other.availableInProjects == availableInProjects; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (update == null ? 0 : update!.hashCode) + + (updateImmediately == null ? 0 : updateImmediately!.hashCode) + + (self.hashCode) + + (definingProject == null ? 0 : definingProject!.hashCode) + + (availableInProjects.hashCode); + + @override + String toString() => 'VersionModelLinks[update=$update, updateImmediately=$updateImmediately, self=$self, definingProject=$definingProject, availableInProjects=$availableInProjects]'; + + Map toJson() { + final json = {}; + if (this.update != null) { + json[r'update'] = this.update; + } else { + json[r'update'] = null; + } + if (this.updateImmediately != null) { + json[r'updateImmediately'] = this.updateImmediately; + } else { + json[r'updateImmediately'] = null; + } + json[r'self'] = this.self; + if (this.definingProject != null) { + json[r'definingProject'] = this.definingProject; + } else { + json[r'definingProject'] = null; + } + json[r'availableInProjects'] = this.availableInProjects; + return json; + } + + /// Returns a new [VersionModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static VersionModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "VersionModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "VersionModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return VersionModelLinks( + update: VersionModelLinksUpdate.fromJson(json[r'update']), + updateImmediately: VersionModelLinksUpdateImmediately.fromJson(json[r'updateImmediately']), + self: VersionModelLinksSelf.fromJson(json[r'self'])!, + definingProject: VersionModelLinksDefiningProject.fromJson(json[r'definingProject']), + availableInProjects: VersionModelLinksAvailableInProjects.fromJson(json[r'availableInProjects'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = VersionModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = VersionModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of VersionModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = VersionModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'availableInProjects', + }; +} + diff --git a/lib/model/version_model_links_available_in_projects.dart b/lib/model/version_model_links_available_in_projects.dart new file mode 100644 index 0000000..d4ee4ef --- /dev/null +++ b/lib/model/version_model_links_available_in_projects.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class VersionModelLinksAvailableInProjects { + /// Returns a new [VersionModelLinksAvailableInProjects] instance. + VersionModelLinksAvailableInProjects({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is VersionModelLinksAvailableInProjects && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'VersionModelLinksAvailableInProjects[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [VersionModelLinksAvailableInProjects] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static VersionModelLinksAvailableInProjects? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "VersionModelLinksAvailableInProjects[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "VersionModelLinksAvailableInProjects[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return VersionModelLinksAvailableInProjects( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = VersionModelLinksAvailableInProjects.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = VersionModelLinksAvailableInProjects.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of VersionModelLinksAvailableInProjects-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = VersionModelLinksAvailableInProjects.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/version_model_links_defining_project.dart b/lib/model/version_model_links_defining_project.dart new file mode 100644 index 0000000..59dd3db --- /dev/null +++ b/lib/model/version_model_links_defining_project.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class VersionModelLinksDefiningProject { + /// Returns a new [VersionModelLinksDefiningProject] instance. + VersionModelLinksDefiningProject({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is VersionModelLinksDefiningProject && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'VersionModelLinksDefiningProject[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [VersionModelLinksDefiningProject] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static VersionModelLinksDefiningProject? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "VersionModelLinksDefiningProject[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "VersionModelLinksDefiningProject[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return VersionModelLinksDefiningProject( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = VersionModelLinksDefiningProject.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = VersionModelLinksDefiningProject.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of VersionModelLinksDefiningProject-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = VersionModelLinksDefiningProject.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/version_model_links_self.dart b/lib/model/version_model_links_self.dart new file mode 100644 index 0000000..f554bfb --- /dev/null +++ b/lib/model/version_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class VersionModelLinksSelf { + /// Returns a new [VersionModelLinksSelf] instance. + VersionModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is VersionModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'VersionModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [VersionModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static VersionModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "VersionModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "VersionModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return VersionModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = VersionModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = VersionModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of VersionModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = VersionModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/version_model_links_update.dart b/lib/model/version_model_links_update.dart new file mode 100644 index 0000000..d7dd3a1 --- /dev/null +++ b/lib/model/version_model_links_update.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class VersionModelLinksUpdate { + /// Returns a new [VersionModelLinksUpdate] instance. + VersionModelLinksUpdate({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is VersionModelLinksUpdate && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'VersionModelLinksUpdate[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [VersionModelLinksUpdate] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static VersionModelLinksUpdate? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "VersionModelLinksUpdate[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "VersionModelLinksUpdate[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return VersionModelLinksUpdate( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = VersionModelLinksUpdate.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = VersionModelLinksUpdate.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of VersionModelLinksUpdate-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = VersionModelLinksUpdate.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/version_model_links_update_immediately.dart b/lib/model/version_model_links_update_immediately.dart new file mode 100644 index 0000000..ed9280b --- /dev/null +++ b/lib/model/version_model_links_update_immediately.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class VersionModelLinksUpdateImmediately { + /// Returns a new [VersionModelLinksUpdateImmediately] instance. + VersionModelLinksUpdateImmediately({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is VersionModelLinksUpdateImmediately && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'VersionModelLinksUpdateImmediately[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [VersionModelLinksUpdateImmediately] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static VersionModelLinksUpdateImmediately? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "VersionModelLinksUpdateImmediately[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "VersionModelLinksUpdateImmediately[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return VersionModelLinksUpdateImmediately( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = VersionModelLinksUpdateImmediately.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = VersionModelLinksUpdateImmediately.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of VersionModelLinksUpdateImmediately-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = VersionModelLinksUpdateImmediately.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/watchers_model.dart b/lib/model/watchers_model.dart new file mode 100644 index 0000000..2aa342d --- /dev/null +++ b/lib/model/watchers_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WatchersModel { + /// Returns a new [WatchersModel] instance. + WatchersModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.embedded, + }); + + WatchersModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + WatchersModelAllOfLinks links; + + WatchersModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is WatchersModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'WatchersModel[type=$type, total=$total, count=$count, links=$links, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [WatchersModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WatchersModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WatchersModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WatchersModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WatchersModel( + type: WatchersModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: WatchersModelAllOfLinks.fromJson(json[r'_links'])!, + embedded: WatchersModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WatchersModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WatchersModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WatchersModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WatchersModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + '_embedded', + }; +} + + +class WatchersModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const WatchersModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = WatchersModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][WatchersModelTypeEnum]. + static const values = [ + collection, + ]; + + static WatchersModelTypeEnum? fromJson(dynamic value) => WatchersModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WatchersModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [WatchersModelTypeEnum] to String, +/// and [decode] dynamic data back to [WatchersModelTypeEnum]. +class WatchersModelTypeEnumTypeTransformer { + factory WatchersModelTypeEnumTypeTransformer() => _instance ??= const WatchersModelTypeEnumTypeTransformer._(); + + const WatchersModelTypeEnumTypeTransformer._(); + + String encode(WatchersModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a WatchersModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + WatchersModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return WatchersModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [WatchersModelTypeEnumTypeTransformer] instance. + static WatchersModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/watchers_model_all_of_embedded.dart b/lib/model/watchers_model_all_of_embedded.dart new file mode 100644 index 0000000..f218e82 --- /dev/null +++ b/lib/model/watchers_model_all_of_embedded.dart @@ -0,0 +1,112 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WatchersModelAllOfEmbedded { + /// Returns a new [WatchersModelAllOfEmbedded] instance. + WatchersModelAllOfEmbedded({ + this.elements, + }); + + Object? elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is WatchersModelAllOfEmbedded && + other.elements == elements; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements == null ? 0 : elements!.hashCode); + + @override + String toString() => 'WatchersModelAllOfEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + if (this.elements != null) { + json[r'elements'] = this.elements; + } else { + json[r'elements'] = null; + } + return json; + } + + /// Returns a new [WatchersModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WatchersModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WatchersModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WatchersModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WatchersModelAllOfEmbedded( + elements: mapValueOfType(json, r'elements'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WatchersModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WatchersModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WatchersModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WatchersModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/watchers_model_all_of_links.dart b/lib/model/watchers_model_all_of_links.dart new file mode 100644 index 0000000..3c572f9 --- /dev/null +++ b/lib/model/watchers_model_all_of_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WatchersModelAllOfLinks { + /// Returns a new [WatchersModelAllOfLinks] instance. + WatchersModelAllOfLinks({ + required this.self, + }); + + WatchersModelAllOfLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is WatchersModelAllOfLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'WatchersModelAllOfLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [WatchersModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WatchersModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WatchersModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WatchersModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WatchersModelAllOfLinks( + self: WatchersModelAllOfLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WatchersModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WatchersModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WatchersModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WatchersModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/watchers_model_all_of_links_self.dart b/lib/model/watchers_model_all_of_links_self.dart new file mode 100644 index 0000000..1b0cc93 --- /dev/null +++ b/lib/model/watchers_model_all_of_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WatchersModelAllOfLinksSelf { + /// Returns a new [WatchersModelAllOfLinksSelf] instance. + WatchersModelAllOfLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WatchersModelAllOfLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WatchersModelAllOfLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WatchersModelAllOfLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WatchersModelAllOfLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WatchersModelAllOfLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WatchersModelAllOfLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WatchersModelAllOfLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WatchersModelAllOfLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WatchersModelAllOfLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WatchersModelAllOfLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WatchersModelAllOfLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/week_day_collection_model.dart b/lib/model/week_day_collection_model.dart new file mode 100644 index 0000000..6f76515 --- /dev/null +++ b/lib/model/week_day_collection_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WeekDayCollectionModel { + /// Returns a new [WeekDayCollectionModel] instance. + WeekDayCollectionModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.embedded, + }); + + WeekDayCollectionModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + WeekDayCollectionModelAllOfLinks links; + + WeekDayCollectionModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is WeekDayCollectionModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'WeekDayCollectionModel[type=$type, total=$total, count=$count, links=$links, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [WeekDayCollectionModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WeekDayCollectionModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WeekDayCollectionModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WeekDayCollectionModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WeekDayCollectionModel( + type: WeekDayCollectionModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: WeekDayCollectionModelAllOfLinks.fromJson(json[r'_links'])!, + embedded: WeekDayCollectionModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeekDayCollectionModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WeekDayCollectionModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WeekDayCollectionModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WeekDayCollectionModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + '_embedded', + }; +} + + +class WeekDayCollectionModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const WeekDayCollectionModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = WeekDayCollectionModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][WeekDayCollectionModelTypeEnum]. + static const values = [ + collection, + ]; + + static WeekDayCollectionModelTypeEnum? fromJson(dynamic value) => WeekDayCollectionModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeekDayCollectionModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [WeekDayCollectionModelTypeEnum] to String, +/// and [decode] dynamic data back to [WeekDayCollectionModelTypeEnum]. +class WeekDayCollectionModelTypeEnumTypeTransformer { + factory WeekDayCollectionModelTypeEnumTypeTransformer() => _instance ??= const WeekDayCollectionModelTypeEnumTypeTransformer._(); + + const WeekDayCollectionModelTypeEnumTypeTransformer._(); + + String encode(WeekDayCollectionModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a WeekDayCollectionModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + WeekDayCollectionModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return WeekDayCollectionModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [WeekDayCollectionModelTypeEnumTypeTransformer] instance. + static WeekDayCollectionModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/week_day_collection_model_all_of_embedded.dart b/lib/model/week_day_collection_model_all_of_embedded.dart new file mode 100644 index 0000000..4dffc6b --- /dev/null +++ b/lib/model/week_day_collection_model_all_of_embedded.dart @@ -0,0 +1,114 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WeekDayCollectionModelAllOfEmbedded { + /// Returns a new [WeekDayCollectionModelAllOfEmbedded] instance. + WeekDayCollectionModelAllOfEmbedded({ + required this.elements, + }); + + /// The array of week days. + Object? elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is WeekDayCollectionModelAllOfEmbedded && + other.elements == elements; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements == null ? 0 : elements!.hashCode); + + @override + String toString() => 'WeekDayCollectionModelAllOfEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + if (this.elements != null) { + json[r'elements'] = this.elements; + } else { + json[r'elements'] = null; + } + return json; + } + + /// Returns a new [WeekDayCollectionModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WeekDayCollectionModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WeekDayCollectionModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WeekDayCollectionModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WeekDayCollectionModelAllOfEmbedded( + elements: mapValueOfType(json, r'elements'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeekDayCollectionModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WeekDayCollectionModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WeekDayCollectionModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WeekDayCollectionModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'elements', + }; +} + diff --git a/lib/model/week_day_collection_model_all_of_links.dart b/lib/model/week_day_collection_model_all_of_links.dart new file mode 100644 index 0000000..71dfee6 --- /dev/null +++ b/lib/model/week_day_collection_model_all_of_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WeekDayCollectionModelAllOfLinks { + /// Returns a new [WeekDayCollectionModelAllOfLinks] instance. + WeekDayCollectionModelAllOfLinks({ + required this.self, + }); + + WeekDayCollectionModelAllOfLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is WeekDayCollectionModelAllOfLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'WeekDayCollectionModelAllOfLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [WeekDayCollectionModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WeekDayCollectionModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WeekDayCollectionModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WeekDayCollectionModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WeekDayCollectionModelAllOfLinks( + self: WeekDayCollectionModelAllOfLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeekDayCollectionModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WeekDayCollectionModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WeekDayCollectionModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WeekDayCollectionModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/week_day_collection_model_all_of_links_self.dart b/lib/model/week_day_collection_model_all_of_links_self.dart new file mode 100644 index 0000000..93d0cdd --- /dev/null +++ b/lib/model/week_day_collection_model_all_of_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WeekDayCollectionModelAllOfLinksSelf { + /// Returns a new [WeekDayCollectionModelAllOfLinksSelf] instance. + WeekDayCollectionModelAllOfLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WeekDayCollectionModelAllOfLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WeekDayCollectionModelAllOfLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WeekDayCollectionModelAllOfLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WeekDayCollectionModelAllOfLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WeekDayCollectionModelAllOfLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WeekDayCollectionModelAllOfLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WeekDayCollectionModelAllOfLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeekDayCollectionModelAllOfLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WeekDayCollectionModelAllOfLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WeekDayCollectionModelAllOfLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WeekDayCollectionModelAllOfLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/week_day_collection_write_model.dart b/lib/model/week_day_collection_write_model.dart new file mode 100644 index 0000000..fc1963d --- /dev/null +++ b/lib/model/week_day_collection_write_model.dart @@ -0,0 +1,192 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WeekDayCollectionWriteModel { + /// Returns a new [WeekDayCollectionWriteModel] instance. + WeekDayCollectionWriteModel({ + required this.type, + required this.embedded, + }); + + WeekDayCollectionWriteModelTypeEnum? type; + + WeekDayCollectionWriteModelEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is WeekDayCollectionWriteModel && + other.type == type && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'WeekDayCollectionWriteModel[type=$type, embedded=$embedded]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [WeekDayCollectionWriteModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WeekDayCollectionWriteModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WeekDayCollectionWriteModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WeekDayCollectionWriteModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WeekDayCollectionWriteModel( + type: Object.fromJson(json[r'_type']), + embedded: WeekDayCollectionWriteModelEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeekDayCollectionWriteModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WeekDayCollectionWriteModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WeekDayCollectionWriteModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WeekDayCollectionWriteModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + '_embedded', + }; +} + + +class WeekDayCollectionWriteModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const WeekDayCollectionWriteModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const collection = WeekDayCollectionWriteModelTypeEnum._('Collection'); + + /// List of all possible values in this [enum][WeekDayCollectionWriteModelTypeEnum]. + static const values = [ + collection, + ]; + + static WeekDayCollectionWriteModelTypeEnum? fromJson(dynamic value) => WeekDayCollectionWriteModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeekDayCollectionWriteModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [WeekDayCollectionWriteModelTypeEnum] to Object, +/// and [decode] dynamic data back to [WeekDayCollectionWriteModelTypeEnum]. +class WeekDayCollectionWriteModelTypeEnumTypeTransformer { + factory WeekDayCollectionWriteModelTypeEnumTypeTransformer() => _instance ??= const WeekDayCollectionWriteModelTypeEnumTypeTransformer._(); + + const WeekDayCollectionWriteModelTypeEnumTypeTransformer._(); + + Object encode(WeekDayCollectionWriteModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a WeekDayCollectionWriteModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + WeekDayCollectionWriteModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'Collection': return WeekDayCollectionWriteModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [WeekDayCollectionWriteModelTypeEnumTypeTransformer] instance. + static WeekDayCollectionWriteModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/week_day_collection_write_model_embedded.dart b/lib/model/week_day_collection_write_model_embedded.dart new file mode 100644 index 0000000..058ea11 --- /dev/null +++ b/lib/model/week_day_collection_write_model_embedded.dart @@ -0,0 +1,114 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WeekDayCollectionWriteModelEmbedded { + /// Returns a new [WeekDayCollectionWriteModelEmbedded] instance. + WeekDayCollectionWriteModelEmbedded({ + required this.elements, + }); + + /// The array of week days. + Object? elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is WeekDayCollectionWriteModelEmbedded && + other.elements == elements; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements == null ? 0 : elements!.hashCode); + + @override + String toString() => 'WeekDayCollectionWriteModelEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + if (this.elements != null) { + json[r'elements'] = this.elements; + } else { + json[r'elements'] = null; + } + return json; + } + + /// Returns a new [WeekDayCollectionWriteModelEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WeekDayCollectionWriteModelEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WeekDayCollectionWriteModelEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WeekDayCollectionWriteModelEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WeekDayCollectionWriteModelEmbedded( + elements: mapValueOfType(json, r'elements'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeekDayCollectionWriteModelEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WeekDayCollectionWriteModelEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WeekDayCollectionWriteModelEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WeekDayCollectionWriteModelEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'elements', + }; +} + diff --git a/lib/model/week_day_model.dart b/lib/model/week_day_model.dart new file mode 100644 index 0000000..208f51e --- /dev/null +++ b/lib/model/week_day_model.dart @@ -0,0 +1,243 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WeekDayModel { + /// Returns a new [WeekDayModel] instance. + WeekDayModel({ + required this.type, + required this.day, + required this.name, + required this.working, + this.links, + }); + + WeekDayModelTypeEnum? type; + + /// The week day from 1 to 7. 1 is Monday. 7 is Sunday. + /// + /// Minimum value: 1 + /// Maximum value: 7 + Object? day; + + /// The week day name. + Object? name; + + /// `true` for a working week day, `false` otherwise. + Object? working; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WeekDaySelfLinkModel? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is WeekDayModel && + other.type == type && + other.day == day && + other.name == name && + other.working == working && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (day == null ? 0 : day!.hashCode) + + (name == null ? 0 : name!.hashCode) + + (working == null ? 0 : working!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'WeekDayModel[type=$type, day=$day, name=$name, working=$working, links=$links]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.day != null) { + json[r'day'] = this.day; + } else { + json[r'day'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.working != null) { + json[r'working'] = this.working; + } else { + json[r'working'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [WeekDayModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WeekDayModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WeekDayModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WeekDayModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WeekDayModel( + type: Object.fromJson(json[r'_type']), + day: mapValueOfType(json, r'day'), + name: mapValueOfType(json, r'name'), + working: mapValueOfType(json, r'working'), + links: WeekDaySelfLinkModel.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeekDayModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WeekDayModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WeekDayModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WeekDayModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'day', + 'name', + 'working', + }; +} + + +class WeekDayModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const WeekDayModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const weekDay = WeekDayModelTypeEnum._('WeekDay'); + + /// List of all possible values in this [enum][WeekDayModelTypeEnum]. + static const values = [ + weekDay, + ]; + + static WeekDayModelTypeEnum? fromJson(dynamic value) => WeekDayModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeekDayModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [WeekDayModelTypeEnum] to Object, +/// and [decode] dynamic data back to [WeekDayModelTypeEnum]. +class WeekDayModelTypeEnumTypeTransformer { + factory WeekDayModelTypeEnumTypeTransformer() => _instance ??= const WeekDayModelTypeEnumTypeTransformer._(); + + const WeekDayModelTypeEnumTypeTransformer._(); + + Object encode(WeekDayModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a WeekDayModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + WeekDayModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'WeekDay': return WeekDayModelTypeEnum.weekDay; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [WeekDayModelTypeEnumTypeTransformer] instance. + static WeekDayModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/week_day_self_link_model.dart b/lib/model/week_day_self_link_model.dart new file mode 100644 index 0000000..8287efb --- /dev/null +++ b/lib/model/week_day_self_link_model.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WeekDaySelfLinkModel { + /// Returns a new [WeekDaySelfLinkModel] instance. + WeekDaySelfLinkModel({ + this.self, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WeekDaySelfLinkModelSelf? self; + + @override + bool operator ==(Object other) => identical(this, other) || other is WeekDaySelfLinkModel && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self == null ? 0 : self!.hashCode); + + @override + String toString() => 'WeekDaySelfLinkModel[self=$self]'; + + Map toJson() { + final json = {}; + if (this.self != null) { + json[r'self'] = this.self; + } else { + json[r'self'] = null; + } + return json; + } + + /// Returns a new [WeekDaySelfLinkModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WeekDaySelfLinkModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WeekDaySelfLinkModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WeekDaySelfLinkModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WeekDaySelfLinkModel( + self: WeekDaySelfLinkModelSelf.fromJson(json[r'self']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeekDaySelfLinkModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WeekDaySelfLinkModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WeekDaySelfLinkModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WeekDaySelfLinkModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/week_day_self_link_model_self.dart b/lib/model/week_day_self_link_model_self.dart new file mode 100644 index 0000000..aba2356 --- /dev/null +++ b/lib/model/week_day_self_link_model_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WeekDaySelfLinkModelSelf { + /// Returns a new [WeekDaySelfLinkModelSelf] instance. + WeekDaySelfLinkModelSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WeekDaySelfLinkModelSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WeekDaySelfLinkModelSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WeekDaySelfLinkModelSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WeekDaySelfLinkModelSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WeekDaySelfLinkModelSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WeekDaySelfLinkModelSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WeekDaySelfLinkModelSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeekDaySelfLinkModelSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WeekDaySelfLinkModelSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WeekDaySelfLinkModelSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WeekDaySelfLinkModelSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/week_day_write_model.dart b/lib/model/week_day_write_model.dart new file mode 100644 index 0000000..5ef3278 --- /dev/null +++ b/lib/model/week_day_write_model.dart @@ -0,0 +1,197 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WeekDayWriteModel { + /// Returns a new [WeekDayWriteModel] instance. + WeekDayWriteModel({ + required this.type, + required this.working, + }); + + WeekDayWriteModelTypeEnum? type; + + /// `true` for a working day. `false` for a weekend day. + Object? working; + + @override + bool operator ==(Object other) => identical(this, other) || other is WeekDayWriteModel && + other.type == type && + other.working == working; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (working == null ? 0 : working!.hashCode); + + @override + String toString() => 'WeekDayWriteModel[type=$type, working=$working]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.working != null) { + json[r'working'] = this.working; + } else { + json[r'working'] = null; + } + return json; + } + + /// Returns a new [WeekDayWriteModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WeekDayWriteModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WeekDayWriteModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WeekDayWriteModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WeekDayWriteModel( + type: Object.fromJson(json[r'_type']), + working: mapValueOfType(json, r'working'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeekDayWriteModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WeekDayWriteModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WeekDayWriteModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WeekDayWriteModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'working', + }; +} + + +class WeekDayWriteModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const WeekDayWriteModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const weekDay = WeekDayWriteModelTypeEnum._('WeekDay'); + + /// List of all possible values in this [enum][WeekDayWriteModelTypeEnum]. + static const values = [ + weekDay, + ]; + + static WeekDayWriteModelTypeEnum? fromJson(dynamic value) => WeekDayWriteModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeekDayWriteModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [WeekDayWriteModelTypeEnum] to Object, +/// and [decode] dynamic data back to [WeekDayWriteModelTypeEnum]. +class WeekDayWriteModelTypeEnumTypeTransformer { + factory WeekDayWriteModelTypeEnumTypeTransformer() => _instance ??= const WeekDayWriteModelTypeEnumTypeTransformer._(); + + const WeekDayWriteModelTypeEnumTypeTransformer._(); + + Object encode(WeekDayWriteModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a WeekDayWriteModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + WeekDayWriteModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'WeekDay': return WeekDayWriteModelTypeEnum.weekDay; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [WeekDayWriteModelTypeEnumTypeTransformer] instance. + static WeekDayWriteModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/wiki_page_model.dart b/lib/model/wiki_page_model.dart new file mode 100644 index 0000000..e5ad1e2 --- /dev/null +++ b/lib/model/wiki_page_model.dart @@ -0,0 +1,143 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WikiPageModel { + /// Returns a new [WikiPageModel] instance. + WikiPageModel({ + this.id, + required this.title, + this.links, + }); + + /// Identifier of this wiki page + Object? id; + + /// The wiki page's title + Object? title; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WikiPageModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is WikiPageModel && + other.id == id && + other.title == title && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'WikiPageModel[id=$id, title=$title, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [WikiPageModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WikiPageModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WikiPageModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WikiPageModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WikiPageModel( + id: mapValueOfType(json, r'id'), + title: mapValueOfType(json, r'title'), + links: WikiPageModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WikiPageModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WikiPageModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WikiPageModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WikiPageModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'title', + }; +} + diff --git a/lib/model/wiki_page_model_links.dart b/lib/model/wiki_page_model_links.dart new file mode 100644 index 0000000..262fe31 --- /dev/null +++ b/lib/model/wiki_page_model_links.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WikiPageModelLinks { + /// Returns a new [WikiPageModelLinks] instance. + WikiPageModelLinks({ + this.addAttachment, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WikiPageModelLinksAddAttachment? addAttachment; + + @override + bool operator ==(Object other) => identical(this, other) || other is WikiPageModelLinks && + other.addAttachment == addAttachment; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (addAttachment == null ? 0 : addAttachment!.hashCode); + + @override + String toString() => 'WikiPageModelLinks[addAttachment=$addAttachment]'; + + Map toJson() { + final json = {}; + if (this.addAttachment != null) { + json[r'addAttachment'] = this.addAttachment; + } else { + json[r'addAttachment'] = null; + } + return json; + } + + /// Returns a new [WikiPageModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WikiPageModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WikiPageModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WikiPageModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WikiPageModelLinks( + addAttachment: WikiPageModelLinksAddAttachment.fromJson(json[r'addAttachment']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WikiPageModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WikiPageModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WikiPageModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WikiPageModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/wiki_page_model_links_add_attachment.dart b/lib/model/wiki_page_model_links_add_attachment.dart new file mode 100644 index 0000000..544c66d --- /dev/null +++ b/lib/model/wiki_page_model_links_add_attachment.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WikiPageModelLinksAddAttachment { + /// Returns a new [WikiPageModelLinksAddAttachment] instance. + WikiPageModelLinksAddAttachment({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WikiPageModelLinksAddAttachment && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WikiPageModelLinksAddAttachment[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WikiPageModelLinksAddAttachment] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WikiPageModelLinksAddAttachment? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WikiPageModelLinksAddAttachment[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WikiPageModelLinksAddAttachment[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WikiPageModelLinksAddAttachment( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WikiPageModelLinksAddAttachment.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WikiPageModelLinksAddAttachment.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WikiPageModelLinksAddAttachment-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WikiPageModelLinksAddAttachment.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model.dart b/lib/model/work_package_model.dart new file mode 100644 index 0000000..56c4140 --- /dev/null +++ b/lib/model/work_package_model.dart @@ -0,0 +1,429 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModel { + /// Returns a new [WorkPackageModel] instance. + WorkPackageModel({ + this.id, + this.lockVersion, + required this.subject, + this.type, + this.description, + this.scheduleManually, + this.readonly, + this.startDate, + this.dueDate, + this.date, + this.derivedStartDate, + this.derivedDueDate, + this.duration, + this.estimatedTime, + this.derivedEstimatedTime, + this.ignoreNonWorkingDays, + this.spentTime, + this.percentageDone, + this.createdAt, + this.updatedAt, + required this.links, + }); + + /// Work package id + /// + /// Minimum value: 1 + Object? id; + + /// The version of the item as used for optimistic locking + Object? lockVersion; + + /// Work package subject + Object? subject; + + WorkPackageModelTypeEnum? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelDescription? description; + + /// If false (default) schedule automatically. + Object? scheduleManually; + + /// If true, the work package is in a readonly status so with the exception of the status, no other property can be altered. + Object? readonly; + + /// Scheduled beginning of a work package + Object? startDate; + + /// Scheduled end of a work package + Object? dueDate; + + /// Date on which a milestone is achieved + Object? date; + + /// Similar to start date but is not set by a client but rather deduced by the work packages' descendants. If manual scheduleManually is active, the two dates can deviate. + Object? derivedStartDate; + + /// Similar to due date but is not set by a client but rather deduced by the work packages' descendants. If manual scheduleManually is active, the two dates can deviate. + Object? derivedDueDate; + + /// **(NOT IMPLEMENTED)** The amount of time in hours the work package needs to be completed. Not available for milestone type of work packages. + Object? duration; + + /// Time a work package likely needs to be completed excluding its descendants + Object? estimatedTime; + + /// Time a work package likely needs to be completed including its descendants + Object? derivedEstimatedTime; + + /// **(NOT IMPLEMENTED)** When scheduling, whether or not to ignore the non working days being defined. A work package with the flag set to true will be allowed to be scheduled to a non working day. + Object? ignoreNonWorkingDays; + + /// The time booked for this work package by users working on it # Conditions **Permission** view time entries + Object? spentTime; + + /// Amount of total completion for a work package + /// + /// Maximum value: 100 + Object? percentageDone; + + /// Time of creation + Object? createdAt; + + /// Time of the most recent change to the work package + Object? updatedAt; + + WorkPackageModelLinks links; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModel && + other.id == id && + other.lockVersion == lockVersion && + other.subject == subject && + other.type == type && + other.description == description && + other.scheduleManually == scheduleManually && + other.readonly == readonly && + other.startDate == startDate && + other.dueDate == dueDate && + other.date == date && + other.derivedStartDate == derivedStartDate && + other.derivedDueDate == derivedDueDate && + other.duration == duration && + other.estimatedTime == estimatedTime && + other.derivedEstimatedTime == derivedEstimatedTime && + other.ignoreNonWorkingDays == ignoreNonWorkingDays && + other.spentTime == spentTime && + other.percentageDone == percentageDone && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (lockVersion == null ? 0 : lockVersion!.hashCode) + + (subject == null ? 0 : subject!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (scheduleManually == null ? 0 : scheduleManually!.hashCode) + + (readonly == null ? 0 : readonly!.hashCode) + + (startDate == null ? 0 : startDate!.hashCode) + + (dueDate == null ? 0 : dueDate!.hashCode) + + (date == null ? 0 : date!.hashCode) + + (derivedStartDate == null ? 0 : derivedStartDate!.hashCode) + + (derivedDueDate == null ? 0 : derivedDueDate!.hashCode) + + (duration == null ? 0 : duration!.hashCode) + + (estimatedTime == null ? 0 : estimatedTime!.hashCode) + + (derivedEstimatedTime == null ? 0 : derivedEstimatedTime!.hashCode) + + (ignoreNonWorkingDays == null ? 0 : ignoreNonWorkingDays!.hashCode) + + (spentTime == null ? 0 : spentTime!.hashCode) + + (percentageDone == null ? 0 : percentageDone!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (links.hashCode); + + @override + String toString() => 'WorkPackageModel[id=$id, lockVersion=$lockVersion, subject=$subject, type=$type, description=$description, scheduleManually=$scheduleManually, readonly=$readonly, startDate=$startDate, dueDate=$dueDate, date=$date, derivedStartDate=$derivedStartDate, derivedDueDate=$derivedDueDate, duration=$duration, estimatedTime=$estimatedTime, derivedEstimatedTime=$derivedEstimatedTime, ignoreNonWorkingDays=$ignoreNonWorkingDays, spentTime=$spentTime, percentageDone=$percentageDone, createdAt=$createdAt, updatedAt=$updatedAt, links=$links]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.lockVersion != null) { + json[r'lockVersion'] = this.lockVersion; + } else { + json[r'lockVersion'] = null; + } + if (this.subject != null) { + json[r'subject'] = this.subject; + } else { + json[r'subject'] = null; + } + if (this.type != null) { + json[r'_type'] = this.type; + } else { + json[r'_type'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.scheduleManually != null) { + json[r'scheduleManually'] = this.scheduleManually; + } else { + json[r'scheduleManually'] = null; + } + if (this.readonly != null) { + json[r'readonly'] = this.readonly; + } else { + json[r'readonly'] = null; + } + if (this.startDate != null) { + json[r'startDate'] = this.startDate; + } else { + json[r'startDate'] = null; + } + if (this.dueDate != null) { + json[r'dueDate'] = this.dueDate; + } else { + json[r'dueDate'] = null; + } + if (this.date != null) { + json[r'date'] = this.date; + } else { + json[r'date'] = null; + } + if (this.derivedStartDate != null) { + json[r'derivedStartDate'] = this.derivedStartDate; + } else { + json[r'derivedStartDate'] = null; + } + if (this.derivedDueDate != null) { + json[r'derivedDueDate'] = this.derivedDueDate; + } else { + json[r'derivedDueDate'] = null; + } + if (this.duration != null) { + json[r'duration'] = this.duration; + } else { + json[r'duration'] = null; + } + if (this.estimatedTime != null) { + json[r'estimatedTime'] = this.estimatedTime; + } else { + json[r'estimatedTime'] = null; + } + if (this.derivedEstimatedTime != null) { + json[r'derivedEstimatedTime'] = this.derivedEstimatedTime; + } else { + json[r'derivedEstimatedTime'] = null; + } + if (this.ignoreNonWorkingDays != null) { + json[r'ignoreNonWorkingDays'] = this.ignoreNonWorkingDays; + } else { + json[r'ignoreNonWorkingDays'] = null; + } + if (this.spentTime != null) { + json[r'spentTime'] = this.spentTime; + } else { + json[r'spentTime'] = null; + } + if (this.percentageDone != null) { + json[r'percentageDone'] = this.percentageDone; + } else { + json[r'percentageDone'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt; + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt; + } else { + json[r'updatedAt'] = null; + } + json[r'_links'] = this.links; + return json; + } + + /// Returns a new [WorkPackageModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModel( + id: mapValueOfType(json, r'id'), + lockVersion: mapValueOfType(json, r'lockVersion'), + subject: mapValueOfType(json, r'subject'), + type: Object.fromJson(json[r'_type']), + description: WorkPackageModelDescription.fromJson(json[r'description']), + scheduleManually: mapValueOfType(json, r'scheduleManually'), + readonly: mapValueOfType(json, r'readonly'), + startDate: mapValueOfType(json, r'startDate'), + dueDate: mapValueOfType(json, r'dueDate'), + date: mapValueOfType(json, r'date'), + derivedStartDate: mapValueOfType(json, r'derivedStartDate'), + derivedDueDate: mapValueOfType(json, r'derivedDueDate'), + duration: mapValueOfType(json, r'duration'), + estimatedTime: mapValueOfType(json, r'estimatedTime'), + derivedEstimatedTime: mapValueOfType(json, r'derivedEstimatedTime'), + ignoreNonWorkingDays: mapValueOfType(json, r'ignoreNonWorkingDays'), + spentTime: mapValueOfType(json, r'spentTime'), + percentageDone: mapValueOfType(json, r'percentageDone'), + createdAt: mapValueOfType(json, r'createdAt'), + updatedAt: mapValueOfType(json, r'updatedAt'), + links: WorkPackageModelLinks.fromJson(json[r'_links'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'subject', + '_links', + }; +} + + +class WorkPackageModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const WorkPackageModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final Object value; + + @override + String toString() => value.toString(); + + Object toJson() => value; + + static const workPackage = WorkPackageModelTypeEnum._('WorkPackage'); + + /// List of all possible values in this [enum][WorkPackageModelTypeEnum]. + static const values = [ + workPackage, + ]; + + static WorkPackageModelTypeEnum? fromJson(dynamic value) => WorkPackageModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [WorkPackageModelTypeEnum] to Object, +/// and [decode] dynamic data back to [WorkPackageModelTypeEnum]. +class WorkPackageModelTypeEnumTypeTransformer { + factory WorkPackageModelTypeEnumTypeTransformer() => _instance ??= const WorkPackageModelTypeEnumTypeTransformer._(); + + const WorkPackageModelTypeEnumTypeTransformer._(); + + Object encode(WorkPackageModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a WorkPackageModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + WorkPackageModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 'WorkPackage': return WorkPackageModelTypeEnum.workPackage; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [WorkPackageModelTypeEnumTypeTransformer] instance. + static WorkPackageModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/work_package_model_description.dart b/lib/model/work_package_model_description.dart new file mode 100644 index 0000000..0a4b9c2 --- /dev/null +++ b/lib/model/work_package_model_description.dart @@ -0,0 +1,223 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelDescription { + /// Returns a new [WorkPackageModelDescription] instance. + WorkPackageModelDescription({ + required this.format, + this.raw, + this.html, + }); + + /// Indicates the formatting language of the raw text + WorkPackageModelDescriptionFormatEnum format; + + /// The raw text, as entered by the user + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? raw; + + /// The text converted to HTML according to the format + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? html; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelDescription && + other.format == format && + other.raw == raw && + other.html == html; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (format.hashCode) + + (raw == null ? 0 : raw!.hashCode) + + (html == null ? 0 : html!.hashCode); + + @override + String toString() => 'WorkPackageModelDescription[format=$format, raw=$raw, html=$html]'; + + Map toJson() { + final json = {}; + json[r'format'] = this.format; + if (this.raw != null) { + json[r'raw'] = this.raw; + } else { + json[r'raw'] = null; + } + if (this.html != null) { + json[r'html'] = this.html; + } else { + json[r'html'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelDescription] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelDescription? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelDescription[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelDescription[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelDescription( + format: WorkPackageModelDescriptionFormatEnum.fromJson(json[r'format'])!, + raw: mapValueOfType(json, r'raw'), + html: mapValueOfType(json, r'html'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelDescription.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelDescription.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelDescription-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelDescription.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'format', + }; +} + +/// Indicates the formatting language of the raw text +class WorkPackageModelDescriptionFormatEnum { + /// Instantiate a new enum with the provided [value]. + const WorkPackageModelDescriptionFormatEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const plain = WorkPackageModelDescriptionFormatEnum._(r'plain'); + static const markdown = WorkPackageModelDescriptionFormatEnum._(r'markdown'); + static const custom = WorkPackageModelDescriptionFormatEnum._(r'custom'); + + /// List of all possible values in this [enum][WorkPackageModelDescriptionFormatEnum]. + static const values = [ + plain, + markdown, + custom, + ]; + + static WorkPackageModelDescriptionFormatEnum? fromJson(dynamic value) => WorkPackageModelDescriptionFormatEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelDescriptionFormatEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [WorkPackageModelDescriptionFormatEnum] to String, +/// and [decode] dynamic data back to [WorkPackageModelDescriptionFormatEnum]. +class WorkPackageModelDescriptionFormatEnumTypeTransformer { + factory WorkPackageModelDescriptionFormatEnumTypeTransformer() => _instance ??= const WorkPackageModelDescriptionFormatEnumTypeTransformer._(); + + const WorkPackageModelDescriptionFormatEnumTypeTransformer._(); + + String encode(WorkPackageModelDescriptionFormatEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a WorkPackageModelDescriptionFormatEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + WorkPackageModelDescriptionFormatEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'plain': return WorkPackageModelDescriptionFormatEnum.plain; + case r'markdown': return WorkPackageModelDescriptionFormatEnum.markdown; + case r'custom': return WorkPackageModelDescriptionFormatEnum.custom; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [WorkPackageModelDescriptionFormatEnumTypeTransformer] instance. + static WorkPackageModelDescriptionFormatEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/work_package_model_links.dart b/lib/model/work_package_model_links.dart new file mode 100644 index 0000000..e9049d1 --- /dev/null +++ b/lib/model/work_package_model_links.dart @@ -0,0 +1,591 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinks { + /// Returns a new [WorkPackageModelLinks] instance. + WorkPackageModelLinks({ + this.addAttachment, + this.addComment, + this.addRelation, + this.addWatcher, + this.customActions, + this.previewMarkup, + this.removeWatcher, + this.unwatch, + this.update, + this.updateImmediately, + this.watch, + required this.self, + required this.schema, + required this.ancestors, + required this.attachments, + required this.author, + this.assignee, + this.availableWatchers, + this.budget, + this.category, + required this.children, + this.addFileLink, + this.fileLinks, + this.parent, + required this.priority, + required this.project, + this.responsible, + this.relations, + this.revisions, + required this.status, + this.timeEntries, + required this.type, + this.version, + this.watchers, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksAddAttachment? addAttachment; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksAddComment? addComment; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksAddRelation? addRelation; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksAddWatcher? addWatcher; + + Object? customActions; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksPreviewMarkup? previewMarkup; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksRemoveWatcher? removeWatcher; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksUnwatch? unwatch; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksUpdate? update; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksUpdateImmediately? updateImmediately; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksWatch? watch; + + WorkPackageModelLinksSelf self; + + WorkPackageModelLinksSchema schema; + + Object? ancestors; + + WorkPackageModelLinksAttachments attachments; + + WorkPackageModelLinksAuthor author; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksAssignee? assignee; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksAvailableWatchers? availableWatchers; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksBudget? budget; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksCategory? category; + + Object? children; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksAddFileLink? addFileLink; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksFileLinks? fileLinks; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksParent? parent; + + WorkPackageModelLinksPriority priority; + + WorkPackageModelLinksProject project; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksResponsible? responsible; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksRelations? relations; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksRevisions? revisions; + + WorkPackageModelLinksStatus status; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksTimeEntries? timeEntries; + + WorkPackageModelLinksType type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksVersion? version; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksWatchers? watchers; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinks && + other.addAttachment == addAttachment && + other.addComment == addComment && + other.addRelation == addRelation && + other.addWatcher == addWatcher && + other.customActions == customActions && + other.previewMarkup == previewMarkup && + other.removeWatcher == removeWatcher && + other.unwatch == unwatch && + other.update == update && + other.updateImmediately == updateImmediately && + other.watch == watch && + other.self == self && + other.schema == schema && + other.ancestors == ancestors && + other.attachments == attachments && + other.author == author && + other.assignee == assignee && + other.availableWatchers == availableWatchers && + other.budget == budget && + other.category == category && + other.children == children && + other.addFileLink == addFileLink && + other.fileLinks == fileLinks && + other.parent == parent && + other.priority == priority && + other.project == project && + other.responsible == responsible && + other.relations == relations && + other.revisions == revisions && + other.status == status && + other.timeEntries == timeEntries && + other.type == type && + other.version == version && + other.watchers == watchers; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (addAttachment == null ? 0 : addAttachment!.hashCode) + + (addComment == null ? 0 : addComment!.hashCode) + + (addRelation == null ? 0 : addRelation!.hashCode) + + (addWatcher == null ? 0 : addWatcher!.hashCode) + + (customActions == null ? 0 : customActions!.hashCode) + + (previewMarkup == null ? 0 : previewMarkup!.hashCode) + + (removeWatcher == null ? 0 : removeWatcher!.hashCode) + + (unwatch == null ? 0 : unwatch!.hashCode) + + (update == null ? 0 : update!.hashCode) + + (updateImmediately == null ? 0 : updateImmediately!.hashCode) + + (watch == null ? 0 : watch!.hashCode) + + (self.hashCode) + + (schema.hashCode) + + (ancestors == null ? 0 : ancestors!.hashCode) + + (attachments.hashCode) + + (author.hashCode) + + (assignee == null ? 0 : assignee!.hashCode) + + (availableWatchers == null ? 0 : availableWatchers!.hashCode) + + (budget == null ? 0 : budget!.hashCode) + + (category == null ? 0 : category!.hashCode) + + (children == null ? 0 : children!.hashCode) + + (addFileLink == null ? 0 : addFileLink!.hashCode) + + (fileLinks == null ? 0 : fileLinks!.hashCode) + + (parent == null ? 0 : parent!.hashCode) + + (priority.hashCode) + + (project.hashCode) + + (responsible == null ? 0 : responsible!.hashCode) + + (relations == null ? 0 : relations!.hashCode) + + (revisions == null ? 0 : revisions!.hashCode) + + (status.hashCode) + + (timeEntries == null ? 0 : timeEntries!.hashCode) + + (type.hashCode) + + (version == null ? 0 : version!.hashCode) + + (watchers == null ? 0 : watchers!.hashCode); + + @override + String toString() => 'WorkPackageModelLinks[addAttachment=$addAttachment, addComment=$addComment, addRelation=$addRelation, addWatcher=$addWatcher, customActions=$customActions, previewMarkup=$previewMarkup, removeWatcher=$removeWatcher, unwatch=$unwatch, update=$update, updateImmediately=$updateImmediately, watch=$watch, self=$self, schema=$schema, ancestors=$ancestors, attachments=$attachments, author=$author, assignee=$assignee, availableWatchers=$availableWatchers, budget=$budget, category=$category, children=$children, addFileLink=$addFileLink, fileLinks=$fileLinks, parent=$parent, priority=$priority, project=$project, responsible=$responsible, relations=$relations, revisions=$revisions, status=$status, timeEntries=$timeEntries, type=$type, version=$version, watchers=$watchers]'; + + Map toJson() { + final json = {}; + if (this.addAttachment != null) { + json[r'addAttachment'] = this.addAttachment; + } else { + json[r'addAttachment'] = null; + } + if (this.addComment != null) { + json[r'addComment'] = this.addComment; + } else { + json[r'addComment'] = null; + } + if (this.addRelation != null) { + json[r'addRelation'] = this.addRelation; + } else { + json[r'addRelation'] = null; + } + if (this.addWatcher != null) { + json[r'addWatcher'] = this.addWatcher; + } else { + json[r'addWatcher'] = null; + } + if (this.customActions != null) { + json[r'customActions'] = this.customActions; + } else { + json[r'customActions'] = null; + } + if (this.previewMarkup != null) { + json[r'previewMarkup'] = this.previewMarkup; + } else { + json[r'previewMarkup'] = null; + } + if (this.removeWatcher != null) { + json[r'removeWatcher'] = this.removeWatcher; + } else { + json[r'removeWatcher'] = null; + } + if (this.unwatch != null) { + json[r'unwatch'] = this.unwatch; + } else { + json[r'unwatch'] = null; + } + if (this.update != null) { + json[r'update'] = this.update; + } else { + json[r'update'] = null; + } + if (this.updateImmediately != null) { + json[r'updateImmediately'] = this.updateImmediately; + } else { + json[r'updateImmediately'] = null; + } + if (this.watch != null) { + json[r'watch'] = this.watch; + } else { + json[r'watch'] = null; + } + json[r'self'] = this.self; + json[r'schema'] = this.schema; + if (this.ancestors != null) { + json[r'ancestors'] = this.ancestors; + } else { + json[r'ancestors'] = null; + } + json[r'attachments'] = this.attachments; + json[r'author'] = this.author; + if (this.assignee != null) { + json[r'assignee'] = this.assignee; + } else { + json[r'assignee'] = null; + } + if (this.availableWatchers != null) { + json[r'availableWatchers'] = this.availableWatchers; + } else { + json[r'availableWatchers'] = null; + } + if (this.budget != null) { + json[r'budget'] = this.budget; + } else { + json[r'budget'] = null; + } + if (this.category != null) { + json[r'category'] = this.category; + } else { + json[r'category'] = null; + } + if (this.children != null) { + json[r'children'] = this.children; + } else { + json[r'children'] = null; + } + if (this.addFileLink != null) { + json[r'addFileLink'] = this.addFileLink; + } else { + json[r'addFileLink'] = null; + } + if (this.fileLinks != null) { + json[r'fileLinks'] = this.fileLinks; + } else { + json[r'fileLinks'] = null; + } + if (this.parent != null) { + json[r'parent'] = this.parent; + } else { + json[r'parent'] = null; + } + json[r'priority'] = this.priority; + json[r'project'] = this.project; + if (this.responsible != null) { + json[r'responsible'] = this.responsible; + } else { + json[r'responsible'] = null; + } + if (this.relations != null) { + json[r'relations'] = this.relations; + } else { + json[r'relations'] = null; + } + if (this.revisions != null) { + json[r'revisions'] = this.revisions; + } else { + json[r'revisions'] = null; + } + json[r'status'] = this.status; + if (this.timeEntries != null) { + json[r'timeEntries'] = this.timeEntries; + } else { + json[r'timeEntries'] = null; + } + json[r'type'] = this.type; + if (this.version != null) { + json[r'version'] = this.version; + } else { + json[r'version'] = null; + } + if (this.watchers != null) { + json[r'watchers'] = this.watchers; + } else { + json[r'watchers'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinks( + addAttachment: WorkPackageModelLinksAddAttachment.fromJson(json[r'addAttachment']), + addComment: WorkPackageModelLinksAddComment.fromJson(json[r'addComment']), + addRelation: WorkPackageModelLinksAddRelation.fromJson(json[r'addRelation']), + addWatcher: WorkPackageModelLinksAddWatcher.fromJson(json[r'addWatcher']), + customActions: mapValueOfType(json, r'customActions'), + previewMarkup: WorkPackageModelLinksPreviewMarkup.fromJson(json[r'previewMarkup']), + removeWatcher: WorkPackageModelLinksRemoveWatcher.fromJson(json[r'removeWatcher']), + unwatch: WorkPackageModelLinksUnwatch.fromJson(json[r'unwatch']), + update: WorkPackageModelLinksUpdate.fromJson(json[r'update']), + updateImmediately: WorkPackageModelLinksUpdateImmediately.fromJson(json[r'updateImmediately']), + watch: WorkPackageModelLinksWatch.fromJson(json[r'watch']), + self: WorkPackageModelLinksSelf.fromJson(json[r'self'])!, + schema: WorkPackageModelLinksSchema.fromJson(json[r'schema'])!, + ancestors: mapValueOfType(json, r'ancestors'), + attachments: WorkPackageModelLinksAttachments.fromJson(json[r'attachments'])!, + author: WorkPackageModelLinksAuthor.fromJson(json[r'author'])!, + assignee: WorkPackageModelLinksAssignee.fromJson(json[r'assignee']), + availableWatchers: WorkPackageModelLinksAvailableWatchers.fromJson(json[r'availableWatchers']), + budget: WorkPackageModelLinksBudget.fromJson(json[r'budget']), + category: WorkPackageModelLinksCategory.fromJson(json[r'category']), + children: mapValueOfType(json, r'children'), + addFileLink: WorkPackageModelLinksAddFileLink.fromJson(json[r'addFileLink']), + fileLinks: WorkPackageModelLinksFileLinks.fromJson(json[r'fileLinks']), + parent: WorkPackageModelLinksParent.fromJson(json[r'parent']), + priority: WorkPackageModelLinksPriority.fromJson(json[r'priority'])!, + project: WorkPackageModelLinksProject.fromJson(json[r'project'])!, + responsible: WorkPackageModelLinksResponsible.fromJson(json[r'responsible']), + relations: WorkPackageModelLinksRelations.fromJson(json[r'relations']), + revisions: WorkPackageModelLinksRevisions.fromJson(json[r'revisions']), + status: WorkPackageModelLinksStatus.fromJson(json[r'status'])!, + timeEntries: WorkPackageModelLinksTimeEntries.fromJson(json[r'timeEntries']), + type: WorkPackageModelLinksType.fromJson(json[r'type'])!, + version: WorkPackageModelLinksVersion.fromJson(json[r'version']), + watchers: WorkPackageModelLinksWatchers.fromJson(json[r'watchers']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + 'schema', + 'ancestors', + 'attachments', + 'author', + 'children', + 'priority', + 'project', + 'status', + 'type', + }; +} + diff --git a/lib/model/work_package_model_links_add_attachment.dart b/lib/model/work_package_model_links_add_attachment.dart new file mode 100644 index 0000000..709397f --- /dev/null +++ b/lib/model/work_package_model_links_add_attachment.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksAddAttachment { + /// Returns a new [WorkPackageModelLinksAddAttachment] instance. + WorkPackageModelLinksAddAttachment({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksAddAttachment && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksAddAttachment[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksAddAttachment] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksAddAttachment? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksAddAttachment[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksAddAttachment[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksAddAttachment( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksAddAttachment.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksAddAttachment.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksAddAttachment-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksAddAttachment.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_add_comment.dart b/lib/model/work_package_model_links_add_comment.dart new file mode 100644 index 0000000..bff447f --- /dev/null +++ b/lib/model/work_package_model_links_add_comment.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksAddComment { + /// Returns a new [WorkPackageModelLinksAddComment] instance. + WorkPackageModelLinksAddComment({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksAddComment && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksAddComment[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksAddComment] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksAddComment? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksAddComment[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksAddComment[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksAddComment( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksAddComment.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksAddComment.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksAddComment-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksAddComment.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_add_file_link.dart b/lib/model/work_package_model_links_add_file_link.dart new file mode 100644 index 0000000..8b9f39a --- /dev/null +++ b/lib/model/work_package_model_links_add_file_link.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksAddFileLink { + /// Returns a new [WorkPackageModelLinksAddFileLink] instance. + WorkPackageModelLinksAddFileLink({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksAddFileLink && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksAddFileLink[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksAddFileLink] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksAddFileLink? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksAddFileLink[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksAddFileLink[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksAddFileLink( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksAddFileLink.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksAddFileLink.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksAddFileLink-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksAddFileLink.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_add_relation.dart b/lib/model/work_package_model_links_add_relation.dart new file mode 100644 index 0000000..dfdf89b --- /dev/null +++ b/lib/model/work_package_model_links_add_relation.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksAddRelation { + /// Returns a new [WorkPackageModelLinksAddRelation] instance. + WorkPackageModelLinksAddRelation({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksAddRelation && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksAddRelation[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksAddRelation] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksAddRelation? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksAddRelation[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksAddRelation[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksAddRelation( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksAddRelation.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksAddRelation.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksAddRelation-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksAddRelation.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_add_watcher.dart b/lib/model/work_package_model_links_add_watcher.dart new file mode 100644 index 0000000..ec4fc32 --- /dev/null +++ b/lib/model/work_package_model_links_add_watcher.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksAddWatcher { + /// Returns a new [WorkPackageModelLinksAddWatcher] instance. + WorkPackageModelLinksAddWatcher({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksAddWatcher && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksAddWatcher[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksAddWatcher] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksAddWatcher? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksAddWatcher[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksAddWatcher[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksAddWatcher( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksAddWatcher.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksAddWatcher.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksAddWatcher-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksAddWatcher.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_assignee.dart b/lib/model/work_package_model_links_assignee.dart new file mode 100644 index 0000000..1ac66c3 --- /dev/null +++ b/lib/model/work_package_model_links_assignee.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksAssignee { + /// Returns a new [WorkPackageModelLinksAssignee] instance. + WorkPackageModelLinksAssignee({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksAssignee && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksAssignee[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksAssignee] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksAssignee? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksAssignee[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksAssignee[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksAssignee( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksAssignee.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksAssignee.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksAssignee-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksAssignee.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_attachments.dart b/lib/model/work_package_model_links_attachments.dart new file mode 100644 index 0000000..13b6fe1 --- /dev/null +++ b/lib/model/work_package_model_links_attachments.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksAttachments { + /// Returns a new [WorkPackageModelLinksAttachments] instance. + WorkPackageModelLinksAttachments({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksAttachments && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksAttachments[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksAttachments] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksAttachments? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksAttachments[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksAttachments[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksAttachments( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksAttachments.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksAttachments.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksAttachments-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksAttachments.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_author.dart b/lib/model/work_package_model_links_author.dart new file mode 100644 index 0000000..ccc73d8 --- /dev/null +++ b/lib/model/work_package_model_links_author.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksAuthor { + /// Returns a new [WorkPackageModelLinksAuthor] instance. + WorkPackageModelLinksAuthor({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksAuthor && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksAuthor[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksAuthor] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksAuthor? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksAuthor[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksAuthor[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksAuthor( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksAuthor.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksAuthor.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksAuthor-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksAuthor.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_available_watchers.dart b/lib/model/work_package_model_links_available_watchers.dart new file mode 100644 index 0000000..35af2d2 --- /dev/null +++ b/lib/model/work_package_model_links_available_watchers.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksAvailableWatchers { + /// Returns a new [WorkPackageModelLinksAvailableWatchers] instance. + WorkPackageModelLinksAvailableWatchers({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksAvailableWatchers && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksAvailableWatchers[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksAvailableWatchers] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksAvailableWatchers? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksAvailableWatchers[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksAvailableWatchers[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksAvailableWatchers( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksAvailableWatchers.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksAvailableWatchers.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksAvailableWatchers-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksAvailableWatchers.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_budget.dart b/lib/model/work_package_model_links_budget.dart new file mode 100644 index 0000000..ca70f93 --- /dev/null +++ b/lib/model/work_package_model_links_budget.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksBudget { + /// Returns a new [WorkPackageModelLinksBudget] instance. + WorkPackageModelLinksBudget({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksBudget && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksBudget[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksBudget] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksBudget? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksBudget[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksBudget[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksBudget( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksBudget.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksBudget.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksBudget-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksBudget.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_category.dart b/lib/model/work_package_model_links_category.dart new file mode 100644 index 0000000..7d2a336 --- /dev/null +++ b/lib/model/work_package_model_links_category.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksCategory { + /// Returns a new [WorkPackageModelLinksCategory] instance. + WorkPackageModelLinksCategory({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksCategory && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksCategory[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksCategory] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksCategory? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksCategory[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksCategory[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksCategory( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksCategory.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksCategory.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksCategory-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksCategory.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_file_links.dart b/lib/model/work_package_model_links_file_links.dart new file mode 100644 index 0000000..02abf0f --- /dev/null +++ b/lib/model/work_package_model_links_file_links.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksFileLinks { + /// Returns a new [WorkPackageModelLinksFileLinks] instance. + WorkPackageModelLinksFileLinks({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksFileLinks && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksFileLinks[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksFileLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksFileLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksFileLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksFileLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksFileLinks( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksFileLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksFileLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksFileLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksFileLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_parent.dart b/lib/model/work_package_model_links_parent.dart new file mode 100644 index 0000000..08de245 --- /dev/null +++ b/lib/model/work_package_model_links_parent.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksParent { + /// Returns a new [WorkPackageModelLinksParent] instance. + WorkPackageModelLinksParent({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksParent && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksParent[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksParent] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksParent? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksParent[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksParent[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksParent( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksParent.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksParent.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksParent-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksParent.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_preview_markup.dart b/lib/model/work_package_model_links_preview_markup.dart new file mode 100644 index 0000000..92a9719 --- /dev/null +++ b/lib/model/work_package_model_links_preview_markup.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksPreviewMarkup { + /// Returns a new [WorkPackageModelLinksPreviewMarkup] instance. + WorkPackageModelLinksPreviewMarkup({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksPreviewMarkup && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksPreviewMarkup[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksPreviewMarkup] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksPreviewMarkup? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksPreviewMarkup[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksPreviewMarkup[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksPreviewMarkup( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksPreviewMarkup.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksPreviewMarkup.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksPreviewMarkup-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksPreviewMarkup.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_priority.dart b/lib/model/work_package_model_links_priority.dart new file mode 100644 index 0000000..033db5a --- /dev/null +++ b/lib/model/work_package_model_links_priority.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksPriority { + /// Returns a new [WorkPackageModelLinksPriority] instance. + WorkPackageModelLinksPriority({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksPriority && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksPriority[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksPriority] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksPriority? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksPriority[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksPriority[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksPriority( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksPriority.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksPriority.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksPriority-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksPriority.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_project.dart b/lib/model/work_package_model_links_project.dart new file mode 100644 index 0000000..b0027f9 --- /dev/null +++ b/lib/model/work_package_model_links_project.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksProject { + /// Returns a new [WorkPackageModelLinksProject] instance. + WorkPackageModelLinksProject({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksProject && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksProject[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksProject] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksProject? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksProject[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksProject[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksProject( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksProject.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksProject.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksProject-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksProject.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_relations.dart b/lib/model/work_package_model_links_relations.dart new file mode 100644 index 0000000..34e42c3 --- /dev/null +++ b/lib/model/work_package_model_links_relations.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksRelations { + /// Returns a new [WorkPackageModelLinksRelations] instance. + WorkPackageModelLinksRelations({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksRelations && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksRelations[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksRelations] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksRelations? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksRelations[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksRelations[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksRelations( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksRelations.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksRelations.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksRelations-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksRelations.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_remove_watcher.dart b/lib/model/work_package_model_links_remove_watcher.dart new file mode 100644 index 0000000..96995ed --- /dev/null +++ b/lib/model/work_package_model_links_remove_watcher.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksRemoveWatcher { + /// Returns a new [WorkPackageModelLinksRemoveWatcher] instance. + WorkPackageModelLinksRemoveWatcher({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksRemoveWatcher && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksRemoveWatcher[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksRemoveWatcher] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksRemoveWatcher? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksRemoveWatcher[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksRemoveWatcher[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksRemoveWatcher( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksRemoveWatcher.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksRemoveWatcher.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksRemoveWatcher-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksRemoveWatcher.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_responsible.dart b/lib/model/work_package_model_links_responsible.dart new file mode 100644 index 0000000..bcc8131 --- /dev/null +++ b/lib/model/work_package_model_links_responsible.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksResponsible { + /// Returns a new [WorkPackageModelLinksResponsible] instance. + WorkPackageModelLinksResponsible({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksResponsible && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksResponsible[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksResponsible] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksResponsible? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksResponsible[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksResponsible[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksResponsible( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksResponsible.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksResponsible.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksResponsible-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksResponsible.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_revisions.dart b/lib/model/work_package_model_links_revisions.dart new file mode 100644 index 0000000..612814b --- /dev/null +++ b/lib/model/work_package_model_links_revisions.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksRevisions { + /// Returns a new [WorkPackageModelLinksRevisions] instance. + WorkPackageModelLinksRevisions({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksRevisions && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksRevisions[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksRevisions] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksRevisions? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksRevisions[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksRevisions[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksRevisions( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksRevisions.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksRevisions.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksRevisions-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksRevisions.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_schema.dart b/lib/model/work_package_model_links_schema.dart new file mode 100644 index 0000000..761f452 --- /dev/null +++ b/lib/model/work_package_model_links_schema.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksSchema { + /// Returns a new [WorkPackageModelLinksSchema] instance. + WorkPackageModelLinksSchema({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksSchema && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksSchema[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksSchema] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksSchema? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksSchema[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksSchema[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksSchema( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksSchema.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksSchema.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksSchema-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksSchema.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_self.dart b/lib/model/work_package_model_links_self.dart new file mode 100644 index 0000000..2f97279 --- /dev/null +++ b/lib/model/work_package_model_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksSelf { + /// Returns a new [WorkPackageModelLinksSelf] instance. + WorkPackageModelLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_status.dart b/lib/model/work_package_model_links_status.dart new file mode 100644 index 0000000..98901c6 --- /dev/null +++ b/lib/model/work_package_model_links_status.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksStatus { + /// Returns a new [WorkPackageModelLinksStatus] instance. + WorkPackageModelLinksStatus({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksStatus && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksStatus[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksStatus] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksStatus? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksStatus[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksStatus[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksStatus( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksStatus.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksStatus.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksStatus-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksStatus.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_time_entries.dart b/lib/model/work_package_model_links_time_entries.dart new file mode 100644 index 0000000..be31281 --- /dev/null +++ b/lib/model/work_package_model_links_time_entries.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksTimeEntries { + /// Returns a new [WorkPackageModelLinksTimeEntries] instance. + WorkPackageModelLinksTimeEntries({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksTimeEntries && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksTimeEntries[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksTimeEntries] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksTimeEntries? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksTimeEntries[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksTimeEntries[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksTimeEntries( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksTimeEntries.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksTimeEntries.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksTimeEntries-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksTimeEntries.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_type.dart b/lib/model/work_package_model_links_type.dart new file mode 100644 index 0000000..57f7c6c --- /dev/null +++ b/lib/model/work_package_model_links_type.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksType { + /// Returns a new [WorkPackageModelLinksType] instance. + WorkPackageModelLinksType({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksType && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksType[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksType] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksType? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksType[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksType[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksType( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksType.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksType.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksType-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksType.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_unwatch.dart b/lib/model/work_package_model_links_unwatch.dart new file mode 100644 index 0000000..feafc2c --- /dev/null +++ b/lib/model/work_package_model_links_unwatch.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksUnwatch { + /// Returns a new [WorkPackageModelLinksUnwatch] instance. + WorkPackageModelLinksUnwatch({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksUnwatch && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksUnwatch[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksUnwatch] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksUnwatch? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksUnwatch[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksUnwatch[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksUnwatch( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksUnwatch.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksUnwatch.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksUnwatch-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksUnwatch.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_update.dart b/lib/model/work_package_model_links_update.dart new file mode 100644 index 0000000..a8ece7b --- /dev/null +++ b/lib/model/work_package_model_links_update.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksUpdate { + /// Returns a new [WorkPackageModelLinksUpdate] instance. + WorkPackageModelLinksUpdate({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksUpdate && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksUpdate[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksUpdate] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksUpdate? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksUpdate[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksUpdate[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksUpdate( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksUpdate.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksUpdate.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksUpdate-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksUpdate.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_update_immediately.dart b/lib/model/work_package_model_links_update_immediately.dart new file mode 100644 index 0000000..670f6a3 --- /dev/null +++ b/lib/model/work_package_model_links_update_immediately.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksUpdateImmediately { + /// Returns a new [WorkPackageModelLinksUpdateImmediately] instance. + WorkPackageModelLinksUpdateImmediately({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksUpdateImmediately && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksUpdateImmediately[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksUpdateImmediately] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksUpdateImmediately? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksUpdateImmediately[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksUpdateImmediately[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksUpdateImmediately( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksUpdateImmediately.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksUpdateImmediately.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksUpdateImmediately-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksUpdateImmediately.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_version.dart b/lib/model/work_package_model_links_version.dart new file mode 100644 index 0000000..e530f83 --- /dev/null +++ b/lib/model/work_package_model_links_version.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksVersion { + /// Returns a new [WorkPackageModelLinksVersion] instance. + WorkPackageModelLinksVersion({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksVersion && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksVersion[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksVersion] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksVersion? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksVersion[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksVersion[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksVersion( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksVersion.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksVersion.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksVersion-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksVersion.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_watch.dart b/lib/model/work_package_model_links_watch.dart new file mode 100644 index 0000000..b25ef1d --- /dev/null +++ b/lib/model/work_package_model_links_watch.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksWatch { + /// Returns a new [WorkPackageModelLinksWatch] instance. + WorkPackageModelLinksWatch({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksWatch && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksWatch[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksWatch] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksWatch? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksWatch[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksWatch[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksWatch( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksWatch.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksWatch.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksWatch-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksWatch.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_model_links_watchers.dart b/lib/model/work_package_model_links_watchers.dart new file mode 100644 index 0000000..0f93c26 --- /dev/null +++ b/lib/model/work_package_model_links_watchers.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackageModelLinksWatchers { + /// Returns a new [WorkPackageModelLinksWatchers] instance. + WorkPackageModelLinksWatchers({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackageModelLinksWatchers && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackageModelLinksWatchers[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackageModelLinksWatchers] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackageModelLinksWatchers? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackageModelLinksWatchers[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackageModelLinksWatchers[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackageModelLinksWatchers( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackageModelLinksWatchers.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackageModelLinksWatchers.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackageModelLinksWatchers-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackageModelLinksWatchers.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/lib/model/work_package_patch_model.dart b/lib/model/work_package_patch_model.dart new file mode 100644 index 0000000..a43f0f3 --- /dev/null +++ b/lib/model/work_package_patch_model.dart @@ -0,0 +1,282 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackagePatchModel { + /// Returns a new [WorkPackagePatchModel] instance. + WorkPackagePatchModel({ + required this.lockVersion, + this.subject, + this.description, + this.scheduleManually, + this.startDate, + this.dueDate, + this.date, + this.estimatedTime, + this.ignoreNonWorkingDays, + this.spentTime, + this.percentageDone, + this.createdAt, + this.updatedAt, + this.links, + }); + + /// The version of the item as used for optimistic locking + Object? lockVersion; + + /// Work package subject + Object? subject; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelDescription? description; + + /// If false (default) schedule automatically. + Object? scheduleManually; + + /// Scheduled beginning of a work package + Object? startDate; + + /// Scheduled end of a work package + Object? dueDate; + + /// Date on which a milestone is achieved + Object? date; + + /// Time a work package likely needs to be completed excluding its descendants + Object? estimatedTime; + + /// **(NOT IMPLEMENTED)** When scheduling, whether or not to ignore the non working days being defined. A work package with the flag set to true will be allowed to be scheduled to a non working day. + Object? ignoreNonWorkingDays; + + /// The time booked for this work package by users working on it # Conditions **Permission** view time entries + Object? spentTime; + + /// Amount of total completion for a work package + /// + /// Maximum value: 100 + Object? percentageDone; + + /// Time of creation + Object? createdAt; + + /// Time of the most recent change to the work package + Object? updatedAt; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackagePatchModelLinks? links; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackagePatchModel && + other.lockVersion == lockVersion && + other.subject == subject && + other.description == description && + other.scheduleManually == scheduleManually && + other.startDate == startDate && + other.dueDate == dueDate && + other.date == date && + other.estimatedTime == estimatedTime && + other.ignoreNonWorkingDays == ignoreNonWorkingDays && + other.spentTime == spentTime && + other.percentageDone == percentageDone && + other.createdAt == createdAt && + other.updatedAt == updatedAt && + other.links == links; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (lockVersion == null ? 0 : lockVersion!.hashCode) + + (subject == null ? 0 : subject!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (scheduleManually == null ? 0 : scheduleManually!.hashCode) + + (startDate == null ? 0 : startDate!.hashCode) + + (dueDate == null ? 0 : dueDate!.hashCode) + + (date == null ? 0 : date!.hashCode) + + (estimatedTime == null ? 0 : estimatedTime!.hashCode) + + (ignoreNonWorkingDays == null ? 0 : ignoreNonWorkingDays!.hashCode) + + (spentTime == null ? 0 : spentTime!.hashCode) + + (percentageDone == null ? 0 : percentageDone!.hashCode) + + (createdAt == null ? 0 : createdAt!.hashCode) + + (updatedAt == null ? 0 : updatedAt!.hashCode) + + (links == null ? 0 : links!.hashCode); + + @override + String toString() => 'WorkPackagePatchModel[lockVersion=$lockVersion, subject=$subject, description=$description, scheduleManually=$scheduleManually, startDate=$startDate, dueDate=$dueDate, date=$date, estimatedTime=$estimatedTime, ignoreNonWorkingDays=$ignoreNonWorkingDays, spentTime=$spentTime, percentageDone=$percentageDone, createdAt=$createdAt, updatedAt=$updatedAt, links=$links]'; + + Map toJson() { + final json = {}; + if (this.lockVersion != null) { + json[r'lockVersion'] = this.lockVersion; + } else { + json[r'lockVersion'] = null; + } + if (this.subject != null) { + json[r'subject'] = this.subject; + } else { + json[r'subject'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.scheduleManually != null) { + json[r'scheduleManually'] = this.scheduleManually; + } else { + json[r'scheduleManually'] = null; + } + if (this.startDate != null) { + json[r'startDate'] = this.startDate; + } else { + json[r'startDate'] = null; + } + if (this.dueDate != null) { + json[r'dueDate'] = this.dueDate; + } else { + json[r'dueDate'] = null; + } + if (this.date != null) { + json[r'date'] = this.date; + } else { + json[r'date'] = null; + } + if (this.estimatedTime != null) { + json[r'estimatedTime'] = this.estimatedTime; + } else { + json[r'estimatedTime'] = null; + } + if (this.ignoreNonWorkingDays != null) { + json[r'ignoreNonWorkingDays'] = this.ignoreNonWorkingDays; + } else { + json[r'ignoreNonWorkingDays'] = null; + } + if (this.spentTime != null) { + json[r'spentTime'] = this.spentTime; + } else { + json[r'spentTime'] = null; + } + if (this.percentageDone != null) { + json[r'percentageDone'] = this.percentageDone; + } else { + json[r'percentageDone'] = null; + } + if (this.createdAt != null) { + json[r'createdAt'] = this.createdAt; + } else { + json[r'createdAt'] = null; + } + if (this.updatedAt != null) { + json[r'updatedAt'] = this.updatedAt; + } else { + json[r'updatedAt'] = null; + } + if (this.links != null) { + json[r'_links'] = this.links; + } else { + json[r'_links'] = null; + } + return json; + } + + /// Returns a new [WorkPackagePatchModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackagePatchModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackagePatchModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackagePatchModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackagePatchModel( + lockVersion: mapValueOfType(json, r'lockVersion'), + subject: mapValueOfType(json, r'subject'), + description: WorkPackageModelDescription.fromJson(json[r'description']), + scheduleManually: mapValueOfType(json, r'scheduleManually'), + startDate: mapValueOfType(json, r'startDate'), + dueDate: mapValueOfType(json, r'dueDate'), + date: mapValueOfType(json, r'date'), + estimatedTime: mapValueOfType(json, r'estimatedTime'), + ignoreNonWorkingDays: mapValueOfType(json, r'ignoreNonWorkingDays'), + spentTime: mapValueOfType(json, r'spentTime'), + percentageDone: mapValueOfType(json, r'percentageDone'), + createdAt: mapValueOfType(json, r'createdAt'), + updatedAt: mapValueOfType(json, r'updatedAt'), + links: WorkPackagePatchModelLinks.fromJson(json[r'_links']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackagePatchModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackagePatchModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackagePatchModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackagePatchModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'lockVersion', + }; +} + diff --git a/lib/model/work_package_patch_model_links.dart b/lib/model/work_package_patch_model_links.dart new file mode 100644 index 0000000..8f00962 --- /dev/null +++ b/lib/model/work_package_patch_model_links.dart @@ -0,0 +1,271 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackagePatchModelLinks { + /// Returns a new [WorkPackagePatchModelLinks] instance. + WorkPackagePatchModelLinks({ + this.assignee, + this.budget, + this.category, + this.parent, + this.priority, + this.project, + this.responsible, + this.status, + this.type, + this.version, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksAssignee? assignee; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksBudget? budget; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksCategory? category; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksParent? parent; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksPriority? priority; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksProject? project; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksResponsible? responsible; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksStatus? status; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksType? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + WorkPackageModelLinksVersion? version; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackagePatchModelLinks && + other.assignee == assignee && + other.budget == budget && + other.category == category && + other.parent == parent && + other.priority == priority && + other.project == project && + other.responsible == responsible && + other.status == status && + other.type == type && + other.version == version; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (assignee == null ? 0 : assignee!.hashCode) + + (budget == null ? 0 : budget!.hashCode) + + (category == null ? 0 : category!.hashCode) + + (parent == null ? 0 : parent!.hashCode) + + (priority == null ? 0 : priority!.hashCode) + + (project == null ? 0 : project!.hashCode) + + (responsible == null ? 0 : responsible!.hashCode) + + (status == null ? 0 : status!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (version == null ? 0 : version!.hashCode); + + @override + String toString() => 'WorkPackagePatchModelLinks[assignee=$assignee, budget=$budget, category=$category, parent=$parent, priority=$priority, project=$project, responsible=$responsible, status=$status, type=$type, version=$version]'; + + Map toJson() { + final json = {}; + if (this.assignee != null) { + json[r'assignee'] = this.assignee; + } else { + json[r'assignee'] = null; + } + if (this.budget != null) { + json[r'budget'] = this.budget; + } else { + json[r'budget'] = null; + } + if (this.category != null) { + json[r'category'] = this.category; + } else { + json[r'category'] = null; + } + if (this.parent != null) { + json[r'parent'] = this.parent; + } else { + json[r'parent'] = null; + } + if (this.priority != null) { + json[r'priority'] = this.priority; + } else { + json[r'priority'] = null; + } + if (this.project != null) { + json[r'project'] = this.project; + } else { + json[r'project'] = null; + } + if (this.responsible != null) { + json[r'responsible'] = this.responsible; + } else { + json[r'responsible'] = null; + } + if (this.status != null) { + json[r'status'] = this.status; + } else { + json[r'status'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.version != null) { + json[r'version'] = this.version; + } else { + json[r'version'] = null; + } + return json; + } + + /// Returns a new [WorkPackagePatchModelLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackagePatchModelLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackagePatchModelLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackagePatchModelLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackagePatchModelLinks( + assignee: WorkPackageModelLinksAssignee.fromJson(json[r'assignee']), + budget: WorkPackageModelLinksBudget.fromJson(json[r'budget']), + category: WorkPackageModelLinksCategory.fromJson(json[r'category']), + parent: WorkPackageModelLinksParent.fromJson(json[r'parent']), + priority: WorkPackageModelLinksPriority.fromJson(json[r'priority']), + project: WorkPackageModelLinksProject.fromJson(json[r'project']), + responsible: WorkPackageModelLinksResponsible.fromJson(json[r'responsible']), + status: WorkPackageModelLinksStatus.fromJson(json[r'status']), + type: WorkPackageModelLinksType.fromJson(json[r'type']), + version: WorkPackageModelLinksVersion.fromJson(json[r'version']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackagePatchModelLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackagePatchModelLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackagePatchModelLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackagePatchModelLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/lib/model/work_packages_model.dart b/lib/model/work_packages_model.dart new file mode 100644 index 0000000..297287a --- /dev/null +++ b/lib/model/work_packages_model.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackagesModel { + /// Returns a new [WorkPackagesModel] instance. + WorkPackagesModel({ + required this.type, + required this.total, + required this.count, + required this.links, + required this.embedded, + }); + + WorkPackagesModelTypeEnum type; + + /// The total amount of elements available in the collection. + /// + /// Minimum value: 0 + int total; + + /// Actual amount of elements in this response. + /// + /// Minimum value: 0 + int count; + + WorkPackagesModelAllOfLinks links; + + WorkPackagesModelAllOfEmbedded embedded; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackagesModel && + other.type == type && + other.total == total && + other.count == count && + other.links == links && + other.embedded == embedded; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type.hashCode) + + (total.hashCode) + + (count.hashCode) + + (links.hashCode) + + (embedded.hashCode); + + @override + String toString() => 'WorkPackagesModel[type=$type, total=$total, count=$count, links=$links, embedded=$embedded]'; + + Map toJson() { + final json = {}; + json[r'_type'] = this.type; + json[r'total'] = this.total; + json[r'count'] = this.count; + json[r'_links'] = this.links; + json[r'_embedded'] = this.embedded; + return json; + } + + /// Returns a new [WorkPackagesModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackagesModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackagesModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackagesModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackagesModel( + type: WorkPackagesModelTypeEnum.fromJson(json[r'_type'])!, + total: mapValueOfType(json, r'total')!, + count: mapValueOfType(json, r'count')!, + links: WorkPackagesModelAllOfLinks.fromJson(json[r'_links'])!, + embedded: WorkPackagesModelAllOfEmbedded.fromJson(json[r'_embedded'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackagesModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackagesModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackagesModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackagesModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + '_type', + 'total', + 'count', + '_links', + '_embedded', + }; +} + + +class WorkPackagesModelTypeEnum { + /// Instantiate a new enum with the provided [value]. + const WorkPackagesModelTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const collection = WorkPackagesModelTypeEnum._(r'Collection'); + + /// List of all possible values in this [enum][WorkPackagesModelTypeEnum]. + static const values = [ + collection, + ]; + + static WorkPackagesModelTypeEnum? fromJson(dynamic value) => WorkPackagesModelTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackagesModelTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [WorkPackagesModelTypeEnum] to String, +/// and [decode] dynamic data back to [WorkPackagesModelTypeEnum]. +class WorkPackagesModelTypeEnumTypeTransformer { + factory WorkPackagesModelTypeEnumTypeTransformer() => _instance ??= const WorkPackagesModelTypeEnumTypeTransformer._(); + + const WorkPackagesModelTypeEnumTypeTransformer._(); + + String encode(WorkPackagesModelTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a WorkPackagesModelTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + WorkPackagesModelTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'Collection': return WorkPackagesModelTypeEnum.collection; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [WorkPackagesModelTypeEnumTypeTransformer] instance. + static WorkPackagesModelTypeEnumTypeTransformer? _instance; +} + + diff --git a/lib/model/work_packages_model_all_of_embedded.dart b/lib/model/work_packages_model_all_of_embedded.dart new file mode 100644 index 0000000..aaa3466 --- /dev/null +++ b/lib/model/work_packages_model_all_of_embedded.dart @@ -0,0 +1,113 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackagesModelAllOfEmbedded { + /// Returns a new [WorkPackagesModelAllOfEmbedded] instance. + WorkPackagesModelAllOfEmbedded({ + required this.elements, + }); + + Object? elements; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackagesModelAllOfEmbedded && + other.elements == elements; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (elements == null ? 0 : elements!.hashCode); + + @override + String toString() => 'WorkPackagesModelAllOfEmbedded[elements=$elements]'; + + Map toJson() { + final json = {}; + if (this.elements != null) { + json[r'elements'] = this.elements; + } else { + json[r'elements'] = null; + } + return json; + } + + /// Returns a new [WorkPackagesModelAllOfEmbedded] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackagesModelAllOfEmbedded? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackagesModelAllOfEmbedded[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackagesModelAllOfEmbedded[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackagesModelAllOfEmbedded( + elements: mapValueOfType(json, r'elements'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackagesModelAllOfEmbedded.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackagesModelAllOfEmbedded.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackagesModelAllOfEmbedded-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackagesModelAllOfEmbedded.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'elements', + }; +} + diff --git a/lib/model/work_packages_model_all_of_links.dart b/lib/model/work_packages_model_all_of_links.dart new file mode 100644 index 0000000..4e16410 --- /dev/null +++ b/lib/model/work_packages_model_all_of_links.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackagesModelAllOfLinks { + /// Returns a new [WorkPackagesModelAllOfLinks] instance. + WorkPackagesModelAllOfLinks({ + required this.self, + }); + + WorkPackagesModelAllOfLinksSelf self; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackagesModelAllOfLinks && + other.self == self; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (self.hashCode); + + @override + String toString() => 'WorkPackagesModelAllOfLinks[self=$self]'; + + Map toJson() { + final json = {}; + json[r'self'] = this.self; + return json; + } + + /// Returns a new [WorkPackagesModelAllOfLinks] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackagesModelAllOfLinks? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackagesModelAllOfLinks[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackagesModelAllOfLinks[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackagesModelAllOfLinks( + self: WorkPackagesModelAllOfLinksSelf.fromJson(json[r'self'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackagesModelAllOfLinks.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackagesModelAllOfLinks.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackagesModelAllOfLinks-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackagesModelAllOfLinks.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'self', + }; +} + diff --git a/lib/model/work_packages_model_all_of_links_self.dart b/lib/model/work_packages_model_all_of_links_self.dart new file mode 100644 index 0000000..74fad99 --- /dev/null +++ b/lib/model/work_packages_model_all_of_links_self.dart @@ -0,0 +1,184 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class WorkPackagesModelAllOfLinksSelf { + /// Returns a new [WorkPackagesModelAllOfLinksSelf] instance. + WorkPackagesModelAllOfLinksSelf({ + required this.href, + this.title, + this.templated = false, + this.method = 'GET', + this.payload, + this.identifier, + }); + + /// URL to the referenced resource (might be relative) + String? href; + + /// Representative label for the resource + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? title; + + /// If true the href contains parts that need to be replaced by the client + bool templated; + + /// The HTTP verb to use when requesting the resource + String method; + + /// The payload to send in the request to achieve the desired result + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Object? payload; + + /// An optional unique identifier to the link object + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? identifier; + + @override + bool operator ==(Object other) => identical(this, other) || other is WorkPackagesModelAllOfLinksSelf && + other.href == href && + other.title == title && + other.templated == templated && + other.method == method && + other.payload == payload && + other.identifier == identifier; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (href == null ? 0 : href!.hashCode) + + (title == null ? 0 : title!.hashCode) + + (templated.hashCode) + + (method.hashCode) + + (payload == null ? 0 : payload!.hashCode) + + (identifier == null ? 0 : identifier!.hashCode); + + @override + String toString() => 'WorkPackagesModelAllOfLinksSelf[href=$href, title=$title, templated=$templated, method=$method, payload=$payload, identifier=$identifier]'; + + Map toJson() { + final json = {}; + if (this.href != null) { + json[r'href'] = this.href; + } else { + json[r'href'] = null; + } + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + json[r'templated'] = this.templated; + json[r'method'] = this.method; + if (this.payload != null) { + json[r'payload'] = this.payload; + } else { + json[r'payload'] = null; + } + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; + } + return json; + } + + /// Returns a new [WorkPackagesModelAllOfLinksSelf] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WorkPackagesModelAllOfLinksSelf? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WorkPackagesModelAllOfLinksSelf[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WorkPackagesModelAllOfLinksSelf[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WorkPackagesModelAllOfLinksSelf( + href: mapValueOfType(json, r'href'), + title: mapValueOfType(json, r'title'), + templated: mapValueOfType(json, r'templated') ?? false, + method: mapValueOfType(json, r'method') ?? 'GET', + payload: mapValueOfType(json, r'payload'), + identifier: mapValueOfType(json, r'identifier'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WorkPackagesModelAllOfLinksSelf.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WorkPackagesModelAllOfLinksSelf.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WorkPackagesModelAllOfLinksSelf-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WorkPackagesModelAllOfLinksSelf.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'href', + }; +} + diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..e31226b --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,405 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "4826f97faae3af9761f26c52e56b2aa5ffd18d2c1721d984ad85137721c25f43" + url: "https://pub.dev" + source: hosted + version: "31.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "7337610c3f9cd13e6b7c6bb0f410644091cf63c9a1436e73352a70f3286abb03" + url: "https://pub.dev" + source: hosted + version: "2.8.0" + args: + dependency: transitive + description: + name: args + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" + source: hosted + version: "2.4.2" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c" + url: "https://pub.dev" + source: hosted + version: "0.3.5" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: "direct main" + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + coverage: + dependency: transitive + description: + name: coverage + sha256: ad538fa2e8f6b828d54c04a438af816ce814de404690136d3b9dfb3a436cd01c + url: "https://pub.dev" + source: hosted + version: "1.0.3" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: "4f4a162323c86ffc1245765cfe138872b8f069deb42f7dbb36115fa27f31469b" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + http: + dependency: "direct main" + description: + name: http + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + url: "https://pub.dev" + source: hosted + version: "0.13.6" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + intl: + dependency: "direct main" + description: + name: intl + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + url: "https://pub.dev" + source: hosted + version: "0.18.1" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: "2e2c34e631f93410daa3ee3410250eadc77ac6befc02a040eda8a123f34e6f5a" + url: "https://pub.dev" + source: hosted + version: "0.12.11" + meta: + dependency: "direct main" + description: + name: meta + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.dev" + source: hosted + version: "1.11.0" + mime: + dependency: transitive + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" + source: hosted + version: "1.0.4" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + path: + dependency: transitive + description: + name: path + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" + source: hosted + version: "1.8.3" + pedantic: + dependency: transitive + description: + name: pedantic + sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + url: "https://pub.dev" + source: hosted + version: "1.1.2" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" + source: hosted + version: "0.10.12" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test: + dependency: "direct dev" + description: + name: test + sha256: d8df85e0659006d6dd09dd5d1d4bf81848d34fbe5b1fdd2b2a90e690aaa8195e + url: "https://pub.dev" + source: hosted + version: "1.17.12" + test_api: + dependency: transitive + description: + name: test_api + sha256: "3c3c3eb64242eec8aeb7a7e530cd541737a84bb01fc08b363b429aaa4a91060d" + url: "https://pub.dev" + source: hosted + version: "0.4.3" + test_core: + dependency: transitive + description: + name: test_core + sha256: f269e59fdd3abd14d6d92d3da9a03f69e931e9dd9140d6f06f94fc2204584741 + url: "https://pub.dev" + source: hosted + version: "0.4.2" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "35ef1bbae978d7158e09c98dcdfe8673b58a30eb53e82833cc027e0aab2d5213" + url: "https://pub.dev" + source: hosted + version: "7.5.0" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" + source: hosted + version: "2.4.0" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.0.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..41ab088 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,17 @@ +# +# AUTO-GENERATED FILE, DO NOT MODIFY! +# + +name: 'openapi' +version: '1.0.0' +description: 'OpenAPI API client' +homepage: 'homepage' +environment: + sdk: '>=2.12.0 <3.0.0' +dependencies: + collection: '^1.17.0' + http: '>=0.13.0 <0.14.0' + intl: '^0.18.0' + meta: '^1.1.8' +dev_dependencies: + test: '>=1.16.0 <1.18.0' diff --git a/spec.yml b/spec.yml new file mode 100644 index 0000000..88785e6 --- /dev/null +++ b/spec.yml @@ -0,0 +1,28463 @@ +--- +openapi: 3.1.0 +info: + description: |- + You're looking at the current **stable** documentation of the OpenProject APIv3. If you're interested in the current + development version, please go to [github.com/opf](https://github.com/opf/openproject/tree/dev/docs/api/apiv3). + + ## Introduction + + The documentation for the APIv3 is written according to the [OpenAPI 3.0 Specification](https://swagger.io/specification/). + You can either view the static version of this documentation on the [website](https://www.openproject.org/docs/api/introduction/) + or the interactive version, rendered with [OpenAPI Explorer](https://github.com/Rhosys/openapi-explorer/blob/main/README.md), + in your OpenProject installation under `/api/docs`. + In the latter you can try out the various API endpoints directly interacting with our OpenProject data. + Moreover you can access the specification source itself under `/api/v3/spec.json` and `/api/v3/spec.yml` + (e.g. [here](https://community.openproject.org/api/v3/spec.yml)). + + The APIv3 is a hypermedia REST API, a shorthand for "Hypermedia As The Engine Of Application State" (HATEOAS). + This means that each endpoint of this API will have links to other resources or actions defined in the resulting body. + + These related resources and actions for any given resource will be context sensitive. For example, only actions that the + authenticated user can take are being rendered. This can be used to dynamically identify actions that the user might take for any + given response. + + As an example, if you fetch a work package through the [Work Package endpoint](https://www.openproject.org/docs/api/endpoints/work-packages/), the `update` link will only + be present when the user you authenticated has been granted a permission to update the work package in the assigned project. + + ## HAL+JSON + + HAL is a simple format that gives a consistent and easy way to hyperlink between resources in your API. + Read more in the following specification: [https://tools.ietf.org/html/draft-kelly-json-hal-08](https://tools.ietf.org/html/draft-kelly-json-hal-08) + + **OpenProject API implementation of HAL+JSON format** enriches JSON and introduces a few meta properties: + + - `_type` - specifies the type of the resource (e.g.: WorkPackage, Project) + - `_links` - contains all related resource and action links available for the resource + - `_embedded` - contains all embedded objects + + HAL does not guarantee that embedded resources are embedded in their full representation, they might as well be + partially represented (e.g. some properties can be left out). + However in this API you have the guarantee that whenever a resource is **embedded**, it is embedded in its **full representation**. + + ## API response structure + + All API responses contain a single HAL+JSON object, even collections of objects are technically represented by + a single HAL+JSON object that itself contains its members. More details on collections can be found + in the [Collections Section](https://www.openproject.org/docs/api/collections/). + + ## Authentication + + The API supports the following authentication schemes: OAuth2, session based authentication, and basic auth. + + Depending on the settings of the OpenProject instance many resources can be accessed without being authenticated. + In case the instance requires authentication on all requests the client will receive an **HTTP 401** status code + in response to any request. + + Otherwise unauthenticated clients have all the permissions of the anonymous user. + + ### Session-based Authentication + + This means you have to login to OpenProject via the Web-Interface to be authenticated in the API. + This method is well-suited for clients acting within the browser, like the Angular-Client built into OpenProject. + + In this case, you always need to pass the HTTP header `X-Requested-With "XMLHttpRequest"` for authentication. + + ### API Key through Basic Auth + + Users can authenticate towards the API v3 using basic auth with the user name `apikey` (NOT your login) and the API key as the password. + Users can find their API key on their account page. + + Example: + + ```shell + API_KEY=2519132cdf62dcf5a66fd96394672079f9e9cad1 + curl -u apikey:$API_KEY https://community.openproject.com/api/v3/users/42 + ``` + + ### OAuth2.0 authentication + + OpenProject allows authentication and authorization with OAuth2 with *Authorization code flow*, as well as *Client credentials* operation modes. + + To get started, you first need to register an application in the OpenProject OAuth administration section of your installation. + This will save an entry for your application with a client unique identifier (`client_id`) and an accompanying secret key (`client_secret`). + + You can then use one the following guides to perform the supported OAuth 2.0 flows: + + - [Authorization code flow](https://oauth.net/2/grant-types/authorization-code) + + - [Authorization code flow with PKCE](https://doorkeeper.gitbook.io/guides/ruby-on-rails/pkce-flow), recommended for clients unable to keep the client_secret confidential. + + - [Client credentials](https://oauth.net/2/grant-types/client-credentials/) - Requires an application to be bound to an impersonating user for non-public access + + ### Why not username and password? + + The simplest way to do basic auth would be to use a user's username and password naturally. + However, OpenProject already has supported API keys in the past for the API v2, though not through basic auth. + + Using **username and password** directly would have some advantages: + + * It is intuitive for the user who then just has to provide those just as they would when logging into OpenProject. + + * No extra logic for token management necessary. + + On the other hand using **API keys** has some advantages too, which is why we went for that: + + * If compromised while saved on an insecure client the user only has to regenerate the API key instead of changing their password, too. + + * They are naturally long and random which makes them invulnerable to dictionary attacks and harder to crack in general. + + Most importantly users may not actually have a password to begin with. Specifically when they have registered + through an OpenID Connect provider. + + ## Cross-Origin Resource Sharing (CORS) + + By default, the OpenProject API is _not_ responding with any CORS headers. + If you want to allow cross-domain AJAX calls against your OpenProject instance, you need to enable CORS headers being returned. + + Please see [our API settings documentation](https://www.openproject.org/docs/system-admin-guide/api-and-webhooks/) on + how to selectively enable CORS. + + ## Allowed HTTP methods + + - `GET` - Get a single resource or collection of resources + + - `POST` - Create a new resource or perform + + - `PATCH` - Update a resource + + - `DELETE` - Delete a resource + + ## Compression + + Responses are compressed if requested by the client. Currently [gzip](https://www.gzip.org/) and [deflate](https://tools.ietf.org/html/rfc1951) + are supported. The client signals the desired compression by setting the [`Accept-Encoding` header](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3). + If no `Accept-Encoding` header is send, `Accept-Encoding: identity` is assumed which will result in the API responding uncompressed. + title: OpenProject API V3 (Stable) + version: "3" +servers: + - description: This server + url: https://community.openproject.org/ +paths: + "/api/v3": + get: + summary: View root + operationId: view_root + description: + Returns the root resource, containing basic information about the + server instance and a collection of useful links. + tags: + - Root + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/RootModel" + "/api/v3/actions": + get: + parameters: + - description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + Currently supported filters are: + + + id: Returns only the action having the id or all actions except those having the id(s). + example: + '[{ "id": { "operator": "=", "values": ["memberships/create"] }" + }]' + in: query + name: filters + required: false + schema: + type: string + - description: |- + JSON specifying sort criteria. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + + + *No sort supported yet* + example: '[["id", "asc"]]' + in: query + name: sortBy + required: false + schema: + default: '[["id", "asc"]]' + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + self: + href: "/api/v3/actions/work_packages/create" + title: Add work package + _type: Action + description: + Creating a work package within a project including + the uploading of attachments. Some attributes might not + be selected, e.g version which requires a second permission + id: work_packages/create + modules: + - work_packages + name: Add work package + - _links: + self: + href: "/api/v3/actions/work_packages/assign_versions" + title: Assigning version + _type: Action + description: + Assigning a work package to a version when creating/updating + a work package. Only principals having this permission can + assign a value to the version property of the work package + resource. + id: work_packages/assign_versions + modules: + - work_packages + - versions + name: Assign version + _links: + self: + href: "/api/v3/actions" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/List_actionsModel" + description: OK + headers: {} + tags: + - Actions & Capabilities + description: |- + Returns a collection of actions. The client can choose to filter the actions similar to how work packages are filtered. + In addition to the provided filters, the server will reduce the result set to only contain actions, for which the requesting client + has sufficient permissions. + operationId: List_actions + summary: List actions + "/api/v3/actions/{id}": + get: + parameters: + - description: action id which is the name of the action + example: work_packages/create + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/actions/work_packages/create" + title: Add work package + _type: Action + description: + Creating a work package within a project including + the uploading of attachments. Some attributes might not be selected, + e.g version which requires a second permission + id: work_packages/create + modules: + - work_packages + name: Add work package + schema: + "$ref": "#/components/schemas/View_actionModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: Returned if the action does not exist. + headers: {} + tags: + - Actions & Capabilities + description: Returns an individual action. + operationId: View_action + summary: View action + "/api/v3/activities/{id}": + get: + parameters: + - description: Activity id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/activity/1" + title: Priority changed from High to Low + user: + href: "/api/v3/users/1" + title: John Sheppard - admin + workPackage: + href: "/api/v3/work_packages/1" + title: + quis numquam qui voluptatum quia praesentium blanditiis + nisi + _type: Activity::Comment + comment: + format: markdown + html: "

Lorem ipsum dolor sit amet.

" + raw: Lorem ipsum dolor sit amet. + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T09:14:02Z" + details: + - format: markdown + html: "

Lorem ipsum dolor sit amet.

" + raw: Lorem ipsum dolor sit amet. + id: 1 + version: 31 + schema: + "$ref": "#/components/schemas/ActivityModel" + description: OK + headers: {} + tags: + - Activities + description: "" + operationId: View_activity + summary: View activity + patch: + parameters: + - description: Activity id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/activity/1" + title: Priority changed from High to Low + user: + href: "/api/v3/users/1" + title: John Sheppard - admin + workPackage: + href: "/api/v3/work_packages/1" + title: + quis numquam qui voluptatum quia praesentium blanditiis + nisi + _type: Activity::Comment + comment: + format: markdown + html: "

Lorem ipsum dolor sit amet.

" + raw: Lorem ipsum dolor sit amet. + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T09:14:02Z" + details: + - format: markdown + html: "

Lorem ipsum dolor sit amet.

" + raw: Lorem ipsum dolor sit amet. + id: 1 + version: 31 + schema: + "$ref": "#/components/schemas/ActivityModel" + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: + You are not allowed to edit the comment of this journal + entry. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** edit journals + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyIsReadOnly + message: The ID of an activity can't be changed. + description: Returned if the client tries to modify a read-only property. + headers: {} + tags: + - Activities + description: + Updates an activity's comment and, on success, returns the updated + activity. + operationId: Update_activity + requestBody: + content: + application/json: + schema: + example: + comment: + raw: The updated comment + properties: + comment: + properties: + raw: + type: string + type: object + type: object + summary: Update activity + "/api/v3/attachments": + post: + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/AttachmentModel" + description: OK + "400": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody + message: The request could not be parsed as JSON. + description: |- + Returned if the client sends a not understandable request. Reasons include: + + * Omitting one of the required parts (metadata and file) + + * sending unparsable JSON in the metadata part + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to delete this attachment. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** At least one permission in any project: edit work package, add work package, edit messages, edit wiki pages (plugins might extend this list) + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: File is too large (maximum size is 5242880 Bytes). + description: |- + Returned if the client tries to send an invalid attachment. + Reasons are: + + * Omitting the file name (`fileName` property of metadata part) + + * Sending a file that is too large + tags: + - Attachments + description: |- + Clients can create attachments without a container first and attach them later on. + This is useful if the container does not exist at the time the attachment is uploaded. + After the upload, the client can then claim such containerless attachments for any resource eligible (e.g. WorkPackage) on subsequent requests. + The upload and the claiming *must* be done for the same user account. Attachments uploaded by another user cannot be claimed and + once claimed for a resource, they cannot be claimed by another. + + The upload request must be of type `multipart/form-data` with exactly two parts. + + The first part *must* be called `metadata`. Its content type is expected to be `application/json`, + the body *must* be a single JSON object, containing at least the `fileName` and optionally the attachments `description`. + + The second part *must* be called `file`, its content type *should* match the mime type of the file. + The body *must* be the raw content of the file. + Note that a `filename` *must* be indicated in the `Content-Disposition` of this part, although it will be ignored. + Instead the `fileName` inside the JSON of the metadata part will be used. + operationId: create_attachment + summary: Create Attachment + "/api/v3/attachments/{id}": + delete: + parameters: + - description: Attachment id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "204": + description: |- + Returned if the attachment was deleted successfully. + + Note that the response body is empty as of now. In future versions of the API a body + *might* be returned along with an appropriate HTTP status. + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to delete this attachment. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** edit permission for the container of the attachment or being the author for attachments without container + + *Note that you will only receive this error, if you are at least allowed to see the attachment.* + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified attachment does not exist. + description: |- + Returned if the attachment does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view permission for the container of the attachment or being the author for attachments without container + + *Note: A client without sufficient permissions shall not be able to test for the existence of an attachment. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Attachments + description: Permanently deletes the specified attachment. + operationId: delete_attachment + summary: Delete attachment + get: + parameters: + - description: Attachment id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/AttachmentModel" + description: OK + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified attachment does not exist. + description: |- + Returned if the attachment does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view permission for the container of the attachment or being the author for attachments without container + + *Note: A client without sufficient permissions shall not be able to test for the existence of an attachment. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + tags: + - Attachments + description: "" + operationId: view_attachment + summary: View attachment + "/api/v3/budgets/{id}": + get: + parameters: + - description: Budget id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/budgets/1" + title: Q3 2015 + _type: Budget + id: 1 + subject: Q3 2015 + schema: + "$ref": "#/components/schemas/BudgetModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to see this budget. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view work packages **or** view budgets (on the budgets project) + headers: {} + tags: + - Budgets + description: "" + operationId: view_Budget + summary: view Budget + "/api/v3/capabilities": + get: + parameters: + - description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + + + action: Get all capabilities of a certain action + + + principal: Get all capabilities of a principal + + + context: Get all capabilities within a context. Note that for a project context the client needs to provide `p{id}`, e.g. `p5` and for the global context a `g` + example: '[{ "principal": { "operator": "=", "values": ["1"] }" }]' + in: query + name: filters + required: false + schema: + type: string + - description: |- + JSON specifying sort criteria. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + + + id: Sort by the capabilities id + example: '[["id", "asc"]]' + in: query + name: sortBy + required: false + schema: + default: '[["id", "asc"]]' + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + action: + href: "/api/v3/actions/work_packages/create" + title: Add work package + context: + href: "/api/v3/projects/123" + title: A project + principal: + href: "/api/v3/users/567" + title: Some user + self: + href: "/api/v3/capabilities/work_packages/create/p123-567" + _type: Capability + id: work_packages/create/p123-567 + - _links: + action: + href: "/api/v3/actions/work_packages/assignee" + context: + href: "/api/v3/projects/123" + title: A project + principal: + href: "/api/v3/users/567" + title: Some user + self: + href: "/api/v3/capabilities/work_packages/assignee/p123-567" + _type: Capability + id: work_packages/assignee/p123-567 + - _links: + action: + href: "/api/v3/actions/memberships/create" + context: + href: "/api/v3/projects/345" + title: A project + principal: + href: "/api/v3/users/821" + title: Some user + self: + href: "/api/v3/capabilities/memberships/create/p345-821" + title: Create members + _type: Capability + id: memberships/create/p345-821 + - _links: + context: + href: "/api/v3/capabilities/context/global" + title: Global + principal: + href: "/api/v3/users/567" + title: Some user + self: + href: "/api/v3/capabilities/users/delete/g-567" + title: Delete user + _type: Capability + id: users/delete/g-567 + _links: + changeSize: + href: "/api/v3/capabilities?pageSize={size}" + templated: true + jumpTo: + href: "/api/v3/capabilities?offset={offset}" + templated: true + self: + href: "/api/v3/capabilities" + _type: Collection + count: 4 + total: 4 + schema: + "$ref": "#/components/schemas/List_capabilitiesModel" + description: OK + headers: {} + tags: + - Actions & Capabilities + description: + Returns a collection of actions assigned to a principal in a context. + The client can choose to filter the actions similar to how work packages are + filtered. In addition to the provided filters, the server will reduce the + result set to only contain actions, for which the requesting client has sufficient + permissions + operationId: List_capabilities + summary: List capabilities + "/api/v3/capabilities/context/global": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/capabilities/context/global" + _type: CapabilityContext::Global + id: global + schema: + "$ref": "#/components/schemas/View_global_contextModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: Returned if the action does not exist. + headers: {} + tags: + - Actions & Capabilities + description: + Returns the global capability context. This context is necessary + to consistently link to a context even if the context is not a project. + operationId: View_global_context + summary: View global context + "/api/v3/capabilities/{id}": + get: + parameters: + - description: capability id + example: work_packages/create/p123-567 + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + action: + href: "/api/v3/actions/work_packages/create" + title: Add work package + context: + href: "/api/v3/projects/123" + title: A project + principal: + href: "/api/v3/users/567" + title: Some user + self: + href: "/api/v3/capabilities/work_packages/create/p123-567" + _type: Capability + id: work_packages/create/p123-567 + schema: + "$ref": "#/components/schemas/View_capabilitiesModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: Returned if the capability does not exist. + headers: {} + tags: + - Actions & Capabilities + description: "" + operationId: View_capabilities + summary: View capabilities + "/api/v3/categories/{id}": + get: + parameters: + - description: Category id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + defaultAssignee: + href: "/api/v3/users/42" + title: John Sheppard + project: + href: "/api/v3/projects/11" + title: Example project + self: + href: "/api/v3/categories/10" + title: Category with assignee + _type: Category + id: 10 + name: Foo + schema: + "$ref": "#/components/schemas/CategoryModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified category does not exist. + description: |- + Returned if the category does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view project (defining the category) + + *Note: A client without sufficient permissions shall not be able to test for the existence of + a category. That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + tags: + - Categories + description: "" + operationId: View_Category + summary: View Category + "/api/v3/configuration": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _type: Configuration + _links: + self: + href: "/api/v3/configuration" + userPreferences: + href: "/api/v3/my_preferences" + maximumAttachmentFileSize: 5242880 + hostName: example.com:8080 + perPageOptions: + - 1 + - 10 + - 100 + activeFeatureFlags: + - aFeatureFlag + - anotherFeatureFlag + schema: + "$ref": "#/components/schemas/ConfigurationModel" + description: OK + headers: {} + tags: + - Configuration + description: "" + operationId: View_configuration + summary: View configuration + "/api/v3/custom_actions/{id}": + get: + summary: Get a custom action + tags: + - Custom actions + description: Retrieves a custom action by id. + operationId: get_custom_action + parameters: + - name: id + description: The id of the custom action to fetch + in: path + required: true + schema: + type: integer + example: 42 + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/CustomActionModel" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** edit work packages in any project + "404": + description: Returned if the custom action does not exist. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + "/api/v3/custom_actions/{id}/execute": + post: + parameters: + - description: The id of the custom action to execute + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** edit work packages - Additional permissions might be required based on the custom action. + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: Returned if the custom action does not exist. + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "409": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:UpdateConflict + message: Couldn't update the resource because of conflicting modifications. + description: + Returned if the client provided an outdated lockVersion or + no lockVersion at all. + headers: {} + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _embedded: + details: + attribute: delay + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Delay must be a number greater than or equal to 0 + description: + Returned if the custom action was not executed successfully + e.g. when a constraint on a work package property was violated. + headers: {} + tags: + - Custom actions + description: |- + A POST to this end point executes the custom action on the work package provided in the payload. The altered work package will be returned. In order to avoid executing + the custom action unbeknown to a change that has already taken place, the client has to provide the work package's current lockVersion. + operationId: Execute_custom_action + requestBody: + content: + application/json: + schema: + example: + _links: + workPackage: + href: "/api/v3/work_packages/42" + lockVersion: "3" + properties: + _links: + properties: + workPackage: + properties: + href: + type: string + type: object + type: object + lockVersion: + type: string + type: object + summary: Execute custom action + "/api/v3/custom_options/{id}": + get: + parameters: + - description: The custom option's identifier + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/custom_options/1" + _type: CustomOption + value: Foo + schema: + "$ref": "#/components/schemas/CustomOptionModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the custom option does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package in any project the custom option's custom field is active in. + headers: {} + tags: + - Custom Options + description: "" + operationId: View_Custom_Option + summary: View Custom Option + "/api/v3/days/non_working": + get: + summary: Lists all non working days + operationId: list_non_working_days + tags: + - Work Schedule + description: |- + Lists all one-time non working days, such as holidays. + It does not lists the non working weekdays, such as each Saturday, Sunday. + For listing the weekends, the `/api/v3/days` endpoint should be used. + + All days from current year are returned by default. + parameters: + - name: filters + in: query + description: |- + JSON specifying filter conditions. + + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) + endpoint. Currently supported filters are: + + + date: the inclusive date interval to scope days to look up. When + unspecified, default is from the beginning to the end of current year. + + Example: `{ "date": { "operator": "<>d", "values": ["2022-05-02","2022-05-26"] } }` + would return days between May 5 and May 26 2022, inclusive. + example: + '[{ "date": { "operator": "<>d", "values": ["2022-05-02","2022-05-26"] + } }]' + required: false + schema: + type: string + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/NonWorkingDayCollectionModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + post: + summary: Creates a non-working day (NOT IMPLEMENTED) + operationId: create_non_working_day + tags: + - Work Schedule + description: |- + **(NOT IMPLEMENTED)** + Marks a day as being a non-working day. + + Note: creating a non-working day will not affect the start and finish dates + of work packages but will affect their duration. + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/NonWorkingDayModel" + example: + _type: NonWorkingDay + date: "2022-12-25" + name: Christmas + responses: + "201": + description: Non-working day created. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/NonWorkingDayModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + description: Returned if the client does not have sufficient permissions. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery + message: You are not authorized to access this resource. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "/api/v3/days/non_working/{date}": + get: + summary: View a non-working day + operationId: view_non_working_day + tags: + - Work Schedule + description: Returns the non-working day information for a given date. + parameters: + - name: date + in: path + required: true + description: The date of the non-working day to view in ISO 8601 format. + schema: + type: string + format: date + example: "2022-05-06" + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/NonWorkingDayModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "404": + description: Returned if the given date is not a non-working day. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + patch: + summary: Update a non-working day attributes (NOT IMPLEMENTED) + operationId: update_non_working_day + tags: + - Work Schedule + description: |- + **(NOT IMPLEMENTED)** + Update the non-working day information for a given date. + parameters: + - name: date + in: path + required: true + description: The date of the non-working day to view in ISO 8601 format. + schema: + type: string + format: date + example: "2022-05-06" + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/NonWorkingDayModel" + example: + _type: NonWorkingDay + date: "2022-05-01" + name: Labour day + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/NonWorkingDayModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "404": + description: Returned if the given date is not a non-working day. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + delete: + summary: Removes a non-working day (NOT IMPLEMENTED) + operationId: delete_non_working_day + tags: + - Work Schedule + description: |- + **(NOT IMPLEMENTED)** + Removes the non-working day at the given date. + + Note: deleting a non-working day will not affect the start and finish dates + of work packages but will affect their duration. + parameters: + - name: date + in: path + required: true + description: The date of the non-working day to view in ISO 8601 format. + schema: + type: string + format: date + example: "2022-05-06" + responses: + "204": + description: |- + No Content. + + The operation succeeded. + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "404": + description: Returned if the given date is not a non-working day. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "/api/v3/days/week": + get: + summary: Lists week days + operationId: list_week_days + tags: + - Work Schedule + description: Lists week days with work schedule information. + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/WeekDayCollectionModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + patch: + summary: Update week days (NOT IMPLEMENTED) + operationId: update_week_days + tags: + - Work Schedule + description: |- + **(NOT IMPLEMENTED)** + Update multiple week days with work schedule information. + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/WeekDayCollectionWriteModel" + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/WeekDayCollectionModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "404": + description: Returned if a week day resource can not be found. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery + message: The requested resource could not be found. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "/api/v3/days/week/{day}": + get: + summary: View a week day + operationId: view_week_day + tags: + - Work Schedule + description: View a week day and its attributes. + parameters: + - name: day + in: path + required: true + description: The week day from 1 to 7. 1 is Monday. 7 is Sunday. + schema: + type: integer + minimum: 1 + maximum: 7 + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/WeekDayModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "404": + description: Returned if the day is out of the 1-7 range. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery + message: The requested resource could not be found. + patch: + summary: Update a week day attributes (NOT IMPLEMENTED) + operationId: update_week_day + description: |- + **(NOT IMPLEMENTED)** + Makes a week day a working or non-working day. + + Note: changing a week day working attribute will not affect the start and + finish dates of work packages but will affect their duration attribute. + tags: + - Work Schedule + parameters: + - name: day + in: path + required: true + description: The week day from 1 to 7. 1 is Monday. 7 is Sunday. + schema: + type: integer + minimum: 1 + maximum: 7 + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/WeekDayWriteModel" + example: + _type: WeekDay + working: false + responses: + "200": + description: |- + Update succeeded. + + Response will include the week day with updated attributes. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/WeekDayModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + description: Returned if the client does not have sufficient permissions. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery + message: You are not authorized to access this resource. + "404": + description: Returned if the day is out of the 1-7 range. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery + message: The requested resource could not be found. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "/api/v3/days": + get: + summary: Lists days + operationId: list_days + tags: + - Work Schedule + description: |- + Lists days information for a given date interval. + + All days from the beginning of current month to the end of following month + are returned by default. + parameters: + - name: filters + in: query + description: |- + JSON specifying filter conditions. + + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) + endpoint. Currently supported filters are: + + + date: the inclusive date interval to scope days to look up. When + unspecified, default is from the beginning of current month to the end + of following month. + + Example: `{ "date": { "operator": "<>d", "values": ["2022-05-02","2022-05-26"] } }` + would return days between May 5 and May 26 2022, inclusive. + + + working: when `true`, returns only the working days. When `false`, + returns only the non-working days (weekend days and non-working days). + When unspecified, returns both working and non-working days. + + Example: `{ "working": { "operator": "=", "values": ["t"] } }` + would exclude non-working days from the response. + example: + '[{ "date": { "operator": "<>d", "values": ["2022-05-02","2022-05-26"] + } }, { "working": { "operator": "=", "values": ["f"] } }]' + required: false + schema: + type: string + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/DayCollectionModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "/api/v3/days/{date}": + get: + summary: View day + operationId: view_day + tags: + - Work Schedule + description: View the day information for a given date. + parameters: + - name: date + in: path + required: true + description: The date of the non-working day to view in ISO 8601 format. + schema: + type: string + format: date + example: "2022-05-06" + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/DayModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "/api/v3/documents": + get: + parameters: + - description: Page number inside the requested collection. + example: "25" + in: query + name: offset + required: false + schema: + default: 1 + type: integer + - description: Number of elements to display per page. + example: "25" + in: query + name: pageSize + required: false + schema: + type: integer + - description: |- + JSON specifying sort criteria. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + + + id: Sort by primary key + + + created_at: Sort by document creation datetime + example: '[["created_at", "asc"]]' + in: query + name: sortBy + required: false + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + addAttachment: + href: "/api/v3/documents/1/attachments" + method: post + attachments: + href: "/api/v3/documents/1/attachments" + project: + href: "/api/v3/projects/19" + title: Some project + self: + href: "/api/v3/documents/1" + title: Some document + _type: Document + createdAt: "2018-12-10T20:53:39Z" + description: + format: markdown + html: + "

Videlicet deserunt aequitas cognatus. Concedo + quia est quia pariatur vorago vallum. Calco autem atavus + accusamus conscendo cornu ulterius. Tam patria ago consectetur + ventito sustineo nihil caecus. Supra officiis eos velociter + somniculosus tonsor qui. Suffragium aduro arguo angustus + cogito quia tolero vulnus. Supplanto sortitus cresco apud + vestrum qui.

" + raw: + Videlicet deserunt aequitas cognatus. Concedo quia + est quia pariatur vorago vallum. Calco autem atavus accusamus + conscendo cornu ulterius. Tam patria ago consectetur ventito + sustineo nihil caecus. Supra officiis eos velociter somniculosus + tonsor qui. Suffragium aduro arguo angustus cogito quia + tolero vulnus. Supplanto sortitus cresco apud vestrum + qui. + id: 1 + title: Some other document + - _links: + addAttachment: + href: "/api/v3/documents/2/attachments" + method: post + attachments: + href: "/api/v3/documents/2/attachments" + project: + href: "/api/v3/projects/29" + title: Some other project + self: + href: "/api/v3/documents/2" + title: Some other document + _type: Document + createdAt: "2018-12-10T20:55:54Z" + description: + format: markdown + html: + "

Videlicet deserunt aequitas cognatus. Concedo + quia est quia pariatur vorago vallum. Calco autem atavus + accusamus conscendo cornu ulterius. Tam patria ago consectetur + ventito sustineo nihil caecus. Supra officiis eos velociter + somniculosus tonsor qui. Suffragium aduro arguo angustus + cogito quia tolero vulnus. Supplanto sortitus cresco apud + vestrum qui.

" + raw: + Videlicet deserunt aequitas cognatus. Concedo quia + est quia pariatur vorago vallum. Calco autem atavus accusamus + conscendo cornu ulterius. Tam patria ago consectetur ventito + sustineo nihil caecus. Supra officiis eos velociter somniculosus + tonsor qui. Suffragium aduro arguo angustus cogito quia + tolero vulnus. Supplanto sortitus cresco apud vestrum + qui. + id: 2 + title: Some other document + _links: + changeSize: + href: "/api/v3/documents?offset=1&pageSize=%7Bsize%7D" + templated: true + jumpTo: + href: "/api/v3/documents?offset=%7Boffset%7D&pageSize=30" + templated: true + self: + href: "/api/v3/documents?offset=1&pageSize=30" + _type: Collection + count: 2 + offset: 1 + pageSize: 30 + total: 2 + schema: + "$ref": "#/components/schemas/DocumentsModel" + description: OK + headers: {} + "400": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery + message: + - Filters Invalid filter does not exist. + description: + Returned if the client sends invalid request parameters e.g. + filters + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to view this resource. + description: Returned if the client is not logged in and login is required. + headers: {} + tags: + - Documents + description: + The documents returned depend on the provided parameters and also + on the requesting user's permissions. + operationId: List_Documents + summary: List Documents + "/api/v3/documents/{id}": + get: + parameters: + - description: Document id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + attachments: + _embedded...: + elements: [] + _links: + self: + href: "/api/v3/documents/1/attachments" + _type: Collection + count: 2 + total: 2 + project: + _type: Project... + _links: + addAttachment: + href: "/api/v3/documents/1/attachments" + method: post + attachments: + href: "/api/v3/documents/1/attachments" + project: + href: "/api/v3/projects/19" + title: Some project + self: + href: "/api/v3/documents/1" + title: Some document + _type: Document + createdAt: "2018-12-10T20:53:39Z" + description: + format: markdown + html: + "

Videlicet deserunt aequitas cognatus. Concedo quia + est quia pariatur vorago vallum. Calco autem atavus accusamus + conscendo cornu ulterius. Tam patria ago consectetur ventito + sustineo nihil caecus. Supra officiis eos velociter somniculosus + tonsor qui. Suffragium aduro arguo angustus cogito quia tolero + vulnus. Supplanto sortitus cresco apud vestrum qui.

" + raw: + Videlicet deserunt aequitas cognatus. Concedo quia est + quia pariatur vorago vallum. Calco autem atavus accusamus + conscendo cornu ulterius. Tam patria ago consectetur ventito + sustineo nihil caecus. Supra officiis eos velociter somniculosus + tonsor qui. Suffragium aduro arguo angustus cogito quia tolero + vulnus. Supplanto sortitus cresco apud vestrum qui. + id: 1 + title: Some other document + schema: + "$ref": "#/components/schemas/DocumentModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the document does not exist or if the user does not have permission to view it. + + **Required permission** `view documents` in the project the document belongs to + headers: {} + tags: + - Documents + description: "" + operationId: View_document + summary: View document + "/api/v3/example/form": + post: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + payload: + _links: + status: + href: "/api/v3/statuses/1" + _type: Example + lockVersion: 5 + subject: An example title + schema: + _links: + self: + href: "/api/v3/example/schema" + _type: Schema + lockVersion: + type: Integer + writable: false + status: + _embedded: + allowedValues: + - _links: + self: + href: "/api/v3/statuses/1" + _type: Status + createdAt: "2014-05-21T08:51:20Z" + defaultDoneRatio: 0 + id: 1 + isClosed: false + isDefault: true + name: New + position: 1 + updatedAt: "2014-05-21T09:12:00Z" + - _links: + self: + href: "/api/v3/statuses/2" + _type: Status + createdAt: "2014-05-21T08:51:20Z" + defaultDoneRatio: 100 + id: 2 + isClosed: true + isDefault: false + name: Closed + position: 2 + updatedAt: "2014-05-21T09:12:00Z" + _links: + allowedValues: + - href: "/api/v3/statuses/1" + title: New + - href: "/api/v3/statuses/2" + title: Closed + type: Status + subject: + maxLength: 255 + minLength: 1 + type: String + validationErrors: + subject: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:BadExampleError + message: + For the purpose of this example we need a validation + error. The remainder of the response pretends there were + no errors. + _links: + commit: + href: "/api/v3/example" + method: PATCH + previewMarkup: + href: "/api/v3/render/markdown" + method: POST + self: + href: "/api/v3/example/form" + validate: + href: "/api/v3/example/form" + method: POST + _type: Form + schema: + "$ref": "#/components/schemas/Example_FormModel" + description: OK + headers: {} + "400": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody + message: + The request body was neither empty, nor did it contain + a single JSON object. + description: |- + Occurs when the client did not send a valid JSON object in the request body and the request body + was not empty. + + Note that this error only occurs when the content is not at all a single JSON object. + It **does not occur** for requests containing undefined properties or invalid property values. + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to edit example resources. + description: + Returned if the client does not have sufficient permissions + to modify the associated resource. + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "409": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:UpdateConflict + message: + The resource you are about to edit was changed in the + meantime. + description: + Returned if underlying resource was changed since the client + requested the form. This is determined using the `lockVersion` property. + headers: {} + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Forms + description: + This is an example of how a form might look like. Note that this + endpoint does not exist in the actual implementation. + operationId: show_or_validate_form + requestBody: + content: + application/json: + schema: + example: + _type: Example + lockVersion: 5 + subject: An example title + properties: + _type: + type: string + lockVersion: + type: number + subject: + type: string + type: object + summary: show or validate form + "/api/v3/example/schema": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _dependencies: [] + _links: + self: + href: "/api/v3/example/schema" + _type: Schema + lockVersion: + name: Resource Version + type: Integer + writable: false + status: + _embedded: + allowedValues: + - _links: + self: + href: "/api/v3/statuses/1" + _type: Status + createdAt: "2014-05-21T08:51:20Z" + defaultDoneRatio: 0 + id: 1 + isClosed: false + isDefault: true + name: New + position: 1 + updatedAt: "2014-05-21T09:12:00Z" + - _links: + self: + href: "/api/v3/statuses/2" + _type: Status + createdAt: "2014-05-21T08:51:20Z" + defaultDoneRatio: 100 + id: 2 + isClosed: true + isDefault: false + name: Closed + position: 2 + updatedAt: "2014-05-21T09:12:00Z" + _links: + allowedValues: + - href: "/api/v3/statuses/1" + title: New + - href: "/api/v3/statuses/2" + title: Closed + location: _links + name: Status + type: Status + subject: + maxLength: 255 + minLength: 1 + name: Subject + type: String + schema: + "$ref": "#/components/schemas/Example_SchemaModel" + description: OK + headers: {} + tags: + - Schemas + description: + This is an example of how a schema might look like. Note that this + endpoint does not exist in the actual implementation. + operationId: view_the_schema + summary: view the schema + "/api/v3/examples": + get: + parameters: + - description: |- + The column to group by. + Note: Aggregation is as of now only supported by the work package collection. + You can pass any column name as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + example: status + in: query + name: groupBy + required: false + schema: + type: string + - description: "" + example: true + in: query + name: showSums + required: false + schema: + default: false + type: boolean + responses: + "200": + description: OK + headers: {} + tags: + - Collections + description: "" + operationId: view_aggregated_result + summary: view aggregated result + "/api/v3/file_links/{id}": + get: + summary: Gets a file link. + operationId: view_file_link + tags: + - File links + description: Gets a single file link resource of a work package. + parameters: + - name: id + description: File link id + in: path + required: true + schema: + type: integer + example: 42 + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/FileLinkReadModel" + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package, view file links + delete: + summary: Removes a file link. + operationId: delete_file_link + tags: + - File links + description: |- + Removes a file link on a work package. + + The request contains only the file link identifier as a path parameter. No request body is needed. + parameters: + - name: id + description: File link id + in: path + required: true + schema: + type: integer + example: 42 + responses: + "200": + description: OK + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** manage file links + + *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.* + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the work package or the file link does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view work package, view file links + "/api/v3/file_links/{id}/open": + get: + summary: Creates an opening uri of the linked file. + operationId: open_file_link + tags: + - File links + description: |- + Creates a uri to open the origin file linked by the given file link. This uri depends on the storage type and + is always located on the origin storage itself. + parameters: + - name: id + description: File link id + in: path + required: true + schema: + type: integer + example: 42 + - name: location + description: + Boolean flag indicating, if the file should be opened directly + or rather the directory location. + in: query + required: false + schema: + type: boolean + example: true + responses: + "303": + headers: + Location: + schema: + type: string + format: uri + description: |- + Returned if the request was successful. In the `Location` header is the uri where the client can open the origin + file on the storage. + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package, view file links + "/api/v3/file_links/{id}/download": + get: + summary: Creates a download uri of the linked file. + operationId: download_file_link + tags: + - File links + description: |- + Creates a uri to download the origin file linked by the given file link. This uri depends on the storage type and + is always located on the origin storage itself. + parameters: + - name: id + description: File link id + in: path + required: true + schema: + type: integer + example: 42 + responses: + "303": + headers: + Location: + schema: + type: string + format: uri + description: |- + Returned if the request was successful. In the `Location` header is the uri where the client can download the + origin file from the storage. + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package, view file links + "/api/v3/grids": + get: + summary: List grids + tags: + - Grids + description: |- + Lists all grids matching the provided filters and being part of the selected query page. The grids returned will + also depend on the permissions of the requesting user. + operationId: list_grids + parameters: + - name: offset + schema: + type: integer + default: 1 + description: Page number inside the requested collection. + in: query + required: false + example: "25" + - name: pageSize + schema: + type: integer + default: 30 + description: Number of elements to display per page. + in: query + required: false + example: "25" + - name: filters + schema: + type: string + description: |- + JSON specifying filter conditions. Accepts the same format as returned by + the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters + are: + + - page: Filter grid by work package + in: query + required: false + example: '[{ "page": { "operator": "=", "values": ["/my/page"] } }]' + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/GridCollectionModel" + examples: + Simple grid: + "$ref": "#/components/examples/GridSimpleCollectionResponse" + "400": + description: + Returned if the client sends invalid request parameters e.g. + filters + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery + message: Filters Invalid filter does not exist. + "403": + description: Returned if the client is not logged in and login is required. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to view this resource. + post: + summary: Create a grid + operationId: create_grid + tags: + - Grids + description: |- + Creates a new grid applying the attributes provided in the body. The constraints applied to the grid depend on the + page the grid is placed in which is why the create form end point should be used to be guided when wanting to + create a grid. + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/GridWriteModel" + examples: + Simple grid creation: + "$ref": "#/components/examples/GridSimplePatchModel" + responses: + "201": + description: Created + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/GridReadModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** Depends on the page the grid is defined for. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + description: |- + Returned if: + + * a constraint for a property was violated (`PropertyConstraintViolation`) + "/api/v3/grids/form": + post: + responses: + "200": + description: OK + headers: {} + tags: + - Grids + description: "" + operationId: Grid_Create_Form + summary: Grid Create Form + "/api/v3/grids/{id}": + parameters: + - description: ID of the grid being modified + example: "1" + in: path + name: id + required: true + schema: + type: integer + get: + summary: Get a grid + operationId: get_grid + tags: + - Grids + description: Fetches a single grid identified by its id. + parameters: + - name: id + in: path + description: Grid id + required: true + schema: + type: integer + example: "42" + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/GridReadModel" + examples: + Simple grid: + "$ref": "#/components/examples/GridSimpleResponse" + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the Grid does not exist or if the user does not have permission to view it. + + **Required permission** depends on the page the grid is defined for + patch: + summary: Update a grid + operationId: update_grid + tags: + - Grids + description: |- + Updates the given grid by applying the attributes provided in the body. The constraints applied to the grid depend + on the page the grid is placed in which is why the create form end point should be used to be guided when wanting + to update a grid. + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/GridWriteModel" + examples: + Simple grid patch: + "$ref": "#/components/examples/GridSimplePatchModel" + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/GridReadModel" + examples: + Simple grid: + "$ref": "#/components/examples/GridSimpleResponse" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** The permission depends on the page the grid is placed in. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + description: |- + Returned if: + + * a constraint for a property was violated (`PropertyConstraintViolation`) + "/api/v3/grids/{id}/form": + post: + parameters: + - description: ID of the grid being modified + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + schema: + type: object + examples: + response: + value: + _embedded: + payload: + columnCount: 5 + rowCount: 6 + widgets: + - _type: GridWidget + endColumn: 3 + endRow: 8 + identifier: time_entries_current_user + startColumn: 1 + startRow: 1 + - _type: GridWidget + endColumn: 5 + endRow: 8 + identifier: news + startColumn: 4 + startRow: 3 + - _type: GridWidget + endColumn: 6 + endRow: 3 + identifier: documents + startColumn: 3 + startRow: 1 + schema: + _links: {} + _type: Schema + columnCount: + hasDefault: false + name: Number of columns + required: true + type: Integer + writable: true + createdAt: + hasDefault: false + name: Created on + required: true + type: DateTime + writable: false + id: + hasDefault: false + name: ID + required: true + type: Integer + writable: false + rowCount: + hasDefault: false + name: Number of rows + required: true + type: Integer + writable: true + scope: + _links: {} + hasDefault: false + name: Page + required: true + type: Href + writable: false + updatedAt: + hasDefault: false + name: Updated on + required: true + type: DateTime + writable: false + widgets: + _links: {} + hasDefault: false + name: Widgets + required: true + type: "[]GridWidget" + writable: true + validationErrors: + widgets: + _embedded: + errors: + - _embedded: + details: + attribute: widgets + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Widgets is outside of the grid. + - _embedded: + details: + attribute: widgets + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Widgets is outside of the grid. + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MultipleErrors + message: Multiple field constraints have been violated. + _links: + self: + href: "/api/v3/grids/2/form" + method: post + validate: + href: "/api/v3/grids/2/form" + method: post + _type: Form + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** depends on the page the grid is defined for. + + *Note that you will only receive this error, if you are at least allowed to see the corresponding grid.* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the grid does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Grids + description: "" + operationId: Grid_Update_Form + summary: Grid Update Form + "/api/v3/groups": + get: + summary: List groups + operationId: list_groups + tags: + - Groups + description: |- + Returns a collection of groups. The client can choose to filter the + groups similar to how work packages are filtered. In addition to the provided + filters, the server will reduce the result set to only contain groups, for which + the requesting client has sufficient permissions (*view_members*, *manage_members*). + parameters: + - name: sortBy + description: |- + JSON specifying sort criteria. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + + + id: Sort by primary key + + + created_at: Sort by group creation datetime + + + updated_at: Sort by the time the group was updated last + in: query + required: false + example: '[["id", "asc"]]' + schema: + default: '[["id", "asc"]]' + type: string + - name: select + description: Comma separated list of properties to include. + in: query + required: false + example: total,elements/name,elements/self,self + schema: + type: string + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/GroupCollectionModel" + "403": + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** View members or manage members in any project + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + post: + summary: Create group + operationId: create_group + tags: + - Groups + description: Creates a new group applying the attributes provided in the body. + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/GroupWriteModel" + responses: + "201": + description: Created + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/GroupModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** Administrator + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + description: |- + Returned if: + + * a constraint for a property was violated (`PropertyConstraintViolation`) + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _embedded: + details: + attribute: name + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Name can't be blank. + "/api/v3/groups/{id}": + delete: + summary: Delete group + operationId: delete_group + tags: + - Groups + description: Deletes the group. + parameters: + - name: id + description: Group id + example: 1 + in: path + required: true + schema: + type: integer + responses: + "202": + description: |- + Returned if the group was successfully deleted + + Note that the response body is empty as of now. In future versions of the API a body + *might* be returned, indicating the progress of deletion. + "403": + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** Administrator + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + "404": + description: |- + Returned if the group does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** Administrator + + *Note: A client without sufficient permissions shall not be able to test for the existence of + a version. That's why a 404 is returned here, even if a 403 might be more appropriate.* + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + get: + summary: Get group + operationId: get_group + tags: + - Groups + description: Fetches a group resource. + parameters: + - name: id + description: Group id + example: 1 + in: path + required: true + schema: + type: integer + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/GroupModel" + "404": + description: |- + Returned if the group does not exist or if the API user does not have permission to view them. + + **Required permission** If the user has the *manage members* permission in at least one project the user will be able to query all groups. If not, the user + will be able to query all groups which are members in projects, he has the *view members* permission in. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + patch: + summary: Update group + operationId: update_group + tags: + - Groups + description: |- + Updates the given group by applying the attributes provided in the body. + + Please note that the `members` array provided will override the existing set of members (similar to a PUT). A + client thus has to provide the complete list of members the group is to have after the PATCH even if only one + member is to be added. + parameters: + - name: id + description: Group id + example: 1 + in: path + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/GroupWriteModel" + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/GroupModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** Administrator + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + "404": + description: |- + Returned if the group does not exist or the client does not have sufficient permissions + to see it. + + **Required permission** If the user has the *manage members* permission in at least one project the user will be able to query all groups. If not, the user + will be able to query all groups which are members in projects, he has the *view members* permission in. + + *Note: A client without sufficient permissions shall not be able to test for the existence of + a version. That's why a 404 is returned here, even if a 403 might be more appropriate.* + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + description: |- + Returned if: + + * a constraint for a property was violated (`PropertyConstraintViolation`) + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _embedded: + details: + attribute: members + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Member is already taken. + "/api/v3/help_texts": + get: + summary: List help texts + operationId: list_help_texts + tags: + - Help texts + description: List the complete collection of help texts. + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/HelpTextCollectionModel" + "/api/v3/help_texts/{id}": + get: + summary: Get help text + operationId: get_help_text + tags: + - Help texts + description: Fetches the help text from the given id. + parameters: + - name: id + description: Help text id + example: 1 + in: path + required: true + schema: + type: integer + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/HelpTextModel" + "404": + description: Returned if the help text does not exist. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + "/api/v3/memberships": + get: + parameters: + - description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + Currently supported filters are: + + + any_name_attribute: filters memberships based on the name of the principal. All possible name variants (and also email and login) are searched. + + + blocked: reduces the result set to all memberships that are temporarily blocked or that are not blocked temporarily. + + + group: filters memberships based on the name of a group. The group however is not the principal used for filtering. Rather, the memberships of the group are used as the filter values. + + + name: filters memberships based on the name of the principal. Note that only the name is used which depends on a setting in the OpenProject instance. + + + principal: filters memberships based on the id of the principal. + + + project: filters memberships based on the id of the project. + + + role: filters memberships based on the id of any role assigned to the membership. + + + status: filters memberships based on the status of the principal. + + + created_at: filters memberships based on the time the membership was created. + + + updated_at: filters memberships based on the time the membership was updated last. + examples: + name-filter: + summary: Filtering on the name of the principal + value: '[{ "name": { "operator": "=", "values": ["A User"] }" }]' + global-memberships: + summary: Get memberships for global roles + value: '[{ "project": { "operator": "!*", "values": null }" }]' + in: query + name: filters + required: false + schema: + type: string + - description: |- + JSON specifying sort criteria. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + + + id: Sort by primary key + + + name: Sort by the name of the principal. Note that this depends on the setting for how the name is to be displayed at least for users. + + + email: Sort by the email address of the principal. Groups and principal users, which do not have an email, are sorted last. + + + status: Sort by the status of the principal. Groups and principal users, which do not have a status, are sorted together with the active users. + + + created_at: Sort by membership creation datetime + + + updated_at: Sort by the time the membership was updated last + example: '[["id", "asc"]]' + in: query + name: sortBy + required: false + schema: + default: '[["id", "asc"]]' + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + principal: + href: "/api/v3/users/5" + title: A user + project: + href: "/api/v3/projects/3" + title: A Project + roles: + - href: "/api/v3/roles/4" + title: Reader + schema: + href: "/api/v3/memberships/schema" + self: + href: "/api/v3/memberships/11" + _type: Membership + createdAt: "2015-03-20T12:56:56Z" + id: 11 + updatedAt: "2018-12-20T18:16:11Z" + - _links: + principal: + href: "/api/v3/groups/5" + title: A group + project: + href: "/api/v3/projects/6" + title: Another Project + roles: + - href: "/api/v3/roles/8" + title: Project admin + schema: + href: "/api/v3/memberships/schema" + self: + href: "/api/v3/memberships/41" + _type: Membership + createdAt: "2019-12-22T12:56:06Z" + id: 41 + updatedAt: "2020-12-20T18:16:12Z" + _links: + self: + href: "/api/v3/memberships" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/List_membershipsModel" + description: OK + headers: {} + tags: + - Memberships + description: + Returns a collection of memberships. The client can choose to filter + the memberships similar to how work packages are filtered. In addition to + the provided filters, the server will reduce the result set to only contain + memberships, for which the requesting client has sufficient permissions (*view_members*, + *manage_members*). + operationId: List_memberships + summary: List memberships + post: + responses: + "201": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/View_membershipModel" + description: Created + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** Manage members + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _embedded: + details: + attribute: project + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Project can't be blank. + description: |- + Returned if: + + * a constraint for a property was violated (`PropertyConstraintViolation`) + headers: {} + tags: + - Memberships + description: |- + Creates a new membership applying the attributes provided in the body. + + You can use the form and schema to retrieve the valid attribute values and by that be guided towards successful creation. + + By providing a `notificationMessage` within the `_meta` block of the payload, the client can include a customized message to the user + of the newly created membership. In case of a group, the message will be sent to every user belonging to the group. + + By including `{ "sendNotifications": false }` within the `_meta` block of the payload, no notifications is send out at all. + operationId: Create_membership + summary: Create membership + "/api/v3/memberships/available_projects": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + categories: + href: "/api/v3/projects/6/categories" + createWorkPackage: + href: "/api/v3/projects/6/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/6/work_packages" + method: post + editWorkPackage: + href: "/api/v3//work_packages/{id}/form" + method: post + templated: true + memberships: + href: "/api/v3/projects/6/memberships" + self: + href: "/api/v3/projects/6" + title: A project + _type: Project + createdAt: "2015-07-06T13:28:14+00:00" + description: + Eveniet molestias omnis quis aut qui eum adipisci. + Atque aut aut in exercitationem adipisci amet. Nisi asperiores + quia ratione veritatis enim exercitationem magnam. Aut fuga + architecto adipisci nihil. Et repellat pariatur. Aliquam + et sed perferendis nostrum quaerat. Fugit doloremque voluptatem. + id: 6 + identifier: a_project + name: A project + type: Customer Project + updatedAt: "2015-10-01T09:55:02+00:00" + - _links: + categories: + href: "/api/v3/projects/14/categories" + createWorkPackage: + href: "/api/v3/projects/14/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/14/work_packages" + method: post + memberships: + href: "/api/v3/projects/14/memberships" + self: + href: "/api/v3/projects/14" + title: Another project + _type: Project + createdAt: "2016-02-29T12:50:20+00:00" + description: "" + id: 14 + identifier: another_project + name: Another project + type: + updatedAt: "2016-02-29T12:50:20+00:00" + _links: + self: + href: "/api/v3/memberships/available_projects" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Available_projects_for_membershipsModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** manage members + headers: {} + tags: + - Memberships + description: + Gets a list of projects in which a membership can be created in. + The list contains all projects in which the user issuing the request has the + manage members permissions. + operationId: Available_projects_for_memberships + summary: Available projects for memberships + "/api/v3/memberships/form": + post: + responses: + "200": + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** manage memberships in any project + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Memberships + description: "" + operationId: Membership_create_form + summary: Membership create form + "/api/v3/memberships/schema": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _dependencies: [] + _links: + self: + href: "/api/v3/memberships/schema" + _type: Schema + createdAt: + hasDefault: false + name: Created on + required: true + type: DateTime + writable: false + id: + hasDefault: false + name: ID + required: true + type: Integer + writable: false + notificationMessage: + hasDefault: false + location: _meta + name: Message + options: {} + required: false + type: Formattable + writable: true + principal: + _links: {} + hasDefault: false + location: _links + name: Principal + required: true + type: Principal + writable: true + project: + _links: {} + hasDefault: false + location: _links + name: Project + required: false + type: Project + writable: true + roles: + _links: {} + hasDefault: false + location: _links + name: Role + required: true + type: "[]Role" + writable: true + updatedAt: + hasDefault: false + name: Updated on + required: true + type: DateTime + writable: false + schema: + "$ref": "#/components/schemas/View_membership_schemaModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions to see the schema. + + **Required permission:** manage members or view memberships on any project + headers: {} + tags: + - Memberships + description: "" + operationId: View_membership_schema + summary: View membership schema + "/api/v3/memberships/{id}": + delete: + parameters: + - description: Membership id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "204": + description: Returned if the membership was successfully deleted + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** manage members + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the membership does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view members + + *Note: A client without sufficient permissions shall not be able to test for the existence of + a version. That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Memberships + description: Deletes the membership. + operationId: Delete_membership + summary: Delete membership + get: + parameters: + - description: Membership id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + principal...: {} + project...: {} + roles...: [] + _links: + principal: + href: "/api/v3/users/4" + title: Some user + project: + href: "/api/v3/projects/3" + title: A project + roles: + - href: "/api/v3/roles/5" + title: Member + - href: "/api/v3/roles/4" + title: Reader + schema: + href: "/api/v3/memberships/schema" + self: + href: "/api/v3/memberships/11" + title: Some user + update: + href: "/api/v3/memberships/11/form" + method: post + updateImmediately: + href: "/api/v3/memberships/11" + method: patch + _type: Membership + createdAt: "2015-03-20T12:56:56Z" + id: 11 + updatedAt: "2018-12-20T18:16:11Z" + schema: + "$ref": "#/components/schemas/View_membershipModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the membership does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view members **or** manage members + + *Note: A client without sufficient permissions shall not be able to test for the existence of + a membership. That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + tags: + - Memberships + description: "" + operationId: View_membership + summary: View membership + patch: + parameters: + - description: Membership id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/View_membershipModel" + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** Manage members in the membership's project. + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the membership does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view member + + *Note: A client without sufficient permissions shall not be able to test for the existence of + a version. That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _embedded: + details: + attribute: roles + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Roles has an unassignable role. + description: |- + Returned if: + + * a constraint for a property was violated (`PropertyConstraintViolation`) + headers: {} + tags: + - Memberships + description: |- + Updates the given membership by applying the attributes provided in the body. + + By providing a `notificationMessage` within the `_meta` block of the payload, the client can include a customized message to the user + of the updated membership. In case of a group, the message will be sent to every user belonging to the group. + + By including `{ "sendNotifications": false }` within the `_meta` block of the payload, no notifications is send out at all. + operationId: Update_membership + summary: Update membership + "/api/v3/memberships/{id}/form": + post: + parameters: + - description: Membership id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + payload: + _links: + roles: + - href: "/api/v3/roles/4" + title: A role + _meta: + notificationMessage: + raw: Alice, you can now also create work packages. + schema: + _dependencies: [] + _links: {} + _type: Schema + createdAt: + hasDefault: false + name: Created on + required: true + type: DateTime + writable: false + id: + hasDefault: false + name: ID + required: true + type: Integer + writable: false + notificationMessage: + hasDefault: false + location: _meta + name: Message + options: {} + required: false + type: Formattable + writable: true + principal: + _links: {} + hasDefault: false + name: Principal + required: true + type: Principal + writable: false + project: + _links: {} + hasDefault: false + name: Project + required: false + type: Project + writable: false + roles: + _links: + allowedValues: + href: "/api/v3/roles?filters=%5B%7B%22unit%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22project%22%5D%7D%7D%5D" + hasDefault: false + location: _links + name: Role + required: true + type: "[]Role" + writable: true + updatedAt: + hasDefault: false + name: Updated on + required: true + type: DateTime + writable: false + validationErrors: {} + _links: + commit: + href: "/api/v3/memberships/5" + method: patch + self: + href: "/api/v3/memberships/5/form" + method: post + validate: + href: "/api/v3/memberships/5/form" + method: post + _type: Form + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** manage versions in the version's project + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Memberships + description: "" + operationId: Membership_update_form + summary: Membership update form + "/api/v3/my_preferences": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/my_preferences" + user: + href: "/api/v3/users/1" + title: John Sheppard + updateImmediately: + href: "/api/v3/users/3/preferences" + method: patch + _type: UserPreferences + commentSortDescending: true + hideMail: false + timeZone: Europe/Berlin + warnOnLeavingUnsaved: true + notifications: + watched: false + involved: true + mentioned: false + newsAdded: false, + newsCommented: false + documentAdded: false + forumMessages: false + wikiPageAdded: false + wikiPageUpdated: false + membershipAdded: false + membershipUpdated: false + workPackageCommented: false + workPackageProcessed: false + workPackagePrioritized: false + workPackageScheduled: false + _links: + project: + href: + schema: + "$ref": "#/components/schemas/UserPreferencesModel" + description: OK + headers: {} + "401": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated + message: You need to be authenticated to access this resource. + description: Returned if no user is currently authenticated + headers: {} + tags: + - UserPreferences + description: "" + operationId: Show_my_preferences + summary: Show my preferences + patch: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/my_preferences" + user: + href: "/api/v3/users/1" + title: John Sheppard + updateImmediately: + href: "/api/v3/users/3/preferences" + method: patch + _type: UserPreferences + commentSortDescending: true + hideMail: false + timeZone: Europe/Berlin + warnOnLeavingUnsaved: true + notifications: + watched: false + involved: true + mentioned: false + newsAdded: false, + newsCommented: false + documentAdded: false + forumMessages: false + wikiPageAdded: false + wikiPageUpdated: false + membershipAdded: false + membershipUpdated: false + workPackageCommented: false + workPackageProcessed: false + workPackagePrioritized: false + workPackageScheduled: false + _links: + project: + href: + schema: + "$ref": "#/components/schemas/UserPreferencesModel" + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "401": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated + message: You need to be authenticated to access this resource. + description: Returned if no user is currently authenticated + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Time zone is not set to one of the allowed values. + description: |- + Returned if the update contains invalid properties. + Reasons are: + + * Specifying an invalid type + + * Using an unknown time zone + headers: {} + tags: + - UserPreferences + description: + When calling this endpoint the client provides a single object, + containing the properties that it wants to change, in the body. + operationId: Update_UserPreferences + requestBody: + content: + application/json: + schema: + example: + autoHidePopups: true + timeZone: Europe/Paris + properties: + autoHidePopups: + type: boolean + timeZone: + type: string + type: object + summary: Update my preferences + "/api/v3/news": + get: + parameters: + - description: Page number inside the requested collection. + example: "25" + in: query + name: offset + required: false + schema: + default: 1 + type: integer + - description: Number of elements to display per page. + example: "25" + in: query + name: pageSize + required: false + schema: + type: integer + - description: |- + JSON specifying sort criteria. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + + + id: Sort by primary key + + + created_at: Sort by news creation datetime + example: '[["created_at", "asc"]]' + in: query + name: sortBy + required: false + schema: + type: string + - description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + + + project_id: Filter news by project + example: '[{ "project_id": { "operator": "=", "values": ["1", "2"] } }]' + in: query + name: filters + required: false + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + author: + href: "/api/v3/users/2" + title: Peggie Feeney + project: + href: "/api/v3/projects/1" + title: Seeded Project + self: + href: "/api/v3/news/1" + title: asperiores possimus nam doloribus ab + _type: News + createdAt: "2015-03-20T12:57:01Z" + description: + format: markdown + html: + "

Videlicet deserunt aequitas cognatus. Concedo + quia est quia pariatur vorago vallum. Calco autem atavus + accusamus conscendo cornu ulterius. Tam patria ago consectetur + ventito sustineo nihil caecus. Supra officiis eos velociter + somniculosus tonsor qui. Suffragium aduro arguo angustus + cogito quia tolero vulnus. Supplanto sortitus cresco apud + vestrum qui.

" + raw: + Videlicet deserunt aequitas cognatus. Concedo quia + est quia pariatur vorago vallum. Calco autem atavus accusamus + conscendo cornu ulterius. Tam patria ago consectetur ventito + sustineo nihil caecus. Supra officiis eos velociter somniculosus + tonsor qui. Suffragium aduro arguo angustus cogito quia + tolero vulnus. Supplanto sortitus cresco apud vestrum + qui. + id: 1 + summary: + Celebrer spiculum colo viscus claustrum atque. Id + nulla culpa sumptus. Comparo crapula depopulo demonstro. + title: asperiores possimus nam doloribus ab + - _links: + author: + href: "/api/v3/users/2" + title: Peggie Feeney + project: + href: "/api/v3/projects/1" + title: Seeded Project + self: + href: "/api/v3/news/2" + title: terminatio tutamen. Officia adeptio sp + _type: News + createdAt: "2015-03-20T12:57:01Z" + description: + format: markdown + html: + "

Amicitia alius cattus voluntarius. Virgo viduo + terminatio tutamen. Officia adeptio spectaculum atavus + nisi cum concido bis. Harum caecus auxilium sol theatrum + eaque consequatur. Omnis aeger suus adipisci cicuta. Cur + delicate alias curto cursim atqui talio fugiat.

" + raw: + Amicitia alius cattus voluntarius. Virgo viduo terminatio + tutamen. Officia adeptio spectaculum atavus nisi cum concido + bis. Harum caecus auxilium sol theatrum eaque consequatur. + Omnis aeger suus adipisci cicuta. Cur delicate alias curto + cursim atqui talio fugiat. + id: 2 + summary: Consequatur sequi surculus creo tui aequitas. + title: terminatio tutamen. Officia adeptio sp + _links: + changeSize: + href: "/api/v3/news?offset=1&pageSize=%7Bsize%7D" + templated: true + jumpTo: + href: "/api/v3/news?offset=%7Boffset%7D&pageSize=2" + templated: true + nextByOffset: + href: "/api/v3/news?offset=2&pageSize=2" + self: + href: "/api/v3/news?offset=1&pageSize=2" + _type: Collection + count: 2 + offset: 1 + pageSize: 2 + total: 78 + schema: + "$ref": "#/components/schemas/List_of_NewsModel" + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to view this resource. + description: Returned if the client is not logged in and login is required. + headers: {} + tags: + - News + description: + Lists news. The news returned depend on the provided parameters + and also on the requesting user's permissions. + operationId: List_News + summary: List News + "/api/v3/news/{id}": + get: + parameters: + - description: news id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + author: + _type: User... + project: + _type: Project... + _links: + author: + href: "/api/v3/users/2" + title: Peggie Feeney + project: + href: "/api/v3/projects/1" + title: A project + self: + href: "/api/v3/news/1" + title: asperiores possimus nam doloribus ab + _type: News + createdAt: "2015-03-20T12:57:01Z" + description: + format: markdown + html: + "

Videlicet deserunt aequitas cognatus. Concedo quia + est quia pariatur vorago vallum. Calco autem atavus accusamus + conscendo cornu ulterius. Tam patria ago consectetur ventito + sustineo nihil caecus. Supra officiis eos velociter somniculosus + tonsor qui. Suffragium aduro arguo angustus cogito quia tolero + vulnus. Supplanto sortitus cresco apud vestrum qui.

" + raw: + Videlicet deserunt aequitas cognatus. Concedo quia est + quia pariatur vorago vallum. Calco autem atavus accusamus + conscendo cornu ulterius. Tam patria ago consectetur ventito + sustineo nihil caecus. Supra officiis eos velociter somniculosus + tonsor qui. Suffragium aduro arguo angustus cogito quia tolero + vulnus. Supplanto sortitus cresco apud vestrum qui. + id: 1 + summary: + Celebrer spiculum colo viscus claustrum atque. Id nulla + culpa sumptus. Comparo crapula depopulo demonstro. + title: asperiores possimus nam doloribus ab + schema: + "$ref": "#/components/schemas/NewsModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the news does not exist or if the user does not have permission to view it. + + **Required permission** being member of the project the news belongs to + headers: {} + tags: + - News + description: "" + operationId: View_news + summary: View news + "/api/v3/notifications": + get: + summary: Get notification collection + operationId: list_notifications + tags: + - Notifications + description: |- + Returns the collection of available in-app notifications. The notifications returned depend on the provided + parameters and also on the requesting user's permissions. + + Contrary to most collections, this one also links to and embeds schemas for the `details` properties of the notifications returned. + This is an optimization. Clients will receive the information necessary to display the various types of details that a notification + can carry. + parameters: + - name: offset + description: Page number inside the requested collection. + in: query + example: 25 + required: false + schema: + default: 1 + type: integer + - name: pageSize + description: Number of elements to display per page. + in: query + example: 25 + required: false + schema: + default: 20 + type: integer + - name: sortBy + in: query + description: |- + JSON specifying sort criteria. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + + + id: Sort by primary key + + + reason: Sort by notification reason + + + readIAN: Sort by read status + example: '[["reason", "asc"]]' + required: false + schema: + type: string + - name: groupBy + in: query + description: |- + string specifying group_by criteria. + + + reason: Group by notification reason + + + project: Sort by associated project + example: reason + required: false + schema: + type: string + - name: filters + in: query + description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + + + id: Filter by primary key + + + project: Filter by the project the notification was created in + + + readIAN: Filter by read status + + + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + + + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the `resourceType` filter. + + + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with the `resourceId` filter. + example: '[{ "readIAN": { "operator": "=", "values": ["t"] } }]' + required: false + schema: + type: string + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/NotificationCollectionModel" + examples: + Collection of notifications: + "$ref": "#/components/examples/NotificationCollection" + description: OK + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to view this resource. + description: Returned if the client is not logged in and login is required. + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery + message: Filters Invalid filter does not exist. + description: + Returned if the client sends invalid request parameters e.g. + filters + "/api/v3/notifications/read_ian": + post: + summary: Read all notifications + operationId: read_notifications + tags: + - Notifications + description: |- + Marks the whole notification collection as read. The collection contains only elements the authenticated user can + see, and can be further reduced with filters. + parameters: + - name: filters + in: query + description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) + endpoint. Currently supported filters are: + + + id: Filter by primary key + + + project: Filter by the project the notification was created in + + + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + + + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the + `resourceType` filter. + + + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with + the `resourceId` filter. + example: '[{ "reason": { "operator": "=", "values": ["mentioned"] } }]' + required: false + schema: + type: string + responses: + "204": + description: OK + "400": + description: Returned if the request is not properly formatted. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery + message: + - Filters Invalid filter does not exist. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "/api/v3/notifications/unread_ian": + post: + summary: Unread all notifications + operationId: unread_notifications + tags: + - Notifications + description: |- + Marks the whole notification collection as unread. The collection contains only elements the authenticated user can + see, and can be further reduced with filters. + parameters: + - name: filters + in: query + description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) + endpoint. Currently supported filters are: + + + id: Filter by primary key + + + project: Filter by the project the notification was created in + + + reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of + + + resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the + `resourceType` filter. + + + resourceType: Filter by the type of the resource the notification was created for. Ideally used together with + the `resourceId` filter. + example: '[{ "reason": { "operator": "=", "values": ["mentioned"] } }]' + required: false + schema: + type: string + responses: + "204": + description: OK + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "/api/v3/notifications/{id}": + get: + summary: Get the notification + operationId: view_notification + tags: + - Notifications + description: Returns the notification identified by the notification id. + parameters: + - name: id + in: path + description: notification id + example: "1" + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/NotificationModel" + examples: + Date alert notification: + "$ref": "#/components/examples/DateAlertNotification" + Mentioned notification: + "$ref": "#/components/examples/MentionedNotification" + description: OK + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the notification does not exist or if the user does not have permission to view it. + + **Required permission** being recipient of the notification + "/api/v3/notifications/{notification_id}/details/{id}": + get: + summary: Get a notification detail + operationId: view_notification_detail + tags: + - Notifications + - Values::Property + description: + Returns an individual detail of a notification identified by the + notification id and the id of the detail. + parameters: + - name: notification_id + in: path + description: notification id + example: "1" + required: true + schema: + type: integer + - name: id + in: path + description: detail id + example: "0" + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ValuesPropertyModel" + examples: + Start date notification detail: + "$ref": "#/components/examples/ValuesPropertyStartDate" + Due date notification detail: + "$ref": "#/components/examples/ValuesPropertyDueDate" + Date notification detail for milestone work package: + "$ref": "#/components/examples/ValuesPropertyDate" + description: OK + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the notification or the detail of it does not exist or if the user does not have permission to view it. + + **Required permission** being recipient of the notification + "/api/v3/notifications/{id}/read_ian": + post: + summary: Read notification + operationId: read_notification + tags: + - Notifications + description: Marks the given notification as read. + parameters: + - name: id + in: path + description: notification id + example: "1" + required: true + schema: + type: integer + responses: + "204": + description: OK + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the notification does not exist or if the user does not have permission to view it. + + **Required permission** being recipient of the notification + "/api/v3/notifications/{id}/unread_ian": + post: + summary: Unread notification + operationId: unread_notification + tags: + - Notifications + description: Marks the given notification as unread. + parameters: + - name: id + in: path + description: notification id + example: "1" + required: true + schema: + type: integer + responses: + "204": + description: OK + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the notification does not exist or if the user does not have permission to view it. + + **Required permission** being recipient of the notification + "/api/v3/oauth_applications/{id}": + get: + summary: Get the oauth application. + operationId: get_oauth_application + tags: + - OAuth 2 + description: |- + Retrieves the OAuth 2 provider application for the given identifier. The secret will not be part of the response, + instead a `confidential` flag is indicating, whether there is a secret or not. + parameters: + - name: id + description: OAuth application id + in: path + required: true + schema: + type: integer + example: 1337 + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/OAuthApplicationReadModel" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** admin + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: Returned if the application does not exist. + "/api/v3/oauth_client_credentials/{id}": + get: + summary: Get the oauth client credentials object. + operationId: get_oauth_client_credentials + tags: + - OAuth 2 + description: |- + Retrieves the OAuth 2 client credentials for the given identifier. The secret will not be part of the response, + instead a `confidential` flag is indicating, whether there is a secret or not. + parameters: + - name: id + description: OAuth Client Credentials id + in: path + required: true + schema: + type: integer + example: 1337 + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/OAuthClientCredentialsReadModel" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** admin + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: Returned if the object does not exist. + "/api/v3/posts/{id}": + get: + parameters: + - description: Post's identifier + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + project: + _type: Project... + _links: + addAttachment: + href: "/api/v3/posts/1/attachments" + method: post + attachments: + href: "/api/v3/posts/1/attachments" + project: + href: "/api/v3/projects/1" + title: A project with a title + self: + href: "/api/v3/posts/1" + _type: Post + id: 1 + subject: A post with a subject + schema: + "$ref": "#/components/schemas/PostModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the post does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view messages in the post's project + headers: {} + tags: + - Posts + description: Retrieve an individual post as identified by the id parameter + operationId: View_Post + summary: View Post + "/api/v3/posts/{id}/attachments": + get: + parameters: + - description: ID of the post whose attachments will be listed + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + author: + href: "/api/v3/users/1" + title: OpenProject Admin + container: + href: "/api/v3/posts/72" + title: wiki + delete: + href: "/api/v3/attachments/376" + method: delete + downloadLocation: + href: "/api/v3/attachments/376/content" + self: + href: "/api/v3/attachments/376" + title: 200.gif + _type: Attachment + contentType: image/gif + createdAt: "2018-06-01T07:24:19Z" + description: + format: plain + html: "" + raw: "" + digest: + algorithm: md5 + hash: 7ac9c97ef73d47127f590788b84c0c1c + fileName: some.gif + fileSize: 3521772 + id: 376 + _links: + self: + href: "/api/v3/posts/72/attachments" + _type: Collection + count: 1 + total: 1 + schema: + "$ref": "#/components/schemas/Attachments_Model" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the post does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view messages + + *Note: A client without sufficient permissions shall not be able to test for the existence of a post. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + tags: + - Attachments + description: "" + operationId: List_attachments_by_post + summary: List attachments by post + post: + parameters: + - description: ID of the post to receive the attachment + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + author: + _links: + lock: + href: "/api/v3/users/1/lock" + method: post + title: Set lock on admin + self: + href: "/api/v3/users/1" + title: OpenProject Admin + showUser: + href: "/users/1" + type: text/html + updateImmediately: + href: "/api/v3/users/1" + method: patch + title: Update admin + _type: User + admin: true + avatar: "" + createdAt: "2015-03-20T12:56:52Z" + email: + firstName: OpenProject + id: 1 + identityUrl: + lastName: Admin + login: admin + name: OpenProject Admin + status: active + updatedAt: "2018-05-29T13:57:44Z" + container: + _links: + addAttachment: + href: "/api/v3/posts/150/attachments" + method: post + attachments: + href: "/api/v3/posts/150/attachments" + project: + href: "/api/v3/projects/12" + title: Demo project + self: + href: "/api/v3/posts/150" + _type: Post + id: 150 + subject: sfsdfsdfsdfsdf + _links: + author: + href: "/api/v3/users/1" + title: OpenProject Admin + container: + href: "/api/v3/posts/150" + title: sfsdfsdfsdfsdf + delete: + href: "/api/v3/attachments/377" + method: delete + downloadLocation: + href: "/api/v3/attachments/377/content" + self: + href: "/api/v3/attachments/377" + title: 200.gif + _type: Attachment + contentType: image/gif + createdAt: "2018-06-01T07:53:36Z" + description: + format: plain + html: "" + raw: "" + digest: + algorithm: md5 + hash: 7ac9c97ef73d47127f590788b84c0c1c + fileName: some.gif + fileSize: 3521772 + id: 377 + description: OK + headers: {} + "400": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody + message: The request could not be parsed as JSON. + description: |- + Returned if the client sends a not understandable request. Reasons include: + + * Omitting one of the required parts (metadata and file) + + * sending unparsable JSON in the metadata part + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to delete this attachment. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** edit messages + + *Note that you will only receive this error, if you are at least allowed to see the wiki page* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the post does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view messages + + *Note: A client without sufficient permissions shall not be able to test for the existence of a post. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: File is too large (maximum size is 5242880 Bytes). + description: |- + Returned if the client tries to send an invalid attachment. + Reasons are: + + * Omitting the file name (`fileName` property of metadata part) + + * Sending a file that is too large + headers: {} + tags: + - Attachments + description: Adds an attachment with the post as it's container. + operationId: Add_attachment_to_post + summary: Add attachment to post + "/api/v3/principals": + get: + parameters: + - description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + Currently supported filters are: + + + type: filters principals by their type (*User*, *Group*, *PlaceholderUser*). + + + member: filters principals by the projects they are members in. + + + name: filters principals by the user or group name. + + + any_name_attribute: filters principals by the user or group first- and last name, email or login. + + + status: filters principals by their status number (active = *1*, registered = *2*, locked = *3*, invited = *4*) + example: '[{ "type": { "operator": "=", "values": ["User"] } }]' + in: query + name: filters + required: false + schema: + type: string + - description: Comma separated list of properties to include. + example: total,elements/name,elements/self,self + in: query + name: select + required: false + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + delete: + href: "/api/v3/users/4" + method: delete + title: Delete Eliza92778 + lock: + href: "/api/v3/users/4/lock" + method: post + title: Set lock on Eliza92778 + self: + href: "/api/v3/users/4" + title: Danika O'Keefe + showUser: + href: "/users/4" + type: text/html + updateImmediately: + href: "/api/v3/users/4" + method: patch + title: Update Eliza92778 + _type: User + admin: false + avatar: https://example.org/users/4/avatar + createdAt: "2015-03-20T12:57:02Z" + email: jackie@dicki.org + firstName: Danika + id: 4 + identityUrl: + lastName: O'Keefe + login: Eliza92778 + name: Danika O'Keefe + status: active + updatedAt: "2015-06-16T15:28:14Z" + - _links: + delete: + href: "/api/v3/users/2" + method: delete + title: Delete Sebastian9686 + lock: + href: "/api/v3/users/2/lock" + method: post + title: Set lock on Sebastian9686 + self: + href: "/api/v3/users/2" + title: Peggie Feeney + showUser: + href: "/users/2" + type: text/html + updateImmediately: + href: "/api/v3/users/2" + method: patch + title: Update Sebastian9686 + _type: User + admin: false + avatar: https://example.org/users/4/avatar + createdAt: "2015-03-20T12:56:55Z" + email: + firstName: Peggie + id: 2 + identityUrl: + lastName: Feeney + login: Sebastian9686 + name: Peggie Feeney + status: active + updatedAt: "2015-03-20T12:56:55Z" + - _links: + self: + href: "/api/v3/groups/9" + title: The group + _type: Group + createdAt: "2015-09-23T11:06:36Z" + id: 9 + name: The group + updatedAt: "2015-09-23T11:06:36Z" + - _links: + self: + href: "/api/v3/placeholder_users/29" + title: UX Designer + _type: PlaceholderUser + createdAt: "2018-09-23T11:06:36Z" + id: 29 + name: UX Designer + updatedAt: "2019-10-23T11:06:36Z" + _links: + self: + href: "/api/v3/principals" + _type: Collection + count: 4 + total: 4 + schema: + "$ref": "#/components/schemas/PrincipalsModel" + description: OK + headers: {} + tags: + - Principals + description: + List all principals. The client can choose to filter the principals + similar to how work packages are filtered. In addition to the provided filters, + the server will reduce the result set to only contain principals who are members + in projects the client is allowed to see. + operationId: List_principals + summary: List principals + "/api/v3/priorities": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + self: + href: "/api/v3/priorities/1" + title: Low + _type: Priority + id: 1 + isActive: true + isDefault: false + name: Low + position: 1 + - _links: + self: + href: "/api/v3/priorities/2" + title: Normal + _type: Priority + id: 2 + isActive: true + isDefault: true + name: Normal + position: 2 + - _links: + self: + href: "/api/v3/priorities/3" + title: High + _type: Priority + id: 3 + isActive: true + isDefault: false + name: High + position: 3 + - _links: + self: + href: "/api/v3/priorities/4" + title: Immediate + _type: Priority + id: 4 + isActive: true + isDefault: false + name: Immediate + position: 5 + _links: + self: + href: "/api/v3/priorities" + _type: Collection + count: 4 + total: 4 + schema: + "$ref": "#/components/schemas/PrioritiesModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to see the priorities. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view work package (on any project) + headers: {} + tags: + - Priorities + description: "" + operationId: List_all_Priorities + summary: List all Priorities + "/api/v3/priorities/{id}": + get: + parameters: + - description: Priority id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/priorities/1" + title: Low + _type: Priority + id: 1 + isActive: true + isDefault: false + name: Low + position: 1 + schema: + "$ref": "#/components/schemas/PriorityModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to see this priority. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view work package (on any project) + headers: {} + tags: + - Priorities + description: "" + operationId: View_Priority + summary: View Priority + "/api/v3/project_storages": + get: + summary: Gets a list of project storages + operationId: list_project_storages + tags: + - File Links + description: + Gets a collection of all project storages that meet the provided + filters and the user has permission to see them. + parameters: + - name: filters + in: query + required: false + schema: + default: "[]" + type: string + description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) + endpoint. Currently supported filters are: + + - project_id + - storage_id + example: + '[{ "project_id": { "operator": "=", "values": ["42"] }}, { "storage_id": + { "operator": "=", "values": ["1337"] }}]' + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ProjectStorageCollectionModel" + "400": + description: Returned if any given filter is invalid. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery + message: The query parameter 'filters' is missing or malformed. + "/api/v3/project_storages/{id}": + get: + summary: Gets a project storage + operationId: get_project_storage + tags: + - File Links + description: |- + Gets a project storage resource. This resource contains all data that is applicable on the relation between a + storage and a project. + parameters: + - name: id + description: Project storage id + in: path + required: true + schema: + type: integer + example: 1337 + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ProjectStorageModel" + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the project storage does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view file links + "/api/v3/projects": + get: + parameters: + - description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + Currently supported filters are: + + + active: based on the active property of the project + + + ancestor: filters projects by their ancestor. A project is not considered to be it's own ancestor. + + + created_at: based on the time the project was created + + + latest_activity_at: based on the time the last activity was registered on a project. + + + name_and_identifier: based on both the name and the identifier. + + + parent_id: filters projects by their parent. + + + principal: based on members of the project. + + + type_id: based on the types active in a project. + + + user_action: based on the actions the current user has in the project. + + + id: based on projects' id. + + + visible: based on the visibility for the user (id) provided as the filter value. This filter is useful for admins to identify the projects visible to a user. + There might also be additional filters based on the custom fields that have been configured. + example: '[{ "ancestor": { "operator": "=", "values": [''1''] }" }]' + in: query + name: filters + required: false + schema: + type: string + - description: |- + JSON specifying sort criteria. + Currently supported orders are: + + + id + + + name + + + typeahead (sorting by hierarchy and name) + + + created_at + + + public + + + latest_activity_at + + + required_disk_space + There might also be additional orders based on the custom fields that have been configured. + example: '[["id", "asc"]]' + in: query + name: sortBy + required: false + schema: + type: string + - description: Comma separated list of properties to include. + example: total,elements/identifier,elements/name + in: query + name: select + required: false + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + categories: + href: "/api/v3/projects/6/categories" + createWorkPackage: + href: "/api/v3/projects/6/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/6/work_packages" + method: post + projects: + href: "/api/v3/projects/123" + self: + href: "/api/v3/projects/6" + title: A project + status: + href: "/api/v3/project_statuses/on_track" + title: On track + versions: + href: "/api/v3/projects/6/versions" + _type: Project + active: true + createdAt: "2015-07-06T13:28:14+00:00" + description: + format: markdown + html: "

Lorem ipsum dolor sit amet

" + raw: Lorem **ipsum** dolor sit amet + id: 6 + identifier: a_project + name: A project + public: false + statusExplanation: + format: markdown + html: "

Everything fine

" + raw: Everything **fine** + type: Customer Project + updatedAt: "2015-10-01T09:55:02+00:00" + - _links: + categories: + href: "/api/v3/projects/14/categories" + createWorkPackage: + href: "/api/v3/projects/14/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/14/work_packages" + method: post + projects: + href: + self: + href: "/api/v3/projects/14" + title: Another project + status: + href: "/api/v3/project_statuses/off_track" + title: Off track + versions: + href: "/api/v3/projects/14/versions" + _type: Project + active: false + createdAt: "2016-02-29T12:50:20+00:00" + description: + format: markdown + html: "" + raw: "" + id: 14 + identifier: another_project + name: Another project + public: true + statusExplanation: + format: markdown + html: "

Uh oh

" + raw: Uh **oh** + type: + updatedAt: "2016-02-29T12:50:20+00:00" + _links: + self: + href: "/api/v3/projects" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/List_projectsModel" + description: OK + headers: {} + tags: + - Projects + description: + Returns a collection of projects. The collection can be filtered + via query parameters similar to how work packages are filtered. In addition + to the provided filter, the result set is always limited to only contain projects + the client is allowed to see. + operationId: List_projects + summary: List projects + post: + requestBody: + content: + application/json: + schema: + type: object + examples: + with custom fields: + "$ref": "#/components/examples/ProjectBody" + responses: + "201": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ProjectModel" + examples: + with custom fields: + "$ref": "#/components/examples/Project" + description: Created + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** add project which is a global permission + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _embedded: + details: + attribute: name + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Name can't be blank. + description: |- + Returned if: + + * a constraint for a property was violated (`PropertyConstraintViolation`) + headers: {} + tags: + - Projects + description: |- + Creates a new project, applying the attributes provided in the body. + + You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation. + operationId: Create_project + summary: Create project + "/api/v3/projects/form": + post: + requestBody: + content: + application/json: + schema: + type: object + examples: + with custom fields: + "$ref": "#/components/examples/ProjectBody" + empty: + description: + Empty request to get the form initially in order to start + the guided creation of a project + value: {} + responses: + "200": + content: + application/hal+json: + schema: + type: object + examples: + response: + value: + _embedded: + payload: + _links: + customField26: + href: + title: + customField31: + href: + title: + parent: + href: + status: + href: + active: true + customField30: + customField34: + customField35: Text custom field value + customField41: + format: markdown + html: "" + raw: "" + customField42: + description: + format: markdown + html: "" + raw: + identifier: new_project_identifier + name: New project name + public: false + statusExplanation: + format: markdown + html: "

" + raw: + schema: + _dependencies: [] + _links: {} + _type: Schema + active: + hasDefault: true + name: Active + required: true + type: Boolean + writable: true + createdAt: + hasDefault: false + name: Created on + required: true + type: DateTime + writable: false + customField26: + _links: + allowedValues: + href: "/api/v3/principals?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22%21%22%2C%22values%22%3A%5B%220%22%2C%223%22%5D%7D%7D%2C%7B%22type%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22User%22%5D%7D%7D%2C%7B%22member%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22%22%5D%7D%7D%5D&pageSize=0" + hasDefault: false + location: _links + name: Project user + required: false + type: User + visibility: default + writable: true + customField30: + hasDefault: false + name: some project cf + required: false + type: Integer + visibility: default + writable: true + customField31: + _embedded: + allowedValues: + - _links: + self: + href: "/api/v3/custom_options/513" + title: abc + _type: CustomOption + id: 513 + value: abc + - _links: + self: + href: "/api/v3/custom_options/514" + title: def + _type: CustomOption + id: 514 + value: def + - _links: + self: + href: "/api/v3/custom_options/515" + title: ghi + _type: CustomOption + id: 515 + value: ghi + _links: + allowedValues: + - href: "/api/v3/custom_options/513" + title: abc + - href: "/api/v3/custom_options/514" + title: def + - href: "/api/v3/custom_options/515" + title: ghi + hasDefault: false + location: _links + name: list project cf + required: false + type: CustomOption + visibility: default + writable: true + customField34: + hasDefault: false + name: Bool Project CF + required: false + type: Boolean + visibility: default + writable: true + customField35: + hasDefault: false + name: text project cf + required: true + type: String + visibility: default + writable: true + customField41: + hasDefault: false + name: Long text project cf + required: false + type: Formattable + visibility: default + writable: true + customField42: + hasDefault: false + name: Date project cf + required: false + type: Date + visibility: default + writable: true + description: + hasDefault: false + name: Description + required: false + type: Formattable + writable: true + id: + hasDefault: false + name: ID + required: true + type: Integer + writable: false + identifier: + hasDefault: false + maxLength: 100 + minLength: 1 + name: Identifier + required: true + type: String + writable: true + name: + hasDefault: false + maxLength: 255 + minLength: 1 + name: Name + required: true + type: String + writable: true + parent: + _links: + allowedValues: + href: "/api/v3/projects/available_parent_projects" + hasDefault: false + location: _links + name: Subproject of + required: false + type: Project + visibility: default + writable: true + public: + hasDefault: false + name: Public + required: true + type: Boolean + writable: true + status: + _links: + allowedValues: + - href: "/api/v3/project_statuses/on_track" + title: On track + - href: "/api/v3/project_statuses/at_risk" + title: At risk + - href: "/api/v3/project_statuses/off_track" + title: Off track + hasDefault: true + name: Status + required: false + type: ProjectStatus + writable: true + statusExplanation: + hasDefault: false + name: Status explanation + required: false + type: Formattable + writable: true + updatedAt: + hasDefault: false + name: Updated on + required: true + type: DateTime + writable: false + validationErrors: + identifier: + _embedded: + details: + attribute: identifier + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Identifier has already been taken. + _links: + self: + href: "/api/v3/projects/form" + method: post + validate: + href: "/api/v3/projects/form" + method: post + _type: Form + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** add project which is a global permission + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Projects + description: "" + operationId: Project_create_form + summary: Project create form + "/api/v3/projects/schema": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _dependencies: [] + _links: + self: + href: "/api/v3/projects/schema" + _type: Schema + active: + hasDefault: true + name: Active + required: true + type: Boolean + writable: true + createdAt: + hasDefault: false + name: Created on + required: true + type: DateTime + writable: false + customField30: + hasDefault: false + name: Integer project custom field + required: false + type: Integer + visibility: default + writable: true + customField31: + _links: {} + hasDefault: false + location: _links + name: List project custom field + required: false + type: CustomOption + visibility: default + writable: true + customField32: + _links: {} + hasDefault: false + location: _links + name: Version project custom field + required: false + type: Version + visibility: default + writable: true + customField34: + hasDefault: false + name: Boolean project custom field + required: false + type: Boolean + visibility: default + writable: true + customField35: + hasDefault: false + name: Text project custom field + required: true + type: String + visibility: default + writable: true + description: + hasDefault: false + name: Description + required: false + type: Formattable + writable: true + id: + hasDefault: false + name: ID + required: true + type: Integer + writable: false + identifier: + hasDefault: false + maxLength: 100 + minLength: 1 + name: Identifier + required: true + type: String + writable: true + name: + hasDefault: false + maxLength: 255 + minLength: 1 + name: Name + required: true + type: String + writable: true + parent: + _links: {} + hasDefault: false + location: _links + name: Subproject of + required: false + type: Project + visibility: default + writable: true + public: + hasDefault: false + name: Public + required: true + type: Boolean + writable: true + status: + _links: + allowedValues: + - href: "/api/v3/project_statuses/on_track" + title: On track + - href: "/api/v3/project_statuses/at_risk" + title: At risk + - href: "/api/v3/project_statuses/off_track" + title: Off track + hasDefault: true + name: Status + required: false + type: ProjectStatus + writable: true + statusExplanation: + hasDefault: false + name: Status explanation + required: false + type: Formattable + writable: true + updatedAt: + hasDefault: false + name: Updated on + required: true + type: DateTime + writable: false + schema: + "$ref": "#/components/schemas/Projects_schemaModel" + description: OK + headers: {} + tags: + - Projects + description: "" + operationId: View_project_schema + summary: View project schema + "/api/v3/projects/{id}": + delete: + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "204": + description: |- + Returned if the project was successfully deleted. There is currently no end point to query for the actual deletion status. + Such an end point _might_ be added in the future. + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** admin + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the project does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view project + + *Note: A client without sufficient permissions shall not be able to test for the existence of + a version. That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _embedded: + details: + attribute: base + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: + Work packages in non descendant projects reference versions + of the project or its descendants. + description: |- + Returned if the project cannot be deleted. This can happen when there are still references to the project in other projects + that need to be severed at first. + headers: {} + tags: + - Projects + description: |- + Deletes the project permanently. As this is a lengthy process, the actual deletion is carried out asynchronously. + So the project might exist well after the request has returned successfully. To prevent unwanted changes to + the project scheduled for deletion, it is archived at once. + operationId: Delete_Project + summary: Delete Project + get: + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + with custom fields: + "$ref": "#/components/examples/Project" + schema: + "$ref": "#/components/schemas/ProjectModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the project does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view project + + *Note: A client without sufficient permissions shall not be able to test for the existence of a project. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + tags: + - Projects + description: "" + operationId: View_project + summary: View project + patch: + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + type: object + examples: + with custom fields: + "$ref": "#/components/examples/ProjectBody" + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ProjectModel" + examples: + with custom fields: + "$ref": "#/components/examples/Project" + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** edit project for the project to be altered + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the project does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view project + + *Note: A client without sufficient permissions shall not be able to test for the existence of + a version. That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _embedded: + details: + attribute: name + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Name can't be blank. + description: |- + Returned if: + + * a constraint for a property was violated (`PropertyConstraintViolation`) + headers: {} + tags: + - Projects + description: + Updates the given project by applying the attributes provided in + the body. + operationId: Update_Project + summary: Update Project + "/api/v3/projects/{id}/form": + post: + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + type: object + examples: + with custom fields: + "$ref": "#/components/examples/ProjectBody" + empty: + description: + Empty request to get the form initially in order to start + the guided update of a project + value: {} + responses: + "200": + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** edit projects in the project + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Projects + description: "" + operationId: Project_update_form + summary: Project update form + "/api/v3/projects/{id}/copy": + post: + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "302": + description: + Returned if the request is successful. It will redirect to + the job statuses API with the backend job that got created. You can query + that endpoint to check the status of the copy, and eventually get the + created project. + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** copy projects in the source project + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _embedded: + details: + attribute: name + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Name can't be blank. + description: |- + Returned if: + + * a constraint for a property was violated (`PropertyConstraintViolation`) + headers: {} + tags: + - Projects + description: "" + operationId: Create_project_copy + summary: Create project copy + "/api/v3/projects/{id}/copy/form": + post: + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** copy projects in the source project + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Projects + description: "" + operationId: Project_copy_form + summary: Project copy form + "/api/v3/project_statuses/{id}": + get: + parameters: + - description: Project status id + example: on_track + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/project_statuses/on_track" + _type: ProjectStatus + id: on_track + name: On track + schema: + "$ref": "#/components/schemas/View_project_statusModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: Returned if the project status does not exist. + headers: {} + tags: + - Projects + description: "" + operationId: View_project_status + summary: View project status + "/api/v3/projects/available_parent_projects": + get: + parameters: + - description: JSON specifying filter conditions. + example: '[{ "ancestor": { "operator": "=", "values": [''1''] }" }]' + in: query + name: filters + required: false + schema: + type: string + - description: + The id or identifier of the project the parent candidate is determined + for + example: "123" + in: query + name: of + required: false + schema: + type: string + - description: |- + JSON specifying sort criteria. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint and allows all the filters and sortBy supported by the project list end point. + example: '[["id", "asc"]]' + in: query + name: sortBy + required: false + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + categories: + href: "/api/v3/projects/6/categories" + createWorkPackage: + href: "/api/v3/projects/6/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/6/work_packages" + method: post + self: + href: "/api/v3/projects/6" + title: A project + status: + href: "/api/v3/project_statuses/on_track" + title: On track + versions: + href: "/api/v3/projects/6/versions" + _type: Project + active: true + createdAt: "2015-07-06T13:28:14+00:00" + description: + format: markdown + html: "

Lorem ipsum dolor sit amet

" + raw: Lorem **ipsum** dolor sit amet + id: 6 + identifier: a_project + name: A project + public: false + statusExplanation: + format: markdown + html: "

Everything fine

" + raw: Everything **fine** + type: Customer Project + updatedAt: "2015-10-01T09:55:02+00:00" + - _links: + categories: + href: "/api/v3/projects/14/categories" + createWorkPackage: + href: "/api/v3/projects/14/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/14/work_packages" + method: post + self: + href: "/api/v3/projects/14" + title: Another project + status: + href: "/api/v3/project_statuses/on_track" + title: On track + versions: + href: "/api/v3/projects/14/versions" + _type: Project + active: true + createdAt: "2016-02-29T12:50:20+00:00" + description: + format: markdown + html: "" + raw: "" + id: 14 + identifier: another_project + name: Another project + public: true + statusExplanation: + format: markdown + html: "

Everything super fine

" + raw: Everything super **fine** + type: + updatedAt: "2016-02-29T12:50:20+00:00" + _links: + self: + href: "/api/v3/projects/available_parent_projects?of=123" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/List_available_parent_project_candidatesModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** edit project in a project or the global add project permission + headers: {} + tags: + - Projects + description: |- + Lists projects which can become parent to another project. Only sound candidates are returned. + For instance a project cannot become parent of itself or it's children. + + To specify the project for which a parent is queried for, the `of` parameter can be provided. If no `of` + parameter is provided, a new project is assumed. Then, the check for the hierarchy is omitted as a new project cannot be + part of a hierarchy yet. + + Candidates can be filtered. Most commonly one will want to filter by name or identifier. + You can do this through the `filters` parameter which works just like the work package index. + + For instance to find all parent candidates with "rollout" in their name: + + ``` + ?filters=[{"name_and_identifier":{"operator":"~","values":["rollout"]}}] + ``` + operationId: List_available_parent_project_candidates + summary: List available parent project candidates + "/api/v3/projects/{id}/budgets": + get: + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + self: + href: "/api/v3/budgets/1" + title: Q3 2015 + _type: Budget + id: 1 + subject: Q3 2015 + - _links: + self: + href: "/api/v3/budgets/2" + title: Q4 2015 + _type: Budget + id: 2 + subject: Q4 2015 + _links: + self: + href: "/api/v3/projects/1/budgets" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Budgets_by_ProjectModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to see the budgets of this project. + description: |- + Returned if the client does not have sufficient permissions to see the budgets of the given + project. + + **Required permission:** view work packages **or** view budgets + + *Note that you will only receive this error, if you are at least allowed to see the corresponding project.* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified project does not exist. + description: |- + Returned if either: + + * the project does not exist + + * the client does not have sufficient permissions to see the project + + * the costs module is not enabled on the given project + + **Required permission:** view project + + *Note: A client without sufficient permissions shall not be able to test for the existence of a project. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + tags: + - Budgets + description: "" + operationId: view_Budgets_of_a_Project + summary: view Budgets of a Project + "/api/v3/projects/{id}/queries/default": + get: + summary: View default query for project + operationId: View_default_query_for_project + tags: + - Queries + description: + Same as [viewing an existing, persisted Query](https://www.openproject.org/docs/api/endpoints/queries/#list-queries) + in its response, this resource returns an unpersisted query and by that allows + to get the default query configuration. The client may also provide additional + parameters which will modify the default query. The query will already be + scoped for the project. + parameters: + - description: Id of the project the default query is requested for + example: "1" + in: path + name: id + required: true + schema: + type: integer + - name: filters + description: |- + JSON specifying filter conditions. + The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. + All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). + example: '[{ "assignee": { "operator": "=", "values": ["1", "5"] }" }]' + in: query + required: false + schema: + default: '[{ "status_id": { "operator": "o", "values": null }}]' + type: string + - name: offset + description: Page number inside the queries' result collection of work packages. + example: "25" + in: query + required: false + schema: + default: 1 + type: integer + - name: pageSize + description: + Number of elements to display per page for the queries' result + collection of work packages. + example: "25" + in: query + required: false + schema: + type: integer + - name: sortBy + description: + JSON specifying sort criteria. The sort criteria is applied to + the query's result collection of work packages overriding the query's persisted + sort criteria. + example: '[["status", "asc"]]' + in: query + required: false + schema: + default: '[["id", "asc"]]' + type: string + - name: groupBy + description: + The column to group by. The grouping criteria is applied to the + to the query's result collection of work packages overriding the query's + persisted group criteria. + example: status + in: query + required: false + schema: + type: string + - name: showSums + description: + Indicates whether properties should be summed up if they support + it. The showSums parameter is applied to the to the query's result collection + of work packages overriding the query's persisted sums property. + example: true + in: query + required: false + schema: + default: false + type: boolean + - name: timestamps + description: + 'Indicates the timestamps to filter by when showing changed attributes + on work packages. Values can be either ISO8601 dates, ISO8601 durations + and the following relative date keywords: "oneDayAgo@HH:MM+HH:MM", "lastWorkingDay@HH:MM+HH:MM", + "oneWeekAgo@HH:MM+HH:MM", "oneMonthAgo@HH:MM+HH:MM". The first "HH:MM" part + represents the zero paded hours and minutes. The last "+HH:MM" part represents + the timezone offset from UTC associated with the time. Values older than + 1 day are accepted only with valid Enterprise Token available. + + ' + example: 2023-01-01,P-1Y,PT0S,lastWorkingDay@12:00 + in: query + required: false + schema: + default: PT0S + type: string + - name: timelineVisible + description: Indicates whether the timeline should be shown. + example: true + in: query + required: false + schema: + default: false + type: boolean + - name: showHierarchies + description: Indicates whether the hierarchy mode should be enabled. + example: true + in: query + required: false + schema: + default: true + type: boolean + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + results: + _embedded: + elements: + - "<--- shortened for brevity --->" + _links: + changeSize: + href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + createWorkPackage: + href: "/api/v3/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/work_packages" + method: post + jumpTo: + href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + self: + href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + _type: WorkPackageCollection + count: 30 + offset: 1 + pageSize: 2 + total: 234 + _links: + columns: + - href: "/api/v3/queries/columns/id" + title: ID + - href: "/api/v3/queries/columns/subject" + title: Subject + - href: "/api/v3/queries/columns/type" + title: Type + - href: "/api/v3/queries/columns/status" + title: Status + - href: "/api/v3/queries/columns/priority" + title: Priority + - href: "/api/v3/queries/columns/assignee" + title: Assignee + - href: "/api/v3/queries/columns/updated_at" + title: Updated on + groupBy: + href: + title: + project: + href: "/api/v3/projects/42" + title: Lorem ipsum project + results: + href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + self: + href: "/api/v3/projects/42/queries/default" + title: Default + sortBy: + - href: "/api/v3/queries/sort_bys/parent-desc" + title: Parent (Descending) + user: + href: "/api/v3/users/1" + title: OpenProject Admin + _type: Query + filters: + - _links: + filter: + href: "/api/v3/queries/filters/status" + title: Status + operator: + href: "/api/v3/queries/operators/o" + title: open + schema: + href: "/api/v3/queries/filter_instance_schemas/status" + values: [] + _type: StatusQueryFilter + name: Status + name: default + public: false + showHierarchies: true + starred: false + sums: false + timelineVisible: false + timelineZoomLevel: days + schema: + "$ref": "#/components/schemas/Default_Query_for_ProjectModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions to see the default query. + + **Required permission:** view work packages in the project + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the client does not have sufficient permissions to see the project. + + **Required permission:** any permission in the project + headers: {} + "/api/v3/projects/{id}/queries/filter_instance_schemas": + get: + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _dependencies: + - _type: SchemaDependency + dependencies: + "/api/v3/queries/operators/!": + values: + _links: {} + hasDefault: false + name: Values + required: true + type: "[]User" + writable: true + "/api/v3/queries/operators/!*": {} + "/api/v3/queries/operators/*": {} + "/api/v3/queries/operators/=": + values: + _links: {} + hasDefault: false + name: Values + required: true + type: "[]User" + writable: true + "on": operator + _links: + filter: + href: "/api/v3/queries/filters/assignee" + title: Assignee + self: + href: "/api/v3/queries/filter_instance_schemas/assignee" + _type: QueryFilterInstanceSchema + filter: + _links: {} + hasDefault: false + name: Filter + required: true + type: QueryFilter + writable: true + name: + hasDefault: true + name: Name + required: true + type: String + writable: false + - _dependencies: + - _type: SchemaDependency + dependencies: + "/api/v3/queries/operators/!": + values: + _links: {} + hasDefault: false + name: Values + required: true + type: "[]User" + writable: true + "/api/v3/queries/operators/=": + values: + _links: {} + hasDefault: false + name: Values + required: true + type: "[]User" + writable: true + "on": operator + _links: + filter: + href: "/api/v3/queries/filters/author" + title: Author + self: + href: "/api/v3/queries/filter_instance_schemas/author" + _type: QueryFilterInstanceSchema + filter: + _links: {} + hasDefault: false + name: Filter + required: true + type: QueryFilter + writable: true + name: + hasDefault: true + name: Name + required: true + type: String + writable: false + _links: + self: + href: "/api/v3/projects/42/queries/filter_instance_schemas" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Query_Filter_Instance_Schemas_For_ProjectModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions to see it. + + **Required permission:** view work package in any project + headers: {} + tags: + - Query Filter Instance Schema + description: + Returns the list of QueryFilterInstanceSchemas defined for a query + of the specified project. + operationId: List_Query_Filter_Instance_Schemas_for_Project + summary: List Query Filter Instance Schemas for Project + "/api/v3/projects/{id}/queries/schema": + get: + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + QuerySchema: + "$ref": "#/components/examples/QuerySchemaModel" + schema: + "$ref": "#/components/schemas/Schema_For_Project_QueriesModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: "**Required permission:** view work package in the project" + headers: {} + tags: + - Queries + description: Retrieve the schema for project queries. + operationId: View_schema_for_project_queries + summary: View schema for project queries + "/api/v3/projects/{id}/work_packages": + get: + summary: Get work packages of project + operationId: Get_Project_Work_Package_Collection + tags: + - Work Packages + description: + Returns the collection of work packages that are related to the + given project. + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + - description: Page number inside the requested collection. + example: "25" + in: query + name: offset + required: false + schema: + default: 1 + type: integer + - description: Number of elements to display per page. + example: "25" + in: query + name: pageSize + required: false + schema: + type: integer + - description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. If no filter is to be applied, the client should send an empty array (`[]`). + example: '[{ "type_id": { "operator": "=", "values": [''1'', ''2''] }}]' + in: query + name: filters + required: false + schema: + default: '[{ "status_id": { "operator": "o", "values": null }}]' + type: string + - description: |- + JSON specifying sort criteria. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + example: '[["status", "asc"]]' + in: query + name: sortBy + required: false + schema: + default: '[["id", "asc"]]' + type: string + - description: The column to group by. + example: status + in: query + name: groupBy + required: false + schema: + type: string + - description: + Indicates whether properties should be summed up if they support + it. + example: true + in: query + name: showSums + required: false + schema: + default: false + type: boolean + - description: Comma separated list of properties to include. + example: total,elements/subject,elements/id,self + in: query + name: select + required: false + schema: + type: string + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/Work_PackagesModel" + description: OK + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to see the work packages of this project. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view work packages + + *Note that you will only receive this error, if you are at least allowed to see the corresponding project.* + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified project does not exist. + description: |- + Returned if the project does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view project + post: + summary: Create work package in project + operationId: Create_Project_Work_Package + tags: + - Work Packages + description: |- + When calling this endpoint the client provides a single object, containing at least the properties and links that + are required, in the body. The required fields of a WorkPackage can be found in its schema, which is embedded in + the respective form. Note that it is only allowed to provide properties or links supporting the write operation. + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + - description: |- + Indicates whether change notifications (e.g. via E-Mail) should be sent. + Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), + not just the current user. + example: false + in: query + name: notify + required: false + schema: + default: true + type: boolean + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/Work_PackageModel" + description: OK + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to add work packages to this project. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** add work packages + + *Note that you will only receive this error, if you are at least allowed to see the corresponding project.* + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified project does not exist. + description: |- + Returned if the project does not exist or the client does not have sufficient permissions + to see it. + + **Required permissions:** view project + + *Note: A client without sufficient permissions shall not be able to test for the existence of a project. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _embedded: + details: + attribute: Subject + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: The subject might not be blank. + description: |- + Returned if: + + * the client tries to write a read-only property + + * a constraint for a property was violated + + * a property was provided in an unreadable format + "/api/v3/projects/{id}/work_packages/form": + post: + parameters: + - description: ID of the project in which the work package will be created + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + description: OK + headers: {} + tags: + - Work Packages + description: "" + operationId: Work_Package_Create_Form_For_Project + summary: Work Package Create Form For Project + "/api/v3/projects/{id}/available_assignees": + get: + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + delete: + href: "/api/v3/users/1" + method: DELETE + title: Delete j.sheppard + lock: + href: "/api/v3/users/1/lock" + method: POST + title: Set lock on j.sheppard + self: + href: "/api/v3/users/1" + title: John Sheppard - j.sheppard + _type: User + avatar: https://example.org/users/1/avatar + createdAt: "2014-05-21T08:51:20Z" + email: shep@mail.com + firstName: John + id: 1 + lastName: Sheppard + login: j.sheppard + status: active + updatedAt: "2014-05-21T08:51:20Z" + - _links: + delete: + href: "/api/v3/users/2" + method: DELETE + title: Delete j.sheppard2 + lock: + href: "/api/v3/users/2/lock" + method: POST + title: Set lock on j.sheppard2 + self: + href: "/api/v3/users/2" + title: Jim Sheppard - j.sheppard2 + _type: User + avatar: https://example.org/users/1/avatar + createdAt: "2014-05-21T08:51:20Z" + email: shep@mail.net + firstName: Jim + id: 2 + lastName: Sheppard + login: j.sheppard2 + status: active + updatedAt: "2014-05-21T08:51:20Z" + _links: + self: + href: "/api/v3/projects/42/available_assignees" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Available_AssigneesModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: + You are not allowed to see the assignable users for this + project. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view work packages + + *Note that you will only receive this error, if you are at least allowed to see the corresponding project.* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified project does not exist. + description: |- + Returned if the project does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view project + headers: {} + tags: + - Work Packages + description: + Gets a list of users that can be assigned to work packages in the + given project. + operationId: Available_assignees + summary: Available assignees + "/api/v3/projects/{id}/available_responsibles": + get: + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + delete: + href: "/api/v3/users/1" + method: DELETE + title: Delete j.sheppard + lock: + href: "/api/v3/users/1/lock" + method: POST + title: Set lock on j.sheppard + self: + href: "/api/v3/users/1" + title: John Sheppard - j.sheppard + _type: User + avatar: https://example.org/users/1/avatar + createdAt: "2014-05-21T08:51:20Z" + email: shep@mail.com + firstName: John + id: 1 + lastName: Sheppard + login: j.sheppard + status: active + updatedAt: "2014-05-21T08:51:20Z" + - _links: + delete: + href: "/api/v3/users/2" + method: DELETE + title: Delete j.sheppard2 + lock: + href: "/api/v3/users/2/lock" + method: POST + title: Set lock on j.sheppard2 + self: + href: "/api/v3/users/2" + title: Jim Sheppard - j.sheppard2 + _type: User + avatar: https://example.org/users/1/avatar + createdAt: "2014-05-21T08:51:20Z" + email: shep@mail.net + firstName: Jim + id: 2 + lastName: Sheppard + login: j.sheppard2 + status: active + updatedAt: "2014-05-21T08:51:20Z" + _links: + self: + href: "/api/v3/projects/42/available_responsibles" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Available_ResponsiblesModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: + You are not allowed to see the users available as responsible + for this project. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view work packages + + *Note that you will only receive this error, if you are at least allowed to see the corresponding project.* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified project does not exist. + description: |- + Returned if the project does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view project + headers: {} + tags: + - Work Packages + description: + Gets a list of users that can be assigned as the responsible of + a work package in the given project. + operationId: Available_responsibles + summary: Available responsibles + "/api/v3/projects/{id}/categories": + get: + parameters: + - description: ID of the project whose categories will be listed + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + defaultAssignee: + href: "/api/v3/users/42" + title: John Sheppard + project: + href: "/api/v3/projects/11" + title: Example project + self: + href: "/api/v3/categories/10" + title: Category with assignee + _type: Category + id: 10 + name: Foo + - _links: + project: + href: "/api/v3/projects/11" + self: + href: "/api/v3/categories/11" + _type: Category + id: 11 + name: Bar + _links: + self: + href: "/api/v3/projects/11/categories" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Categories_by_ProjectModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified project does not exist. + description: |- + Returned if the project does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view project + + *Note: A client without sufficient permissions shall not be able to test for the existence of a project. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + tags: + - Categories + description: "" + operationId: List_categories_of_a_project + summary: List categories of a project + "/api/v3/projects/{id}/types": + get: + parameters: + - description: ID of the project whose types will be listed + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + self: + href: "/api/v3/types/1" + _type: Type + color: "#ff0000" + createdAt: "2014-05-21T08:51:20Z" + id: 1 + isDefault: true + isMilestone: false + name: Bug + position: 1 + updatedAt: "2014-05-21T08:51:20Z" + - _links: + self: + href: "/api/v3/types/2" + _type: Type + color: "#888" + createdAt: "2014-05-21T08:51:20Z" + id: 2 + isDefault: false + isMilestone: false + name: Feature + position: 2 + updatedAt: "2014-05-21T08:51:20Z" + _links: + self: + href: "/api/v3/projects/11/types" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Types_by_ProjectModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified project does not exist. + description: |- + Returned if the project does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view work packages **or** manage types (on given project) + + *Note: A client without sufficient permissions shall not be able to test for the existence of a project. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + tags: + - Types + description: This endpoint lists the types that are *available* in a given project. + operationId: List_types_available_in_a_project + summary: List types available in a project + "/api/v3/projects/{id}/versions": + get: + parameters: + - description: ID of the project whose versions will be listed + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + availableInProjects: + href: "/api/v3/versions/11/projects" + definingProject: + href: "/api/v3/projects/11" + self: + href: "/api/v3/versions/11" + _type: Version + description: + format: plain + html: This version has a description + raw: This version has a description + endDate: + id: 11 + name: v3.0 Alpha + startDate: "2014-11-20" + status: Open + - _links: + availableInProjects: + href: "/api/v3/versions/12/projects" + definingProject: + href: "/api/v3/projects/11" + self: + href: "/api/v3/versions/12" + _type: Version + description: + format: plain + html: "" + raw: "" + endDate: + id: 12 + name: v2.0 + startDate: + status: Closed + - _links: + availableInProjects: + href: "/api/v3/versions/10/projects" + definingProject: + href: "/api/v3/projects/11" + self: + href: "/api/v3/versions/10" + _type: Version + description: + format: plain + html: "" + raw: "" + endDate: + id: 10 + name: v1.0 + startDate: + status: Open + _links: + self: + href: "/api/v3/projects/11/versions" + _type: Collection + count: 3 + total: 3 + schema: + "$ref": "#/components/schemas/Versions_by_ProjectModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified project does not exist. + description: |- + Returned if the project does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view work packages **or** manage versions (on given project) + + *Note: A client without sufficient permissions shall not be able to test for the existence of a project. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + tags: + - Versions + description: |- + This endpoint lists the versions that are *available* in a given project. + Note that due to sharing this might be more than the versions *defined* by that project. + operationId: List_versions_available_in_a_project + summary: List versions available in a project + "/api/v3/queries": + get: + summary: List queries + operationId: List_queries + tags: + - Queries + description: + Returns a collection of queries. The collection can be filtered + via query parameters similar to how work packages are filtered. Please note + however, that the filters are applied to the queries and not to the work packages + the queries in turn might return. + parameters: + - description: |- + JSON specifying filter conditions. + Currently supported filters are: + + + project: filters queries by the project they are assigned to. If the project filter is passed with the `!*` (not any) operator, global queries are returned. + + + id: filters queries based on their id + + + updated_at: filters queries based on the last time they where updated + example: '[{ "project_id": { "operator": "!*", "values": null }" }]' + in: query + name: filters + required: false + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + Queries: + "$ref": "#/components/examples/QueriesModel" + schema: + "$ref": "#/components/schemas/QueriesModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to see the queries. + description: |- + Returned if the client does not have sufficient permissions to see queries. + + **Required permission:** view work packages or manage public queries in any project + headers: {} + post: + summary: Create query + operationId: Create_query + tags: + - Queries + description: |- + When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. + The required fields of a Query can be found in its schema, which is embedded in the respective form. + Note that it is only allowed to provide properties or links supporting the write operation. + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/Query_Create_Form" + responses: + "201": + content: + application/hal+json: + examples: + Query: + "$ref": "#/components/examples/QueryModel" + schema: + "$ref": "#/components/schemas/QueryModel" + description: Created + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _embedded: + details: + attribute: project + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Project not found + description: |- + Returned if: + + * the client tries to modify a read-only property (`PropertyIsReadOnly`) + + * a constraint for a property was violated (`PropertyConstraintViolation`) + + * the client provides a link to an invalid resource (`ResourceTypeMismatch`), + e.g. a user, project or operator not found + headers: {} + "/api/v3/queries/available_projects": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + categories: + href: "/api/v3/projects/6/categories" + createWorkPackage: + href: "/api/v3/projects/6/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/6/work_packages" + method: post + self: + href: "/api/v3/projects/6" + title: A project + versions: + href: "/api/v3/projects/6/versions" + _type: Project + createdAt: "2015-07-06T13:28:14+00:00" + description: Eveniet molestias omnis quis aut qui eum adipisci. + id: 6 + identifier: a_project + name: A project + type: Customer Project + updatedAt: "2015-10-01T09:55:02+00:00" + - _links: + categories: + href: "/api/v3/projects/14/categories" + createWorkPackage: + href: "/api/v3/projects/14/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/14/work_packages" + method: post + self: + href: "/api/v3/projects/14" + title: Another project + versions: + href: "/api/v3/projects/14/versions" + _type: Project + createdAt: "2016-02-29T12:50:20+00:00" + description: "" + id: 14 + identifier: another_project + name: Another project + type: + updatedAt: "2016-02-29T12:50:20+00:00" + _links: + self: + href: "/api/v3/queries/available_projects" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Available_projects_for_queryModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view work packages + headers: {} + tags: + - Queries + description: + Gets a list of projects that are available as projects a query + can be assigned to. + operationId: Available_projects_for_query + summary: Available projects for query + "/api/v3/queries/columns/{id}": + get: + parameters: + - description: QueryColumn id + example: priority + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/queries/columns/priority" + title: Priority + _type: QueryColumn::Property + id: priority + name: Priority + schema: + "$ref": "#/components/schemas/Query_ColumnModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions to see it. + + **Required permission:** view work package in any project + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified query does not exist. + description: Returned if the QueryColumn does not exist. + headers: {} + tags: + - Query Columns + description: Retrieve an individual QueryColumn as identified by the `id` parameter. + operationId: View_Query_Column + summary: View Query Column + "/api/v3/queries/default": + get: + summary: View default query + operationId: View_default_query + tags: + - Queries + description: + Same as [viewing an existing, persisted Query](https://www.openproject.org/docs/api/endpoints/queries/#list-queries) + in its response, this resource returns an unpersisted query and by that allows + to get the default query configuration. The client may also provide additional + parameters which will modify the default query. + parameters: + - name: filters + description: |- + JSON specifying filter conditions. + The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. + All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). + example: '[{ "assignee": { "operator": "=", "values": ["1", "5"] }" }]' + in: query + required: false + schema: + default: '[{ "status_id": { "operator": "o", "values": null }}]' + type: string + - name: offset + description: Page number inside the queries' result collection of work packages. + example: "25" + in: query + required: false + schema: + default: 1 + type: integer + - name: pageSize + description: + Number of elements to display per page for the queries' result + collection of work packages. + example: "25" + in: query + required: false + schema: + type: integer + - name: sortBy + description: + JSON specifying sort criteria. The sort criteria is applied to + the query's result collection of work packages overriding the query's persisted + sort criteria. + example: '[["status", "asc"]]' + in: query + required: false + schema: + default: '[["id", "asc"]]' + type: string + - name: groupBy + description: + The column to group by. The grouping criteria is applied to the + to the query's result collection of work packages overriding the query's + persisted group criteria. + example: status + in: query + required: false + schema: + type: string + - name: showSums + description: + Indicates whether properties should be summed up if they support + it. The showSums parameter is applied to the to the query's result collection + of work packages overriding the query's persisted sums property. + example: true + in: query + required: false + schema: + default: false + type: boolean + - name: timestamps + description: + 'Indicates the timestamps to filter by when showing changed attributes + on work packages. Values can be either ISO8601 dates, ISO8601 durations + and the following relative date keywords: "oneDayAgo@HH:MM+HH:MM", "lastWorkingDay@HH:MM+HH:MM", + "oneWeekAgo@HH:MM+HH:MM", "oneMonthAgo@HH:MM+HH:MM". The first "HH:MM" part + represents the zero paded hours and minutes. The last "+HH:MM" part represents + the timezone offset from UTC associated with the time, the offset can be + positive or negative e.g."oneDayAgo@01:00+01:00", "oneDayAgo@01:00-01:00". + Values older than 1 day are accepted only with valid Enterprise Token available. + + ' + example: 2023-01-01,P-1Y,PT0S,lastWorkingDay@12:00 + in: query + required: false + schema: + default: PT0S + type: string + - name: timelineVisible + description: Indicates whether the timeline should be shown. + example: true + in: query + required: false + schema: + default: false + type: boolean + - name: timelineZoomLevel + description: + Indicates in what zoom level the timeline should be shown. Valid + values are `days`, `weeks`, `months`, `quarters`, and `years`. + example: days + in: query + required: false + schema: + default: days + type: string + - name: showHierarchies + description: Indicates whether the hierarchy mode should be enabled. + example: true + in: query + required: false + schema: + default: true + type: boolean + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + results: + _embedded: + elements: + - "<--- shortened for brevity --->" + _links: + changeSize: + href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + createWorkPackage: + href: "/api/v3/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/work_packages" + method: post + jumpTo: + href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + self: + href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + _type: WorkPackageCollection + count: 30 + offset: 1 + pageSize: 2 + total: 234 + _links: + columns: + - href: "/api/v3/queries/columns/id" + title: ID + - href: "/api/v3/queries/columns/subject" + title: Subject + - href: "/api/v3/queries/columns/type" + title: Type + - href: "/api/v3/queries/columns/status" + title: Status + - href: "/api/v3/queries/columns/priority" + title: Priority + - href: "/api/v3/queries/columns/assignee" + title: Assignee + - href: "/api/v3/queries/columns/updated_at" + title: Updated on + groupBy: + href: + title: + highlightedAttributes: [] + project: + href: + results: + href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + self: + href: "/api/v3/queries/default" + title: Default + sortBy: + - href: "/api/v3/queries/sort_bys/parent-desc" + title: Parent (Descending) + user: + href: "/api/v3/users/1" + title: OpenProject Admin + _type: Query + filters: + - _links: + filter: + href: "/api/v3/queries/filters/status" + title: Status + operator: + href: "/api/v3/queries/operators/o" + title: open + schema: + href: "/api/v3/queries/filter_instance_schemas/status" + values: [] + _type: StatusQueryFilter + name: Status + highlightingMode: inline + name: default + public: false + showHierarchies: true + starred: false + sums: false + timelineLabels: {} + timelineVisible: false + timelineZoomLevel: days + schema: + "$ref": "#/components/schemas/Default_QueryModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions to see the default query. + + **Required permission:** view work packages in any project + headers: {} + "/api/v3/queries/filter_instance_schemas": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _dependencies: + - _type: SchemaDependency + dependencies: + "/api/v3/queries/operators/!": + values: + _links: {} + hasDefault: false + name: Values + required: true + type: "[]User" + writable: true + "/api/v3/queries/operators/!*": {} + "/api/v3/queries/operators/*": {} + "/api/v3/queries/operators/=": + values: + _links: {} + hasDefault: false + name: Values + required: true + type: "[]User" + writable: true + "on": operator + _links: + filter: + href: "/api/v3/queries/filters/assignee" + title: Assignee + self: + href: "/api/v3/queries/filter_instance_schemas/assignee" + _type: QueryFilterInstanceSchema + filter: + _links: {} + hasDefault: false + name: Filter + required: true + type: QueryFilter + writable: true + name: + hasDefault: true + name: Name + required: true + type: String + writable: false + - _dependencies: + - _type: SchemaDependency + dependencies: + "/api/v3/queries/operators/!": + values: + _links: {} + hasDefault: false + name: Values + required: true + type: "[]User" + writable: true + "/api/v3/queries/operators/=": + values: + _links: {} + hasDefault: false + name: Values + required: true + type: "[]User" + writable: true + "on": operator + _links: + filter: + href: "/api/v3/queries/filters/author" + title: Author + self: + href: "/api/v3/queries/filter_instance_schemas/author" + _type: QueryFilterInstanceSchema + filter: + _links: {} + hasDefault: false + name: Filter + required: true + type: QueryFilter + writable: true + name: + hasDefault: true + name: Name + required: true + type: String + writable: false + _links: + self: + href: "/api/v3/queries/filter_instance_schemas" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Query_Filter_Instance_SchemasModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions to see it. + + **Required permission:** view work package in any project + headers: {} + tags: + - Query Filter Instance Schema + description: + Returns the list of QueryFilterInstanceSchemas defined for a global + query. That is a query not assigned to a project. + operationId: List_Query_Filter_Instance_Schemas + summary: List Query Filter Instance Schemas + "/api/v3/queries/filter_instance_schemas/{id}": + get: + parameters: + - description: + QueryFilterInstanceSchema identifier. The identifier is the filter + identifier. + example: author + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _dependencies: + - _type: SchemaDependency + dependencies: + "/api/v3/queries/operators/!": + values: + _links: {} + hasDefault: false + name: Values + required: true + type: "[]User" + writable: true + "/api/v3/queries/operators/=": + values: + _links: {} + hasDefault: false + name: Values + required: true + type: "[]User" + writable: true + "on": operator + _links: + filter: + href: "/api/v3/queries/filters/author" + title: Author + self: + href: "/api/v3/queries/filter_instance_schemas/author" + _type: QueryFilterInstanceSchema + filter: + _links: {} + hasDefault: false + name: Filter + required: true + type: QueryFilter + writable: true + name: + hasDefault: true + name: Name + required: true + type: String + writable: false + schema: + "$ref": "#/components/schemas/Query_Filter_Instance_SchemaModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions to see it. + + **Required permission:** view work package in any project + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified query does not exist. + description: Returned if the QueryFilterInstanceSchema does not exist. + headers: {} + tags: + - Query Filter Instance Schema + description: + Retrieve an individual QueryFilterInstanceSchema as identified + by the id parameter. + operationId: View_Query_Filter_Instance_Schema + summary: View Query Filter Instance Schema + "/api/v3/queries/filters/{id}": + get: + parameters: + - description: QueryFilter identifier + example: status + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/queries/filters/status" + title: Status + _type: QueryFilter + id: status + schema: + "$ref": "#/components/schemas/Query_FilterModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions to see it. + + **Required permission:** view work package in any project + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified query does not exist. + description: Returned if the QueryFilter does not exist. + headers: {} + tags: + - Query Filters + description: Retrieve an individual QueryFilter as identified by the id parameter. + operationId: View_Query_Filter + summary: View Query Filter + "/api/v3/queries/form": + post: + summary: Query Create Form + operationId: Query_Create_Form + tags: + - Queries + description: "" + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/Query_Create_Form" + responses: + "200": + description: OK + headers: {} + "/api/v3/queries/operators/{id}": + get: + parameters: + - description: QueryOperator id + example: "!" + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/queries/operators/!" + title: is not + _type: QueryOperator + id: "!" + name: is not + schema: + "$ref": "#/components/schemas/Query_OperatorModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions to see it. + + **Required permission:** view work package in any project + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified query does not exist. + description: Returned if the QueryOperator does not exist. + headers: {} + tags: + - Query Operators + description: + Retrieve an individual QueryOperator as identified by the `id` + parameter. + operationId: View_Query_Operator + summary: View Query Operator + "/api/v3/queries/schema": + get: + summary: View schema for global queries + operationId: View_schema_for_global_queries + tags: + - Queries + description: + Retrieve the schema for global queries, those, that are not assigned + to a project. + responses: + "200": + content: + application/hal+json: + examples: + QuerySchema: + "$ref": "#/components/examples/QuerySchemaModel" + schema: + "$ref": "#/components/schemas/Schema_For_Global_QueriesModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: "**Required permission:** view work package in any project" + headers: {} + "/api/v3/queries/sort_bys/{id}": + get: + parameters: + - description: + QuerySortBy identifier. The identifier is a combination of the + column identifier and the direction. + example: status-asc + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + column: + href: "/api/v3/queries/columns/status" + title: Status + direction: + href: urn:openproject-org:api:v3:queries:directions:asc + title: Ascending + self: + href: "/api/v3/queries/sort_bys/status-asc" + title: Status (Ascending) + _type: QuerySortBy + id: status-asc + name: Status (Ascending) + schema: + "$ref": "#/components/schemas/Query_Sort_ByModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions to see it. + + **Required permission:** view work package in any project + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified query does not exist. + description: Returned if the QuerySortBy does not exist. + headers: {} + tags: + - Query Sort Bys + description: Retrieve an individual QuerySortBy as identified by the id parameter. + operationId: View_Query_Sort_By + summary: View Query Sort By + "/api/v3/queries/{id}": + delete: + summary: Delete query + operationId: Delete_query + tags: + - Queries + description: Delete the query identified by the id parameter + parameters: + - description: Query id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "204": + description: No Content + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** for own queries none; for public queries: manage public queries + + *Note that you will only receive this error, if you are at least allowed to see the corresponding query.* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the query does not exist or the client does not have sufficient permissions to see it. + + **Required condition:** query belongs to user or query is public + + **Required permission:** view work package in queries project + headers: {} + get: + summary: View query + operationId: View_query + tags: + - Queries + description: + Retrieve an individual query as identified by the id parameter. + Then end point accepts a number of parameters that can be used to override + the resources' persisted parameters. + parameters: + - name: id + description: Query id + example: "1" + in: path + required: true + schema: + type: integer + - name: filters + description: |- + JSON specifying filter conditions. + The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters. + All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`). + example: '[{ "assignee": { "operator": "=", "values": ["1", "5"] }" }]' + in: query + required: false + schema: + default: '[{ "status_id": { "operator": "o", "values": null }}]' + type: string + - name: offset + description: Page number inside the queries' result collection of work packages. + example: "25" + in: query + required: false + schema: + default: 1 + type: integer + - name: pageSize + description: + Number of elements to display per page for the queries' result + collection of work packages. + example: "25" + in: query + required: false + schema: + type: integer + - name: columns + description: Selected columns for the table view. + example: "[]" + in: query + required: false + schema: + default: "['type', 'priority']" + type: string + - name: sortBy + description: + JSON specifying sort criteria. The sort criteria is applied to + the query's result collection of work packages overriding the query's persisted + sort criteria. + example: '[["status", "asc"]]' + in: query + required: false + schema: + default: '[["id", "asc"]]' + type: string + - name: groupBy + description: + The column to group by. The grouping criteria is applied to the + to the query's result collection of work packages overriding the query's + persisted group criteria. + example: status + in: query + required: false + schema: + type: string + - name: showSums + description: + Indicates whether properties should be summed up if they support + it. The showSums parameter is applied to the to the query's result collection + of work packages overriding the query's persisted sums property. + example: true + in: query + required: false + schema: + default: false + type: boolean + - name: timestamps + description: + 'Indicates the timestamps to filter by when showing changed attributes + on work packages. Values can be either ISO8601 dates, ISO8601 durations + and the following relative date keywords: "oneDayAgo@HH:MM+HH:MM", "lastWorkingDay@HH:MM+HH:MM", + "oneWeekAgo@HH:MM+HH:MM", "oneMonthAgo@HH:MM+HH:MM". The first "HH:MM" part + represents the zero paded hours and minutes. The last "+HH:MM" part represents + the timezone offset from UTC associated with the time, the offset can be + positive or negative e.g."oneDayAgo@01:00+01:00", "oneDayAgo@01:00-01:00". + Values older than 1 day are accepted only with valid Enterprise Token available. + + ' + example: 2023-01-01,P-1Y,PT0S,lastWorkingDay@12:00 + in: query + required: false + schema: + default: PT0S + type: string + - name: timelineVisible + description: Indicates whether the timeline should be shown. + example: true + in: query + required: false + schema: + default: false + type: boolean + - name: timelineLabels + description: Overridden labels in the timeline view + example: "{}" + in: query + required: false + schema: + default: "{}" + type: string + - name: highlightingMode + description: Highlighting mode for the table view. + example: inline + in: query + required: false + schema: + default: inline + type: string + - name: highlightedAttributes + description: + Highlighted attributes mode for the table view when `highlightingMode` + is `inline`. When set to `[]` all highlightable attributes will be returned + as `highlightedAttributes`. + example: "[]" + in: query + required: false + schema: + default: "['type', 'priority']" + type: string + - name: showHierarchies + description: Indicates whether the hierarchy mode should be enabled. + example: true + in: query + required: false + schema: + default: true + type: boolean + responses: + "200": + content: + application/hal+json: + examples: + Query: + "$ref": "#/components/examples/QueryModel" + schema: + "$ref": "#/components/schemas/QueryModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified query does not exist. + description: |- + Returned if the query does not exist or the client does not have sufficient permissions to see it. + + **Required condition:** query belongs to user or query is public + + **Required permission:** view work package in queries project + headers: {} + patch: + summary: Edit Query + operationId: Edit_Query + tags: + - Queries + description: |- + When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body. + Note that it is only allowed to provide properties or links supporting the **write** operation. + parameters: + - description: Query id + example: "1" + in: path + name: id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/Query_Update_Form" + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + highlightedAttributes: [] + results: + _embedded: + elements: + - "<--- shortened for brevity --->" + _links: + changeSize: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + createWorkPackage: + href: "/api/v3/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/work_packages" + method: post + jumpTo: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + self: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + _type: WorkPackageCollection + count: 30 + offset: 1 + pageSize: 2 + total: 234 + _links: + columns: + - href: "/api/v3/queries/columns/id" + title: ID + - href: "/api/v3/queries/columns/subject" + title: Subject + - href: "/api/v3/queries/columns/type" + title: Type + - href: "/api/v3/queries/columns/status" + title: Status + - href: "/api/v3/queries/columns/priority" + title: Priority + - href: "/api/v3/queries/columns/assignee" + title: Assignee + - href: "/api/v3/queries/columns/updated_at" + title: Updated on + groupBy: + href: + title: + highlightedAttributes: [] + project: + href: "/api/v3/projects/3" + title: copy + results: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + self: + href: "/api/v3/queries/9" + title: fdsfdsfdsf + sortBy: + - href: "/api/v3/queries/sort_bys/parent-desc" + title: Parent (Descending) + user: + href: "/api/v3/users/1" + title: OpenProject Admin + _type: Query + createdAt: "2015-03-20T12:56:56Z" + filters: + - _links: + filter: + href: "/api/v3/queries/filters/status" + title: Status + operator: + href: "/api/v3/queries/operators/o" + title: open + schema: + href: "/api/v3/queries/filter_instance_schemas/status" + values: [] + _type: StatusQueryFilter + name: Status + - _links: + filter: + href: "/api/v3/queries/filters/dueDate" + title: Finish date + operator: + href: "/api/v3/queries/operators/" + _links: + changeSize: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + createWorkPackage: + href: "/api/v3/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/work_packages" + method: post + jumpTo: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + self: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + _type: WorkPackageCollection + count: 30 + offset: 1 + pageSize: 2 + total: 234 + _links: + columns: + - href: "/api/v3/queries/columns/id" + title: ID + - href: "/api/v3/queries/columns/subject" + title: Subject + - href: "/api/v3/queries/columns/type" + title: Type + - href: "/api/v3/queries/columns/status" + title: Status + - href: "/api/v3/queries/columns/priority" + title: Priority + - href: "/api/v3/queries/columns/assignee" + title: Assignee + - href: "/api/v3/queries/columns/updated_at" + title: Updated on + groupBy: + href: + title: + project: + href: "/api/v3/projects/3" + title: copy + results: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + self: + href: "/api/v3/queries/9" + title: fdsfdsfdsf + sortBy: + - href: "/api/v3/queries/sort_bys/parent-desc" + title: Parent (Descending) + user: + href: "/api/v3/users/1" + title: OpenProject Admin + _type: Query + createdAt: "2015-03-20T12:56:56Z" + filters: + - _links: + filter: + href: "/api/v3/queries/filters/status" + title: Status + operator: + href: "/api/v3/queries/operators/o" + title: open + schema: + href: "/api/v3/queries/filter_instance_schemas/status" + values: [] + _type: StatusQueryFilter + name: Status + - _links: + filter: + href: "/api/v3/queries/filters/dueDate" + title: Finish date + operator: + href: "/api/v3/queries/operators/" + _links: + changeSize: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + createWorkPackage: + href: "/api/v3/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/work_packages" + method: post + jumpTo: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + self: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + _type: WorkPackageCollection + count: 30 + offset: 1 + pageSize: 2 + total: 234 + _links: + columns: + - href: "/api/v3/queries/columns/id" + title: ID + - href: "/api/v3/queries/columns/subject" + title: Subject + - href: "/api/v3/queries/columns/type" + title: Type + - href: "/api/v3/queries/columns/status" + title: Status + - href: "/api/v3/queries/columns/priority" + title: Priority + - href: "/api/v3/queries/columns/assignee" + title: Assignee + - href: "/api/v3/queries/columns/updated_at" + title: Updated on + groupBy: + href: + title: + project: + href: "/api/v3/projects/3" + title: copy + results: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + self: + href: "/api/v3/queries/9" + title: fdsfdsfdsf + sortBy: + - href: "/api/v3/queries/sort_bys/parent-desc" + title: Parent (Descending) + user: + href: "/api/v3/users/1" + title: OpenProject Admin + _type: Query + createdAt: "2015-03-20T12:56:56Z" + filters: + - _links: + filter: + href: "/api/v3/queries/filters/status" + title: Status + operator: + href: "/api/v3/queries/operators/o" + title: open + schema: + href: "/api/v3/queries/filter_instance_schemas/status" + values: [] + _type: StatusQueryFilter + name: Status + - _links: + filter: + href: "/api/v3/queries/filters/dueDate" + title: Finish date + operator: + href: "/api/v3/queries/operators/Hello world! This is + markdown!

+ schema: + "$ref": "#/components/schemas/MarkdownModel" + description: OK + headers: {} + "400": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRenderContext + message: Could not render markdown string in the given context. + description: |- + Returned if the context passed by the client is not valid (e.g. unknown). + + Note that this response will also occur when the requesting user + is not allowed to see the context resource (e.g. limited work package visibility). + headers: {} + "415": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:TypeNotSupported + message: Expected Content-Type to be 'text/plain' but got 'application/json'. + description: + Returned if the Content-Type indicated in the request is not + `text/plain`. + headers: {} + tags: + - Previewing + description: "" + operationId: Preview_Markdown_document + summary: Preview Markdown document + "/api/v3/render/plain": + post: + responses: + "200": + content: + text/html: + examples: + response: + value: "

Hello world! This *is* plain text!

\n" + schema: + "$ref": "#/components/schemas/Plain_TextModel" + description: OK + headers: {} + "415": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:TypeNotSupported + message: Expected Content-Type to be 'text/plain' but got 'application/json'. + description: + Returned if the Content-Type indicated in the request is not + `text/plain`. + headers: {} + tags: + - Previewing + description: "" + operationId: Preview_plain_document + summary: Preview plain document + "/api/v3/revisions/{id}": + get: + parameters: + - description: Revision id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + author: + href: "/api/v3/users/1" + project: + href: "/api/v3/projects/1" + self: + href: "/api/v3/revisions/1" + showRevision: + href: "/projects/identifier/repository/revision/11f4b07" + _type: Revision + authorName: Some Developer + createdAt: "2015-07-21T13:36:59Z" + formattedIdentifier: 11f4b07 + id: 1 + identifier: 11f4b07dff4f4ce9548a52b7d002daca7cd63ec6 + message: + format: plain + html: + "

This revision provides new features

An elaborate + description

" + raw: |- + This revision provides new features + + An elaborate description + schema: + "$ref": "#/components/schemas/RevisionModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified revision does not exist. + description: |- + Returned if the revision does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view changesets for the project the repository is created in. + + *Note: A client without sufficient permissions shall not be able to test for the existence of a revision. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + tags: + - Revisions + description: "" + operationId: View_revision + summary: View revision + "/api/v3/roles": + get: + parameters: + - description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + Currently supported filters are: + + + grantable: filters roles based on whether they are selectable for a membership + + + unit: filters roles based on the unit ('project' or 'system') for which they are selectable for a membership + example: '[{ "unit": { "operator": "=", "values": ["system"] }" }]' + in: query + name: filters + required: false + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + self: + href: "/api/v3/roles/3" + title: Manager + _type: Role + id: 3 + name: Manager + - _links: + self: + href: "/api/v3/roles/2" + title: Anonymous + _type: Role + id: 2 + name: Anonymous + - _links: + self: + href: "/api/v3/roles/5" + title: Reader + _type: Role + id: 5 + name: Reader + - _links: + self: + href: "/api/v3/roles/4" + title: Member + _type: Role + id: 4 + name: Member + - _links: + self: + href: "/api/v3/roles/1" + title: Non member + _type: Role + id: 1 + name: Non member + _links: + self: + href: "/api/v3/roles" + _type: Collection + count: 5 + total: 5 + schema: + "$ref": "#/components/schemas/RolesModel" + description: OK + headers: {} + tags: + - Roles + description: + List all defined roles. This includes built in roles like 'Anonymous' + and 'Non member'. + operationId: List_roles + summary: List roles + "/api/v3/roles/{id}": + get: + parameters: + - description: Role id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/roles/3" + title: Manager + _type: Role + id: 3 + name: Manager + schema: + "$ref": "#/components/schemas/RoleModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to view this resource. + description: |- + Returned if the client does not have sufficient permissions to see roles. + + **Required permission:** view members **or** manage members + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: Returned if the role does not exist. + headers: {} + tags: + - Roles + description: Fetch an individual role. + operationId: View_role + summary: View role + "/api/v3/statuses": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + self: + href: "/api/v3/statuses/1" + _type: Status + defaultDoneRatio: 0 + id: 1 + isClosed: false + isDefault: true + name: New + position: 1 + - _links: + self: + href: "/api/v3/statuses/3" + _type: Status + defaultDoneRatio: 75 + id: 3 + isClosed: false + isDefault: false + isReadonly: false + name: Resolved + position: 3 + - _links: + self: + href: "/api/v3/statuses/4" + _type: Status + defaultDoneRatio: 25 + id: 4 + isClosed: false + isDefault: false + name: Feedback + position: 4 + - _links: + self: + href: "/api/v3/statuses/5" + _type: Status + defaultDoneRatio: 100 + id: 5 + isClosed: true + isDefault: false + name: Closed + position: 5 + - _links: + self: + href: "/api/v3/statuses/6" + _type: Status + defaultDoneRatio: 100 + id: 6 + isClosed: true + isDefault: false + name: Rejected + position: 6 + - _links: + self: + href: "/api/v3/statuses/2" + _type: Status + defaultDoneRatio: 50 + id: 2 + isClosed: false + isDefault: false + name: In Progress + position: 3 + _links: + self: + href: "/api/v3/statuses" + _type: Collection + count: 6 + total: 6 + schema: + "$ref": "#/components/schemas/StatusesModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to see the statuses. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view work package (on any project) + headers: {} + tags: + - Statuses + description: "" + operationId: List_all_Statuses + summary: List all Statuses + "/api/v3/statuses/{id}": + get: + parameters: + - description: Status id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/statuses/1" + _type: Status + defaultDoneRatio: 0 + id: 1 + isClosed: false + isDefault: true + name: New + position: 1 + schema: + "$ref": "#/components/schemas/StatusModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to see this status. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view work package (on any project) + headers: {} + tags: + - Statuses + description: "" + operationId: View_Status + summary: View Status + "/api/v3/storages": + post: + summary: Creates a storage. + operationId: create_storage + tags: + - File links + description: |- + Creates a storage resource. When creating a storage, a confidential OAuth 2 provider application is created + automatically. The oauth client id and secret of the created OAuth application are returned in the response. + + **IMPORTANT:** This is the only time, the oauth client secret is visible to the consumer. After that, the secret is + hidden. + + To update the storage with OAuth client credentials, which enable the storage resource to behave as an OAuth 2 + client against an external OAuth 2 provider application, another request must be made to create those, see + `POST /api/v3/storages/{id}/oauth_client_credentials`. + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/StorageWriteModel" + responses: + "201": + description: Created + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/StorageReadModel" + "/api/v3/storages/{id}": + get: + summary: Get a storage + operationId: get_storage + tags: + - File links + description: |- + Gets a storage resource. As a side effect, a live connection to the storages origin is established to retrieve + connection state data. + parameters: + - name: id + description: Storage id + in: path + required: true + schema: + type: integer + example: 1337 + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/StorageReadModel" + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the storage does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view file links + patch: + summary: Update a storage + operationId: update_storage + tags: + - File links + description: |- + Updates a storage resource. Only data that is not generated by the server can be updated. This excludes the OAuth 2 + application data. + parameters: + - name: id + description: Storage id + in: path + required: true + schema: + type: integer + example: 1337 + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/StorageWriteModel" + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/StorageReadModel" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** admin + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the storage does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view file links + delete: + summary: Delete a storage + operationId: delete_storage + tags: + - File links + description: |- + Deletes a storage resource. This also deletes all related records, like the created oauth application, client, and + any file links created within this storage. + parameters: + - name: id + description: Storage id + in: path + required: true + schema: + type: integer + example: 1337 + responses: + "204": + description: No content + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** admin + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the storage does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view file links + "/api/v3/storages/{id}/files": + get: + summary: Gets files of a storage. + operationId: get_storage_files + tags: + - File links + description: |- + Gets a collection of files from a storage. + + If no `parent` context is given, the result is the content of the document root. With `parent` context given, the + result contains the collections of files/directories from within the given parent file id. + + If given `parent` context is no directory, `400 Bad Request` is returned. + parameters: + - name: id + description: Storage id + in: path + required: true + schema: + type: integer + example: 1337 + - name: parent + description: Parent file identification + in: query + required: false + schema: + type: string + example: "/my/data" + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/StorageFilesModel" + "400": + description: + Returned if the given parent parameter value does not refer + to a directory. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery + message: The given parent is not a directory. + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned in either of those cases: + - if the storage does not exist or the client does not have sufficient permissions to see it + + **Required permission:** view file links + - if the document root file identification does not exist on the storage + "/api/v3/storages/{id}/files/prepare_upload": + post: + summary: Preparation of a direct upload of a file to the given storage. + operationId: prepare_storage_file_upload + tags: + - File links + description: |- + Executes a request that prepares a link for a direct upload to the storage. + + The background here is, that the client needs to make a direct request to the storage instance for file uploading, + but should not get access to the credentials, which are stored in the backend. The response contains a link object, + that enables the client to execute a file upload without the real credentials. + parameters: + - name: id + description: Storage id + in: path + required: true + schema: + type: integer + example: 1337 + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/StorageFileUploadPreparationModel" + responses: + "201": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/StorageFileUploadLinkModel" + "400": + description: + Returned if the given parent parameter value does not refer + to a directory. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery + message: The given parent is not a directory. + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** manage file links + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the storage does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view file links + "500": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:OutboundRequest:NotFound + message: + An outbound request to another resource has failed with status + code 404. + description: + Returned if the outbound request to the storage has failed + with any reason. + "/api/v3/storages/{id}/oauth_client_credentials": + post: + summary: Creates an oauth client credentials object for a storage. + operationId: create_storage_oauth_credentials + tags: + - File links + description: |- + Inserts the OAuth 2 credentials into the storage, to allow the storage to act as an OAuth 2 client. Calling this + endpoint on a storage that already contains OAuth 2 client credentials will replace them. + parameters: + - name: id + description: Storage id + in: path + required: true + schema: + type: integer + example: 1337 + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/OAuthClientCredentialsWriteModel" + responses: + "201": + description: Created + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/StorageReadModel" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** admin + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the storage does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view file links + "/api/v3/time_entries": + get: + summary: List time entries + operationId: list_time_entries + tags: + - Time entries + description: |- + Lists time entries. The time entries returned depend on the filters + provided and also on the permission of the requesting user. + parameters: + - name: offset + description: Page number inside the requested collection. + example: 25 + in: query + required: false + schema: + default: 1 + type: integer + - name: pageSize + description: Number of elements to display per page. + example: "25" + in: query + required: false + schema: + type: integer + - name: sortBy + description: |- + JSON specifying sort criteria. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported sorts are: + + + id: Sort by primary key + + + hours: Sort by logged hours + + + spent_on: Sort by spent on date + + + created_at: Sort by time entry creation datetime + + + updated_at: Sort by the time the time entry was updated last + example: '[["spent_on", "asc"]]' + in: query + required: false + schema: + default: '["spent_on", "asc"]' + type: string + - name: filters + description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + + + work_package: Filter time entries by work package + + + project: Filter time entries by project + + + user: Filter time entries by users + + + ongoing: Filter for your ongoing timers + + + spent_on: Filter time entries by spent on date + + + created_at: Filter time entries by creation datetime + + + updated_at: Filter time entries by the last time they where updated + + + activity: Filter time entries by time entry activity + example: + '[{ "work_package": { "operator": "=", "values": ["1", "2"] } }, + { "project": { "operator": "=", "values": ["1"] } }]' + in: query + required: false + schema: + type: string + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/TimeEntryCollectionModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + description: Returned if the client is not logged in and login is required. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to view this resource. + post: + summary: Create time entry + tags: + - Time entries + description: |- + Creates a new time entry applying the attributes provided in the body. + Please note that while there is a fixed set of attributes, custom fields can extend + a time entries' attributes and are accepted by the endpoint. + operationId: create_time_entry + responses: + "201": + description: Created + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/TimeEntryModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** Log time + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + description: |- + Returned if: + + * a constraint for a property was violated (`PropertyConstraintViolation`) + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _embedded: + details: + attribute: workPackage + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Work package is invalid. + "/api/v3/time_entries/{id}/form": + post: + parameters: + - description: Time entries activity id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions to edit the time entry. + + **Required permission:** *edit time entries* for every time entry of a project, or *edit own time entries* for time entries belonging to the user. + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the time entry does not exist or if the client does not have sufficient permissions to view it. + + **Required permission** `view time entries` in the project the time entry is assigned to or `view own time entries` for time entries belonging to the user + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Time Entries + description: "" + operationId: Time_entry_update_form + requestBody: + content: + application/json: + schema: + type: integer + description: Time entries activity id + required: true + summary: Time entry update form + "/api/v3/time_entries/activity/{id}": + get: + summary: View time entries activity + operationId: get_time_entries_activity + tags: + - Time entry activities + description: Fetches the time entry activity resource by the given id. + parameters: + - name: id + description: Time entries activity id + in: path + example: 1 + required: true + schema: + type: integer + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/TimeEntryActivityModel" + "404": + description: |- + Returned if the activity does not exist or if the user does not have permission to view them. + + **Required permission** `view time entries`, `log time`, `edit time entries`, `edit own time entries` or + `manage project activities` in any project + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + "/api/v3/time_entries/available_projects": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _type: Project... + - _type: Project... + _links: + self: + href: "/api/v3/time_entries/available_projects" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Available_projects_for_time_entriesModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** *log time*, *edit time entries* or *edit own time entries* in any project + headers: {} + tags: + - Time Entries + description: + Gets a list of projects in which a time entry can be created in + or be assigned to on update. The list contains all projects in which the user + issuing the request has the necessary permissions. + operationId: Available_projects_for_time_entries + summary: Available projects for time entries + "/api/v3/time_entries/form": + post: + responses: + "200": + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** *log time* in any project + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Time Entries + description: "" + operationId: Time_entry_create_form + summary: Time entry create form + "/api/v3/time_entries/schema": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _dependencies: [] + _links: + self: + href: "/api/v3/time_entries/schema" + _type: Schema + activity: + _links: {} + hasDefault: true + location: _links + name: Activity + required: true + type: TimeEntriesActivity + writable: true + createdAt: + hasDefault: false + name: Created on + options: {} + required: true + type: DateTime + writable: false + customField29: + hasDefault: false + name: sfsdfsdfsdfsdfdsf + options: + rtl: + required: false + type: String + writable: true + hours: + hasDefault: false + name: Hours + options: {} + required: true + type: Duration + writable: true + id: + hasDefault: false + name: ID + options: {} + required: true + type: Integer + writable: false + project: + _links: {} + hasDefault: false + location: _links + name: Project + required: false + type: Project + writable: true + ongoing: + hasDefault: false + name: Ongoing + options: {} + required: false + type: Boolean + writable: true + spentOn: + hasDefault: false + name: Date + options: {} + required: true + type: Date + writable: true + updatedAt: + hasDefault: false + name: Updated on + options: {} + required: true + type: DateTime + writable: false + user: + hasDefault: false + name: User + options: {} + required: true + type: User + writable: false + workPackage: + _links: {} + hasDefault: false + location: _links + name: Work package + required: false + type: WorkPackage + writable: true + schema: + "$ref": "#/components/schemas/View_time_entry_schemaModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions to see the schema. + + **Required permission:** *log time* or *view time entries* or *edit time entries* or *edit own time entries* on any project + headers: {} + tags: + - Time Entries + description: "" + operationId: View_time_entry_schema + summary: View time entry schema + "/api/v3/time_entries/{id}": + delete: + summary: Delete time entry + tags: + - Time entries + description: Permanently deletes the specified time entry. + operationId: delete_time_entry + parameters: + - name: id + description: Time entry id + example: 1 + in: path + required: true + schema: + type: integer + responses: + "204": + description: Returned if the time entry was deleted successfully. + "403": + description: Returned if the client does not have sufficient permissions + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + "404": + description: |- + Returned if the time entry does not exist or if the user does not have sufficient permissions to see the time entry. + + **Required permission** `view time entries` in the project the time entry is assigned to or `view own time entries` for time entries belonging to the user + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + get: + summary: Get time entry + tags: + - Time entries + description: Retrieves a single time entry identified by the given id. + operationId: get_time_entry + parameters: + - name: id + description: time entry id + example: 1 + in: path + required: true + schema: + type: integer + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/TimeEntryModel" + "404": + description: |- + Returned if the time entry does not exist or if the user does not have permission to view them. + + **Required permission** + - `view time entries` in the project the time entry is assigned to or + - `view own time entries` for time entries belonging to the user + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + patch: + summary: update time entry + tags: + - Time Entries + description: |- + Updates the given time entry by applying the attributes provided in + the body. Please note that while there is a fixed set of attributes, custom fields + can extend a time entries' attributes and are accepted by the endpoint. + operationId: update_time_entry + parameters: + - name: id + description: Time entry id + example: 1 + in: path + required: true + schema: + type: integer + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/TimeEntryModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** Edit (own) time entries, depending on what time entry is being modified. + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + description: |- + Returned if: + + * a constraint for a property was violated (`PropertyConstraintViolation`) + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _embedded: + details: + attribute: workPackage + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Work package is invalid. + "/api/v3/types": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + self: + href: "/api/v3/types/1" + _type: Type + color: "#ff0000" + createdAt: "2014-05-21T08:51:20Z" + id: 1 + isDefault: true + isMilestone: false + name: Bug + position: 1 + updatedAt: "2014-05-21T08:51:20Z" + - _links: + self: + href: "/api/v3/types/2" + _type: Type + color: "#888" + createdAt: "2014-05-21T08:51:20Z" + id: 2 + isDefault: false + isMilestone: false + name: Feature + position: 2 + updatedAt: "2014-05-21T08:51:20Z" + _links: + self: + href: "/api/v3/types" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/TypesModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to see the types. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view work package or manage types (on any project) + headers: {} + tags: + - Types + description: "" + operationId: List_all_Types + summary: List all Types + "/api/v3/types/{id}": + get: + parameters: + - description: Type id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + self: + href: "/api/v3/types/1" + _type: Type + color: "#ff0000" + createdAt: "2014-05-21T08:51:20Z" + id: 1 + isDefault: true + isMilestone: false + name: Bug + position: 1 + updatedAt: "2014-05-21T08:51:20Z" + schema: + "$ref": "#/components/schemas/TypeModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to see this type. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view work package or manage types (on any project) + headers: {} + tags: + - Types + description: "" + operationId: View_Type + summary: View Type + "/api/v3/users": + get: + summary: List Users + operationId: list_Users + description: + Lists users. Only administrators or users with manage_user global + permission have permission to do this. + tags: + - Users + parameters: + - description: Page number inside the requested collection. + example: "25" + in: query + name: offset + required: false + schema: + default: 1 + type: integer + - description: Number of elements to display per page. + example: "25" + in: query + name: pageSize + required: false + schema: + type: integer + - description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) + endpoint. Currently supported filters are: + + + status: Status the user has + + + group: Name of the group in which to-be-listed users are members. + + + name: Filter users in whose first or last names, or email addresses the given string occurs. + + + login: User's login + example: + '[{ "status": { "operator": "=", "values": ["invited"] } }, { "group": + { "operator": "=", "values": ["1"] } }, { "name": { "operator": "=", "values": + ["h.wurst@openproject.com"] } }]' + in: query + name: filters + required: false + schema: + type: string + - description: |- + JSON specifying sort criteria. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + example: '[["status", "asc"]]' + in: query + name: sortBy + required: false + schema: + type: string + - description: Comma separated list of properties to include. + example: total,elements/name,elements/self,self + in: query + name: select + required: false + schema: + type: string + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/UserCollectionModel" + description: OK + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to list users. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** Administrator + post: + summary: Create User + operationId: create_user + tags: + - Users + description: |- + Creates a new user. Only administrators and users with manage_user global permission are allowed to do so. + When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. + + Valid values for `status`: + + 1) "active" - In this case a password has to be provided in addition to the other attributes. + + 2) "invited" - In this case nothing but the email address is required. The rest is optional. An invitation will be sent to the user. + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/UserCreateModel" + responses: + "201": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/UserModel" + description: Created + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to create new users. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** Administrator + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _embedded: + details: + attribute: email + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: The email address is already taken. + description: |- + Returned if: + + * a constraint for a property was violated (`PropertyConstraintViolation`) + "/api/v3/users/schema": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _dependencies: [] + _links: + self: + href: "/api/v3/users/schema" + _type: Schema + admin: + hasDefault: false + name: Administrator + options: {} + required: false + type: Boolean + writable: true + avatar: + hasDefault: false + name: Avatar + options: {} + required: false + type: String + writable: false + createdAt: + hasDefault: false + name: Created on + options: {} + required: true + type: DateTime + writable: false + customField1: + hasDefault: false + name: User String CF + required: false + type: String + writable: true + customField2: + hasDefault: false + location: _links + name: User List cf + required: false + type: CustomOption + writable: true + firstName: + hasDefault: false + maxLength: 255 + minLength: 1 + name: First name + options: {} + required: true + type: String + writable: false + id: + hasDefault: false + name: ID + options: {} + required: true + type: Integer + writable: false + identityUrl: + hasDefault: false + name: Identity url + options: {} + required: false + type: String + writable: true + language: + hasDefault: false + name: Language + options: {} + required: false + type: String + writable: true + lastName: + hasDefault: false + maxLength: 255 + minLength: 1 + name: Last name + options: {} + required: true + type: String + writable: false + login: + hasDefault: false + maxLength: 255 + minLength: 1 + name: Username + options: {} + required: true + type: String + writable: true + mail: + hasDefault: false + maxLength: 255 + minLength: 1 + name: Email + options: {} + required: true + type: String + writable: true + password: + hasDefault: false + name: Password + options: {} + required: false + type: Password + writable: false + status: + hasDefault: false + name: Status + options: {} + required: false + type: String + writable: true + updatedAt: + hasDefault: false + name: Updated on + options: {} + required: true + type: DateTime + writable: false + schema: + "$ref": "#/components/schemas/View_user_schemaModel" + description: OK + headers: {} + tags: + - Users + description: + The schema response use two exemplary custom fields that extend + the schema response. Depending on your instance and custom field configuration, + the response will look somewhat different. + operationId: View_user_schema + summary: View user schema + "/api/v3/users/{id}": + delete: + summary: Delete user + operationId: delete_user + description: Permanently deletes the specified user account. + tags: + - Users + parameters: + - description: User id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "202": + description: |- + Returned if the account was deleted successfully. + + Note that the response body is empty as of now. In future versions of the API a body + *might* be returned, indicating the progress of deletion. + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to delete the account of this user. + description: |- + Returned if the client does not have sufficient permissions or if deletion of users was disabled in the instance wide settings. + + **Required permission:** Administrators only (exception: users might be able to delete their own accounts) + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified user does not exist. + description: Returned if the user does not exist. + get: + summary: View user + operationId: view_user + description: "" + tags: + - Users + parameters: + - description: User id. Use `me` to reference current user, if any. + example: "1" + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/UserModel" + description: OK + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: + The specified user does not exist or you do not have permission + to view them. + description: |- + Returned if the user does not exist or if the API user does not have permission to view them. + + **Required permission** The user needs to be locked in if the installation is configured to prevent anonymous access + patch: + summary: Update user + operationId: update_user + tags: + - Users + description: |- + Updates the user's writable attributes. + When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. + parameters: + - description: User id + example: "1" + in: path + name: id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/UserCreateModel" + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/UserModel" + description: OK + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to update the account of this user. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** Administrators, manage_user global permission + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: + The specified user does not exist or you do not have permission + to view them. + description: |- + Returned if the user does not exist or if the API user does not have the necessary permissions to update it. + + **Required permission:** Administrators only (exception: users may update their own accounts) + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _embedded: + details: + attribute: email + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: The email address is already taken. + description: |- + Returned if: + + * the client tries to modify a read-only property (`PropertyIsReadOnly`) + + * a constraint for a property was violated (`PropertyConstraintViolation`) + "/api/v3/users/{id}/form": + post: + parameters: + - description: User id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** manage_user global permission + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the request user can not be found. + + *Note: A client without sufficient permissions shall not be able to test for the existence of + a membership. That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Users + description: "" + operationId: User_update_form + summary: User update form + "/api/v3/users/{id}/lock": + delete: + summary: Unlock user + operationId: unlock_user + tags: + - Users + parameters: + - description: User id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/UserModel" + description: OK + "400": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidUserStatusTransition + message: The current user account status does not allow this operation. + description: |- + Returned if the client tries to unlock a user account whose current status does not allow this transition. + + **Required permission:** Administrators only + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to unlock the account of this user. + description: |- + Returned if the client does not have sufficient permissions for unlocking a user. + + **Required permission:** Administrators only + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified user does not exist. + description: Returned if the user does not exist. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + post: + summary: Lock user + operationId: lock_user + tags: + - Users + parameters: + - description: User id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/UserModel" + description: OK + "400": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidUserStatusTransition + message: The current user account status does not allow this operation. + description: |- + Returned if the client tries to lock a user account whose current status does not allow this transition. + + **Required permission:** Administrators only + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to lock the account of this user. + description: |- + Returned if the client does not have sufficient permissions for locking a user. + + **Required permission:** Administrators only + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified user does not exist. + description: Returned if the user does not exist. + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "/api/v3/values/schema/{id}": + get: + parameters: + - name: id + in: path + description: |- + The identifier of the value. This is typically the value of the `property` property of + the `Values` resource. It should be in lower camelcase format. + example: startDate + required: true + schema: + type: string + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/SchemaModel" + examples: + Values::Property Start date schema: + "$ref": "#/components/examples/ValuesPropertyStartDateSchema" + Values::Property Due date schema: + "$ref": "#/components/examples/ValuesPropertyDueDateSchema" + Values::Property Date schema for Milestone work package: + "$ref": "#/components/examples/ValuesPropertyDateSchema" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: Returned if the schema does not exist. + "400": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:BadRequest + message: "Bad request: property is invalid" + description: + Returned if the requested property id is not in a lower camel + case format. + tags: + - Values::Property + description: The schema of a `Values` resource. + operationId: View_values_schema + summary: View Values schema + "/api/v3/versions": + get: + parameters: + - description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + Currently supported filters are: + + + sharing: filters versions by how they are shared within the server (*none*, *descendants*, *hierarchy*, *tree*, *system*). + example: '[{ "sharing": { "operator": "*", "values": ["system"] }" }]' + in: query + name: filters + required: false + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + availableInProjects: + href: "/api/v3/versions/11/projects" + definingProject: + href: "/api/v3/projects/12" + self: + href: "/api/v3/versions/11" + _type: Version + description: + format: plain + html: This version has a description + raw: This version has a description + endDate: + id: 11 + name: v3.0 Alpha + startDate: "2014-11-20" + status: Open + - _links: + availableInProjects: + href: "/api/v3/versions/12/projects" + definingProject: + href: "/api/v3/projects/11" + self: + href: "/api/v3/versions/12" + _type: Version + description: + format: plain + html: "" + raw: "" + endDate: + id: 12 + name: v2.0 + startDate: + status: Closed + - _links: + availableInProjects: + href: "/api/v3/versions/13/projects" + definingProject: + href: "/api/v3/projects/13" + self: + href: "/api/v3/versions/10" + _type: Version + description: + format: plain + html: "" + raw: "" + endDate: + id: 10 + name: v1.0 + startDate: + status: Open + _links: + self: + href: "/api/v3/versions" + _type: Collection + count: 3 + total: 3 + schema: + "$ref": "#/components/schemas/VersionsModel" + description: OK + headers: {} + tags: + - Versions + description: + Returns a collection of versions. The client can choose to filter + the versions similar to how work packages are filtered. In addition to the + provided filters, the server will reduce the result set to only contain versions, + for which the requesting client has sufficient permissions (*view_work_packages*). + operationId: List_versions + summary: List versions + post: + responses: + "201": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/VersionModel" + description: Created + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** Manage versions + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + description: |- + Returned if: + + * a constraint for a property was violated (`PropertyConstraintViolation`) + headers: {} + tags: + - Versions + description: |- + Creates a new version applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a version's attributes and are accepted by the endpoint. + + You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation. + operationId: Create_version + summary: Create version + "/api/v3/versions/available_projects": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + categories: + href: "/api/v3/projects/6/categories" + createWorkPackage: + href: "/api/v3/projects/6/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/6/work_packages" + method: post + editWorkPackage: + href: "/api/v3//work_packages/{id}/form" + method: post + templated: true + self: + href: "/api/v3/projects/6" + title: A project + versions: + href: "/api/v3/projects/6/versions" + _type: Project + createdAt: "2015-07-06T13:28:14+00:00" + description: + Eveniet molestias omnis quis aut qui eum adipisci. + Atque aut aut in exercitationem adipisci amet. Nisi asperiores + quia ratione veritatis enim exercitationem magnam. Aut fuga + architecto adipisci nihil. Et repellat pariatur. Aliquam + et sed perferendis nostrum quaerat. Fugit doloremque voluptatem. + id: 6 + identifier: a_project + name: A project + type: Customer Project + updatedAt: "2015-10-01T09:55:02+00:00" + - _links: + categories: + href: "/api/v3/projects/14/categories" + createWorkPackage: + href: "/api/v3/projects/14/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/14/work_packages" + method: post + self: + href: "/api/v3/projects/14" + title: Another project + versions: + href: "/api/v3/projects/14/versions" + _type: Project + createdAt: "2016-02-29T12:50:20+00:00" + description: "" + id: 14 + identifier: another_project + name: Another project + type: + updatedAt: "2016-02-29T12:50:20+00:00" + _links: + self: + href: "/api/v3/versions/available_projects" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Available_projects_for_versionsModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** manage versions + headers: {} + tags: + - Versions + description: + Gets a list of projects in which a version can be created in. The + list contains all projects in which the user issuing the request has the manage + versions permissions. + operationId: Available_projects_for_versions + summary: Available projects for versions + "/api/v3/versions/form": + post: + responses: + "200": + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** manage versions in any project + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Versions + description: "" + operationId: Version_create_form + summary: Version create form + "/api/v3/versions/schema": + get: + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _dependencies: [] + _links: + self: + href: "/api/v3/versions/schema" + _type: Schema + createdAt: + hasDefault: false + name: Created on + required: true + type: DateTime + writable: false + customField14: + hasDefault: false + name: text CF + required: false + type: String + visibility: default + writable: true + customField40: + _links: {} + hasDefault: false + location: _links + name: List CF + required: false + type: CustomOption + visibility: default + writable: true + definingProject: + _links: {} + hasDefault: false + name: Project + required: true + type: Project + writable: true + description: + hasDefault: false + name: Description + required: false + type: Formattable + writable: true + endDate: + hasDefault: false + name: Finish date + required: false + type: Date + writable: false + id: + hasDefault: false + name: ID + required: true + type: Integer + writable: false + name: + hasDefault: false + maxLength: 60 + minLength: 1 + name: Name + required: true + type: String + writable: true + sharing: + _links: {} + hasDefault: false + name: Sharing + required: true + type: String + visibility: default + writable: true + startDate: + hasDefault: false + name: Start date + required: false + type: Date + writable: true + status: + _links: {} + hasDefault: false + name: Status + required: true + type: String + visibility: default + writable: true + updatedAt: + hasDefault: false + name: Updated on + required: true + type: DateTime + writable: false + schema: + "$ref": "#/components/schemas/Version_schemaModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions to see the schema. + + **Required permission:** view work packages or manage versions on any project + headers: {} + tags: + - Versions + description: "" + operationId: View_version_schema + summary: View version schema + "/api/v3/versions/{id}": + delete: + parameters: + - description: Version id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "204": + description: Returned if the version was successfully deleted + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** manage versions + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the version does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view work packages **or** manage versions (any project where the version is available) + + *Note: A client without sufficient permissions shall not be able to test for the existence of + a version. That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Versions + description: + Deletes the version. Work packages associated to the version will + no longer be assigned to it. + operationId: Delete_Version + summary: Delete version + get: + parameters: + - description: Version id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _links: + availableInProjects: + href: "/api/v3/versions/11/projects" + customField4: + href: "/api/v3/custom_options/5" + title: Custom field option + definingProject: + href: "/api/v3/projects/11" + self: + href: "/api/v3/versions/11" + update: + href: "/api/v3/versions/11/form" + method: POST + updateImmediately: + href: "/api/v3/versions/11" + method: PATCH + _type: Version + customField14: "1234567890" + description: + format: plain + html: This version has a description + raw: This version has a description + endDate: + id: 11 + name: v3.0 Alpha + sharing: system + startDate: "2014-11-20" + status: open + schema: + "$ref": "#/components/schemas/VersionModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the version does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view work packages **or** manage versions (any project where the version is available) + + *Note: A client without sufficient permissions shall not be able to test for the existence of + a version. That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + tags: + - Versions + description: "" + operationId: View_version + summary: View version + patch: + parameters: + - description: Version id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/VersionModel" + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** Manage versions in the version's project. + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the version does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view work packages **or** manage versions (any project where the version is available) + + *Note: A client without sufficient permissions shall not be able to test for the existence of + a version. That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + description: |- + Returned if: + + * a constraint for a property was violated (`PropertyConstraintViolation`) + headers: {} + tags: + - Versions + description: + Updates the given version by applying the attributes provided in + the body. Please note that while there is a fixed set of attributes, custom + fields can extend a version's attributes and are accepted by the endpoint. + operationId: Update_Version + summary: Update Version + "/api/v3/versions/{id}/form": + post: + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** manage versions in the version's project + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Versions + description: "" + operationId: Version_update_form + summary: Version update form + "/api/v3/versions/{id}/projects": + get: + parameters: + - description: Version id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + categories: + href: "/api/v3/projects/1/categories" + self: + href: "/api/v3/projects/1" + title: Lorem + status: + href: "/api/v3/project_statuses/on_track" + title: On track + versions: + href: "/api/v3/projects/1/versions" + _type: Project + active: true + createdAt: "2014-05-21T08:51:20Z" + description: + format: markdown + html: "

Lorem ipsum dolor sit amet

" + raw: Lorem **ipsum** dolor sit amet + id: 1 + identifier: project_identifier + name: Project example + statusExplanation: + format: markdown + html: "

Everything fine

" + raw: Everything **fine** + updatedAt: "2014-05-21T08:51:20Z" + _links: + self: + href: "/api/v3/versions/2/projects" + _type: Collection + count: 1 + total: 1 + schema: + "$ref": "#/components/schemas/List_projects_by_versionModel" + description: OK + headers: {} + "404": + description: |- + Returned if the version does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view work packages **or** manage versions (any project where the given version is available) + + *Note: A client without sufficient permissions shall not be able to test for the existence of a version. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + tags: + - Projects + description: |- + This endpoint lists the projects where the given version is available. + + The projects returned depend on the sharing settings of the given version, + but are also limited to the projects that the current user is allowed to see. + operationId: List_projects_with_version + summary: List projects having version + "/api/v3/views": + get: + parameters: + - description: |- + JSON specifying filter conditions. + Currently supported filters are: + + + project: filters views by the project their associated query is assigned to. If the project filter is passed with the `!*` (not any) operator, global views are returned. + + + id: filters views based on their id + + + type: filters views based on their type + example: '[{ "project_id": { "operator": "!*", "values": null }" }]' + in: query + name: filters + required: false + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + Queries: + "$ref": "#/components/examples/Views" + description: OK + headers: {} + tags: + - Views + description: + Returns a collection of Views. The collection can be filtered via + query parameters similar to how work packages are filtered. + operationId: List_views + summary: List views + "/api/v3/views/{id}": + get: + parameters: + - description: View id + example: 42 + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + ViewWorkPackagesTable: + "$ref": "#/components/examples/ViewWorkPackagesTable" + ViewTeamPlanner: + "$ref": "#/components/examples/ViewTeamPlanner" + description: + Returns the result of a single view, dependent of the view + type. + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** The required permission depends on the type of the view. + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the resource can not be found. + + *Note: A client without sufficient permissions shall not be able to test for the existence of + a view. That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + tags: + - Views + description: "" + operationId: View_view + summary: View view + post: + parameters: + - description: The view identifier + name: id + in: path + required: true + example: "1" + schema: + type: string + requestBody: + content: + application/json: + examples: + Views::WorkPackagesTable: + value: + _links: + query: + href: "/api/v3/queries/5" + Views::TeamPlanner: + value: + _links: + query: + href: "/api/v3/queries/5" + schema: + type: object + properties: + _links: + type: object + properties: + query: + type: object + properties: + href: + type: string + format: uri + responses: + "201": + content: + application/hal+json: + schema: + type: object + examples: + Views::WorkPackagesTable: + "$ref": "#/components/examples/ViewWorkPackagesTable" + Views::TeamPlanner: + "$ref": "#/components/examples/ViewTeamPlanner" + description: Created + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _embedded: + details: + attribute: query + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Query does not exist. + description: |- + Returned if: + + * the client tries to modify a read-only property (`PropertyIsReadOnly`) + + * a constraint for a property was violated (`PropertyConstraintViolation`) + + * the client provides a link to an invalid resource (`ResourceTypeMismatch`), + e.g. a query not found + headers: {} + tags: + - Views + description: |- + When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. + The required fields of a View can be found in its schema, which is embedded in the respective form. + Note that it is only allowed to provide properties or links supporting the write operation. + + There are different subtypes of `Views` (e.g. `Views::WorkPackagesTable`) with each having its own + endpoint for creating that subtype e.g. + + * `/api/v3/views/work_packages_table` for `Views::WorkPackagesTable` + * `/api/v3/views/team_planner` for `Views::TeamPlanner` + * `/api/v3/views/work_packages_calendar` for `Views::WorkPackagesCalendar` + + **Not yet implemented** To get the list of available subtypes and by that the endpoints for creating a subtype, use the + ``` + /api/v3/views/schemas + ``` + endpoint. + operationId: Create_views + summary: Create view + "/api/v3/wiki_pages/{id}": + get: + parameters: + - description: Wiki page identifier + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + project: + _type: Project... + id: 12 + _links: + addAttachment: + href: "/api/v3/wiki_pages/72/attachments" + method: post + attachments: + href: "/api/v3/wiki_pages/72/attachments" + project: + href: "/api/v3/projects/12" + title: some project + self: + href: "/api/v3/wiki_pages/72" + _type: WikiPage + id: 72 + title: A wiki page with a name + schema: + "$ref": "#/components/schemas/Wiki_PageModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the wiki page does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view wiki page in the page's project + headers: {} + tags: + - Wiki Pages + description: Retrieve an individual wiki page as identified by the id parameter + operationId: View_Wiki_Page + summary: View Wiki Page + "/api/v3/wiki_pages/{id}/attachments": + get: + parameters: + - description: ID of the wiki page whose attachments will be listed + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + author: + href: "/api/v3/users/1" + title: OpenProject Admin + container: + href: "/api/v3/wiki_pages/72" + title: wiki + delete: + href: "/api/v3/attachments/376" + method: delete + downloadLocation: + href: "/api/v3/attachments/376/content" + self: + href: "/api/v3/attachments/376" + title: 200.gif + _type: Attachment + contentType: image/gif + createdAt: "2018-06-01T07:24:19Z" + description: + format: plain + html: "" + raw: "" + digest: + algorithm: md5 + hash: 7ac9c97ef73d47127f590788b84c0c1c + fileName: some.gif + fileSize: 3521772 + id: 376 + _links: + self: + href: "/api/v3/wiki_pages/72/attachments" + _type: Collection + count: 1 + total: 1 + schema: + "$ref": "#/components/schemas/Attachments_Model" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the wiki page does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view wiki pages + + *Note: A client without sufficient permissions shall not be able to test for the existence of a work package. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + tags: + - Attachments + description: "" + operationId: List_attachments_by_wiki_page + summary: List attachments by wiki page + post: + parameters: + - description: ID of the wiki page to receive the attachment + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + author: + _links: + lock: + href: "/api/v3/users/1/lock" + method: post + title: Set lock on admin + self: + href: "/api/v3/users/1" + title: OpenProject Admin + showUser: + href: "/users/1" + type: text/html + updateImmediately: + href: "/api/v3/users/1" + method: patch + title: Update admin + _type: User + admin: true + avatar: "" + createdAt: "2015-03-20T12:56:52Z" + email: + firstName: OpenProject + id: 1 + identityUrl: + lastName: Admin + login: admin + name: OpenProject Admin + status: active + updatedAt: "2018-05-29T13:57:44Z" + container: + _links: + addAttachment: + href: "/api/v3/wiki_pages/72/attachments" + method: post + attachments: + href: "/api/v3/wiki_pages/72/attachments" + project: + href: "/api/v3/projects/12" + title: Demo project + self: + href: "/api/v3/wiki_pages/72" + _type: WikiPage + id: 72 + title: wiki + _links: + author: + href: "/api/v3/users/1" + title: OpenProject Admin + container: + href: "/api/v3/wiki_pages/72" + title: wiki + delete: + href: "/api/v3/attachments/376" + method: delete + downloadLocation: + href: "/api/v3/attachments/376/content" + self: + href: "/api/v3/attachments/376" + title: 200.gif + _type: Attachment + contentType: image/gif + createdAt: "2018-06-01T07:24:19Z" + description: + format: plain + html: "" + raw: "" + digest: + algorithm: md5 + hash: 7ac9c97ef73d47127f590788b84c0c1c + fileName: some.gif + fileSize: 3521772 + id: 376 + description: OK + headers: {} + "400": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody + message: The request could not be parsed as JSON. + description: |- + Returned if the client sends a not understandable request. Reasons include: + + * Omitting one of the required parts (metadata and file) + + * sending unparsable JSON in the metadata part + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to delete this attachment. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** edit wiki pages + + *Note that you will only receive this error, if you are at least allowed to see the wiki page* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the wiki page does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view wiki pages + + *Note: A client without sufficient permissions shall not be able to test for the existence of a wiki page + That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: File is too large (maximum size is 5242880 Bytes). + description: |- + Returned if the client tries to send an invalid attachment. + Reasons are: + + * Omitting the file name (`fileName` property of metadata part) + + * Sending a file that is too large + headers: {} + tags: + - Attachments + description: Adds an attachment with the wiki page as it's container. + operationId: Add_attachment_to_wiki_page + summary: Add attachment to wiki page + "/api/v3/work_packages": + get: + summary: List work packages + operationId: list_work_packages + tags: + - Work Packages + description: Returns a collection of work packages. + parameters: + - description: Page number inside the requested collection. + example: "25" + in: query + name: offset + required: false + schema: + default: 1 + type: integer + - description: Number of elements to display per page. + example: "25" + in: query + name: pageSize + required: false + schema: + type: integer + - description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) + endpoint. If no filter is to be applied, the client should send an empty array (`[]`), otherwise a default + filter is applied. A Currently supported filters are (there are additional filters added by modules): + + - assigned_to + - assignee_or_group + - attachment_base + - attachment_content + - attachment_file_name + - author + - blocked + - blocks + - category + - comment + - created_at + - custom_field + - dates_interval + - description + - done_ratio + - due_date + - duplicated + - duplicates + - duration + - estimated_hours + - file_link_origin_id + - follows + - group + - id + - includes + - linkable_to_storage_id + - linkable_to_storage_url + - manual_sort + - milestone + - only_subproject + - parent + - partof + - precedes + - principal_base + - priority + - project + - relatable + - relates + - required + - requires + - responsible + - role + - search + - start_date + - status + - storage_id + - storage_url + - subject + - subject_or_id + - subproject + - type + - typeahead + - updated_at + - version + - watcher + - work_package + example: '[{ "type_id": { "operator": "=", "values": ["1", "2"] }}]' + in: query + name: filters + required: false + schema: + default: '[{ "status_id": { "operator": "o", "values": null }}]' + type: string + - description: |- + JSON specifying sort criteria. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. + example: '[["status", "asc"]]' + in: query + name: sortBy + required: false + schema: + default: '[["id", "asc"]]' + type: string + - description: The column to group by. + example: status + in: query + name: groupBy + required: false + schema: + type: string + - description: + Indicates whether properties should be summed up if they support + it. + example: true + in: query + name: showSums + required: false + schema: + default: false + type: boolean + - description: Comma separated list of properties to include. + example: total,elements/subject,elements/id,self + in: query + name: select + required: false + schema: + type: string + - description: |- + In order to perform a [baseline comparison](/docs/api/baseline-comparisons), you may provide one or several timestamps + in ISO-8601 format as comma-separated list. The timestamps may be absolute or relative, + such as ISO8601 dates, ISO8601 durations and the following relative date keywords: "oneDayAgo@HH:MM+HH:MM", + "lastWorkingDay@HH:MM+HH:MM", "oneWeekAgo@HH:MM+HH:MM", "oneMonthAgo@HH:MM+HH:MM". + The first "HH:MM" part represents the zero paded hours and minutes. + The last "+HH:MM" part represents the timezone offset from UTC associated with the time, + the offset can be positive or negative e.g."oneDayAgo@01:00+01:00", "oneDayAgo@01:00-01:00". + + Usually, the first timestamp is the baseline date, the last timestamp is the current date. + Values older than 1 day are accepted only with valid Enterprise Token available. + example: 2022-01-01T00:00:00Z,PT0S + in: query + name: timestamps + required: false + schema: + default: PT0S + type: string + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/Work_PackagesModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to see work packages. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view work packages (globally or in any project) + post: + summary: Create Work Package + operationId: create_work_package + tags: + - Work Packages + description: |- + When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. + The required fields of a WorkPackage can be found in its schema, which is embedded in the respective form. + Note that it is only allowed to provide properties or links supporting the write operation. + + A project link must be set when creating work packages through this route. + + When setting start date, finish date, and duration together, their correctness will be checked and a 422 error will be returned if one value does not match with the two others. You can make the server compute a value: set only two values in the request and the third one will be computed and returned in the response. For instance, when sending `{ "startDate": "2022-08-23", duration: "P2D" }`, the response will include `{ "dueDate": "2022-08-24" }`. + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/Work_PackageModel" + parameters: + - description: |- + Indicates whether change notifications (e.g. via E-Mail) should be sent. + Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), + not just the current user. + example: false + in: query + name: notify + required: false + schema: + default: true + type: boolean + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/Work_PackageModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to add work packages to this project. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** add work packages + + *Note that you will only receive this error, if you are at least allowed to see the corresponding project.* + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified project does not exist. + description: |- + Returned if the project does not exist or the client does not have sufficient permissions + to see it. + + **Required permissions:** view project + + *Note: A client without sufficient permissions shall not be able to test for the existence of a project. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: The subject might not be blank. + _embedded: + details: + attribute: Subject + description: |- + Returned if: + + * the client tries to write a read-only property + + * a constraint for a property was violated + + * a property was provided in an unreadable format + "/api/v3/work_packages/form": + post: + responses: + "200": + description: OK + headers: {} + tags: + - Work Packages + description: "" + operationId: Work_Package_Create_Form + summary: Work Package Create Form + "/api/v3/work_packages/schemas": + get: + parameters: + - description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are: + + + id: The schema's id + + Schema id has the form `project_id-work_package_type_id`. + example: '[{ "id": { "operator": "=", "values": ["12-1", "14-2"] } }]' + in: query + name: filters + required: true + schema: + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + self: + href: "/api/v3/work_packages/schemas/13-1" + _type: Schema... + - _links: + self: + href: "/api/v3/work_packages/schemas/7-6" + _type: Schema... + _links: + self: + href: "/api/v3/work_packages/schemas" + _type: Collection + count: 2 + total: 5 + schema: + "$ref": "#/components/schemas/Work_Package_SchemasModel" + description: OK + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to list schemas. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** View work packages in any project. + headers: {} + tags: + - Work Packages + description: List work package schemas. + operationId: List_Work_Package_Schemas + summary: List Work Package Schemas + "/api/v3/work_packages/schemas/{identifier}": + get: + parameters: + - description: Identifier of the schema + example: 12-13 + in: path + name: identifier + required: true + schema: + type: string + responses: + "200": + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified schema does not exist. + description: |- + Returned if the schema does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view work packages (on the project where this schema is used) + + *Note: A client without sufficient permissions shall not be able to test for the existence of a project. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + headers: {} + tags: + - Work Packages + description: "" + operationId: View_Work_Package_Schema + summary: View Work Package Schema + "/api/v3/work_packages/{id}": + delete: + summary: Delete Work Package + operationId: delete_work_package + tags: + - Work Packages + description: |- + Deletes the work package, as well as: + + - all associated time entries + - its hierarchy of child work packages + parameters: + - description: Work package id + in: path + name: id + required: true + schema: + type: integer + example: 1 + responses: + "204": + description: |- + Returned if the work package was deleted successfully. + + Note that the response body is empty as of now. In future versions of the API a body + *might* be returned along with an appropriate HTTP status. + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to delete this work package. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** delete work package + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work package does not exist. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + get: + summary: View Work Package + operationId: view_work_package + tags: + - Work Packages + description: Returns the specified work package. + parameters: + - description: Work package id + in: path + name: id + required: true + schema: + type: integer + example: 1 + - description: |- + In order to perform a [baseline comparison](/docs/api/baseline-comparisons) of the work-package attributes, you may + provide one or several timestamps in ISO-8601 format as comma-separated list. The timestamps may be absolute or relative, + such as ISO8601 dates, ISO8601 durations and the following relative date keywords: "oneDayAgo@HH:MM+HH:MM", + "lastWorkingDay@HH:MM+HH:MM", "oneWeekAgo@HH:MM+HH:MM", "oneMonthAgo@HH:MM+HH:MM". + The first "HH:MM" part represents the zero paded hours and minutes. + The last "+HH:MM" part represents the timezone offset from UTC associated with the time, + the offset can be positive or negative e.g."oneDayAgo@01:00+01:00", "oneDayAgo@01:00-01:00". + + Usually, the first timestamp is the baseline date, the last timestamp is the current date. + Values older than 1 day are accepted only with valid Enterprise Token available. + in: query + name: timestamps + required: false + schema: + default: PT0S + type: string + example: 2022-01-01T00:00:00Z,PT0S + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/Work_PackageModel" + description: OK + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work package does not exist. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + patch: + summary: Update a Work Package + operationId: update_work_package + tags: + - Work Packages + description: |- + When calling this endpoint the client provides a single object, containing the properties and links that it wants + to change, in the body. Note that it is only allowed to provide properties or links supporting the **write** + operation. + + Additionally to the fields the client wants to change, it is mandatory to provide the value of `lockVersion` which + was received by the `GET` request this change originates from. + + The value of `lockVersion` is used to implement + [optimistic locking](https://en.wikipedia.org/wiki/Optimistic_concurrency_control). + parameters: + - name: id + description: Work package id + in: path + required: true + schema: + type: integer + example: 42 + - name: notify + description: |- + Indicates whether change notifications should be sent. Note that this controls notifications for all users + interested in changes to the work package (e.g. watchers, author and assignee), not just the current user. + in: query + required: false + schema: + type: boolean + default: true + example: false + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/Work_PackageModel" + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/WorkPackagePatchModel" + description: OK + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to edit the content of the work package. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** edit work package, assign version, manage subtasks or move work package + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work package does not exist. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + "406": + "$ref": "#/components/responses/MissingContentType" + "409": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:UpdateConflict + message: + Your changes could not be saved, because the work package + was changed since you've seen it the last time. + description: + Returned if the resource was changed since the client requested + it. This is determined using the `lockVersion` property. + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _embedded: + details: + attribute: Subject + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: The subject might not be blank. + description: |- + Returned if: + + - the client tries to modify a read-only property (`PropertyIsReadOnly`) + - a constraint for a property was violated (`PropertyConstraintViolation`) + - the client provides a link to an invalid resource (`ResourceTypeMismatch`) + "/api/v3/work_packages/{id}/activities": + get: + parameters: + - description: Work package id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + self: + href: "/api/v3/activity/1" + user: + href: "/api/v3/users/1" + workPackage: + href: "/api/v3/work_packages/1" + _type: Activity + comment: + format: markdown + html: "

Lorem ipsum dolor sit amet.

" + raw: Lorem ipsum dolor sit amet. + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T09:14:02Z" + details: [] + id: 1 + version: 1 + - _links: + self: + href: "/api/v3/activity/2" + user: + href: "/api/v3/users/1" + workPackage: + href: "/api/v3/work_packages/1" + _type: Activity + comment: + format: markdown + html: "

Lorem ipsum dolor sit amet.

" + raw: Lorem ipsum dolor sit amet. + createdAt: "2014-05-21T09:51:22Z" + updatedAt: "2014-05-21T10:14:02Z" + details: [] + id: 2 + version: 2 + _links: + self: + href: "/api/v3/work_packages/1/revisions" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Work_Package_activitiesModel" + description: OK + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work package does not exist. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + headers: {} + tags: + - Work Packages + description: "" + operationId: List_work_package_activities + summary: List work package activities + post: + parameters: + - description: Work package id + example: "1" + in: path + name: id + required: true + schema: + type: integer + - description: |- + Indicates whether change notifications (e.g. via E-Mail) should be sent. + Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), + not just the current user. + example: false + in: query + name: notify + required: false + schema: + default: true + type: boolean + responses: + "201": + description: Created + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to create a comment here. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** create journals + + *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work package does not exist. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + headers: {} + tags: + - Work Packages + description: |- + Creates an activity for the selected work package and, on success, returns the + updated activity. + operationId: Comment_work_package + requestBody: + content: + application/json: + schema: + example: + comment: + raw: I think this is awesome! + properties: + comment: + properties: + raw: + type: string + type: object + type: object + summary: Comment work package + "/api/v3/work_packages/{id}/attachments": + get: + parameters: + - description: ID of the work package whose attachments will be listed + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/Attachments_Model" + description: OK + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work package does not exist. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view work package + + *Note: A client without sufficient permissions shall not be able to test for the existence of a work package. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + tags: + - Attachments + description: "" + operationId: list_work_package_attachments + summary: List attachments by work package + post: + parameters: + - description: ID of the work package to receive the attachment + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/AttachmentModel" + description: OK + "400": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody + message: The request could not be parsed as JSON. + description: |- + Returned if the client sends a not understandable request. Reasons include: + + * Omitting one of the required parts (metadata and file) + + * sending unparsable JSON in the metadata part + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to delete this attachment. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** edit work package or add work package + + *Note that you will only receive this error, if you are at least allowed to see the work package.* + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work package does not exist. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions + to see it. + + **Required permission:** view work package + + *Note: A client without sufficient permissions shall not be able to test for the existence of a work package. + That's why a 404 is returned here, even if a 403 might be more appropriate.* + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: File is too large (maximum size is 5242880 Bytes). + description: |- + Returned if the client tries to send an invalid attachment. + Reasons are: + + * Omitting the file name (`fileName` property of metadata part) + + * Sending a file that is too large + tags: + - Attachments + description: |- + To add an attachment to a work package, a client needs to issue a request of type `multipart/form-data` + with exactly two parts. + + The first part *must* be called `metadata`. Its content type is expected to be `application/json`, + the body *must* be a single JSON object, containing at least the `fileName` and optionally the attachments `description`. + + The second part *must* be called `file`, its content type *should* match the mime type of the file. + The body *must* be the raw content of the file. + Note that a `filename` must be indicated in the `Content-Disposition` of this part, however it will be ignored. + Instead the `fileName` inside the JSON of the metadata part will be used. + operationId: create_work_package_attachment + summary: Create work package attachment + "/api/v3/work_packages/{id}/available_projects": + get: + parameters: + - description: work package id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + categories: + href: "/api/v3/projects/6/categories" + createWorkPackage: + href: "/api/v3/projects/6/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/6/work_packages" + method: post + editWorkPackage: + href: "/api/v3//work_packages/{id}/form" + method: post + templated: true + self: + href: "/api/v3/projects/6" + title: A project + versions: + href: "/api/v3/projects/6/versions" + _type: Project + createdAt: "2015-07-06T13:28:14+00:00" + description: + Eveniet molestias omnis quis aut qui eum adipisci. + Atque aut aut in exercitationem adipisci amet. Nisi asperiores + quia ratione veritatis enim exercitationem magnam. Aut fuga + architecto adipisci nihil. Et repellat pariatur. Aliquam + et sed perferendis nostrum quaerat. Fugit doloremque voluptatem. + id: 6 + identifier: a_project + name: A project + type: Customer Project + updatedAt: "2015-10-01T09:55:02+00:00" + - _links: + categories: + href: "/api/v3/projects/14/categories" + createWorkPackage: + href: "/api/v3/projects/14/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/14/work_packages" + method: post + self: + href: "/api/v3/projects/14" + title: Another project + versions: + href: "/api/v3/projects/14/versions" + _type: Project + createdAt: "2016-02-29T12:50:20+00:00" + description: "" + id: 14 + identifier: another_project + name: Another project + type: + updatedAt: "2016-02-29T12:50:20+00:00" + _links: + self: + href: "/api/v3/work_packages/5/available_projects" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Available_projects_for_work_packageModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** edit work package + + *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work package does not exist. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + headers: {} + tags: + - Work Packages + description: + Gets a list of projects that are available as projects to which + the work package can be moved. + operationId: Available_projects_for_work_package + summary: Available projects for work package + "/api/v3/work_packages/{id}/available_relation_candidates": + get: + summary: Available relation candidates + operationId: list_available_relation_candidates + tags: + - Work Packages + description: "" + parameters: + - description: Project id + example: "1" + in: path + name: id + required: true + schema: + type: integer + - description: Maximum number of candidates to list (default 10) + example: "25" + in: query + name: pageSize + required: false + schema: + type: integer + - description: |- + JSON specifying filter conditions. + Accepts the same filters as the [work packages](https://www.openproject.org/docs/api/endpoints/work-packages/) endpoint. + example: '[{ "status_id": { "operator": "o", "values": null } }]' + in: query + name: filters + required: false + schema: + type: string + - description: Shortcut for filtering by ID or subject + example: '"rollout"' + in: query + name: query + required: false + schema: + type: string + - description: Type of relation to find candidates for (default "relates") + example: '"follows"' + in: query + name: type + required: false + schema: + type: string + - description: |- + JSON specifying sort criteria. + Accepts the same sort criteria as the [work packages](https://www.openproject.org/docs/api/endpoints/work-packages/) endpoint. + example: '[["status", "asc"]]' + in: query + name: sortBy + required: false + schema: + default: '[["id", "asc"]]' + type: string + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + self: + href: "/api/v3/work_packages/1" + _type: WorkPackage + id: 1 + subject: Skipped other properties for brevity + - _links: + self: + href: "/api/v3/work_packages/2" + _type: WorkPackage + id: 2 + subject: Skipped other properties for brevity + _links: + self: + href: "/api/v3/projects/14/work_packages" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Available_relation_candidatesModel" + description: OK + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work package does not exist. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + "/api/v3/work_packages/{id}/available_watchers": + get: + parameters: + - description: work package id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + delete: + href: "/api/v3/users/1" + method: DELETE + title: Delete j.sheppard + lock: + href: "/api/v3/users/1/lock" + method: POST + title: Set lock on j.sheppard + self: + href: "/api/v3/users/1" + title: John Sheppard - j.sheppard + _type: User + avatar: https://example.org/users/1/avatar + createdAt: "2014-05-21T08:51:20Z" + email: shep@mail.com + firstName: John + id: 1 + lastName: Sheppard + login: j.sheppard + status: active + updatedAt: "2014-05-21T08:51:20Z" + - _links: + delete: + href: "/api/v3/users/2" + method: DELETE + title: Delete j.sheppard2 + lock: + href: "/api/v3/users/2/lock" + method: POST + title: Set lock on j.sheppard2 + self: + href: "/api/v3/users/2" + title: Jim Sheppard - j.sheppard2 + _type: User + avatar: https://example.org/users/1/avatar + createdAt: "2014-05-21T08:51:20Z" + email: shep@mail.net + firstName: Jim + id: 2 + lastName: Sheppard + login: j.sheppard2 + status: active + updatedAt: "2014-05-21T08:51:20Z" + _links: + self: + href: "/api/v3/work_packages/1/available_watchers" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/Available_WatchersModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** add work package watchers + + *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work package does not exist. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + headers: {} + tags: + - Work Packages + description: + Gets a list of users that are able to be watchers of the specified + work package. + operationId: Available_watchers + summary: Available watchers + "/api/v3/work_packages/{id}/file_links": + post: + summary: Creates file links. + operationId: create_work_package_file_link + tags: + - Work Packages + - File links + description: |- + Creates file links on a work package. + + The request is interpreted as a bulk insert, where every element of the collection is validated separately. Each + element contains the origin meta data and a link to the storage, the file link is about to point to. The storage + link can be provided as a resource link with id or as the host url. + + The file's id and name are considered mandatory information. The rest of the origin meta data SHOULD be provided + by the client. The _mimeType_ SHOULD be a standard mime type. An empty mime type will be handled as unknown. To link + a folder, the custom mime type `application/x-op-directory` MUST be used. + + Up to 20 file links can be submitted at once. + + If any element data is invalid, no file links will be created. + + If a file link with matching origin id, work package, and storage already exists, then it will not create an + additional file link or update the meta data. Instead the information from the existing file link will be returned. + parameters: + - name: id + description: Work package id + in: path + required: true + schema: + type: integer + example: 1337 + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/FileLinkCollectionWriteModel" + example: + _type: Collection + _embedded: + elements: + - originData: + id: 5503 + name: logo.png + mimeType: image/png + size: 433765 + createdAt: "2021-12-19T09:42:10.170Z" + lastModifiedAt: "2021-12-20T14:00:13.987Z" + createdByName: Luke Skywalker + lastModifiedByName: Anakin Skywalker + _links: + storageUrl: + href: https://nextcloud.deathstar.rocks/ + responses: + "201": + description: Created + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/FileLinkCollectionReadModel" + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** manage file links + + *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.* + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package, view file links + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: + The request was invalid. File Link logo.png - Storage was + invalid. + description: |- + Occurs if the request body was correctly formatted, but some properties lead to errors in the validation + process. This happens e.g. if the provided storage url is not available on the server. + get: + summary: Gets all file links of a work package + operationId: list_work_package_file_links + tags: + - Work Packages + - File links + description: + "Gets all file links of a work package.\n\nAs a side effect, for + every file link a request is sent to the storage's origin to fetch live data + and patch\nthe file link's data before returning, as well as retrieving permissions + of the user on this origin file. " + parameters: + - name: id + description: Work package id + in: path + required: true + schema: + type: integer + example: 1337 + - name: filters + in: query + description: |- + JSON specifying filter conditions. + Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) + endpoint. The following filters are supported: + + - storage + required: false + example: '[{"storage":{"operator":"=","values":["42"]}}]' + schema: + type: string + responses: + "200": + description: OK + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/FileLinkCollectionReadModel" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not authorized to access this resource. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view file links + + *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.* + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The requested resource could not be found. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + "/api/v3/work_packages/{id}/form": + post: + summary: Work Package Edit Form + operationId: Work_Package_Edit_Form + tags: + - Work Packages + description: |- + When calling this endpoint, the client provides a single object containing the properties and links to be edited, in the body. + + Note that it is only allowed to provide properties or links supporting the write operation. + + When setting start date, finish date, and duration together, their correctness will be checked and a 422 error will be returned if one value does not match with the two others. You can make the server compute a value: set only two values in the request and the third one will be computed and returned in the response. For instance, when sending `{ "startDate": "2022-08-23", duration: "P2D" }`, the response will include `{ "dueDate": "2022-08-24" }`. + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/Work_PackageModel" + parameters: + - description: ID of the work package being modified + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to edit the specified work package. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** edit work package, assign version, manage subtasks or move work package + + *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work package does not exist. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "/api/v3/work_packages/{id}/revisions": + get: + parameters: + - description: Work package id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + examples: + response: + value: + _embedded: + elements: + - _links: + author: + href: "/api/v3/users/1" + title: John Sheppard - j.sheppard + project: + href: "/api/v3/projects/1" + title: A Test Project + self: + href: "/api/v3/revisions/13" + showRevision: + href: "/projects/identifier/repository/revision/11f4b07" + _type: Revision + authorName: John Sheppard + createdAt: "2015-07-21T13:36:59Z" + formattedIdentifier: 11f4b07 + id: 13 + identifier: 11f4b07dff4f4ce9548a52b7d002daca7cd63ec6 + message: + format: plain + html: + "

This revision provides new features

An + elaborate description

" + raw: |- + This revision provides new features + + An elaborate description + - _links: + author: + href: "/api/v3/users/2" + title: Jim Sheppard - j.sheppard + project: + href: "/api/v3/projects/1" + title: A Test Project + self: + href: "/api/v3/revisions/14" + showRevision: + href: "/projects/identifier/repository/revision/029ed72a" + _type: Revision + authorName: j1msheppard + createdAt: "2015-06-30T08:47:00Z" + formattedIdentifier: "029ed72a" + id: 13 + identifier: "029ed72a3b7b7c4ab332b1f6eaa6576e7c946059" + message: + format: plain + html: + "

This revision fixes some stuff

More information + here

" + raw: |- + This revision fixes some stuff + + More information here + _links: + self: + href: "/api/v3/work_packages/42/revisions" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/RevisionsModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: + You are not allowed to see linked revisions for this + work package. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view work packages for the project the work package is contained in. + + *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work project does not exist. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + headers: {} + tags: + - Work Packages + description: |- + Gets a list of revisions that are linked to this work package, e.g., because it is referenced in the commit message of the revision. + Only linked revisions from repositories are shown if the user has the view changesets permission in the defining project. + operationId: Revisions + summary: Revisions + "/api/v3/work_packages/{id}/relations": + get: + parameters: + - description: Work package id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "302": + content: + text/plain: + schema: + type: string + examples: + response: + value: You are being redirected to /api/v3/relations?involved={work_package_id} + description: Found + headers: + Location: + schema: + type: string + tags: + - Work Packages + description: Lists all relations this work package is involved in. + operationId: List_relations + summary: List relations + post: + parameters: + - description: Work package id + example: "1" + in: path + name: id + required: true + schema: + type: integer + responses: + "201": + description: Created + headers: {} + "400": + "$ref": "#/components/responses/InvalidRequestBody" + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to create a relation. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** manage work package relations + headers: {} + "409": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:UpdateConflict + message: Couldn't update the resource because of conflicting modifications. + description: |- + Returned if there already exists a relation between the given work packages of **any** type + or if the relation is not allowed. + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _embedded: + details: + attribute: delay + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: Delay must be a number greater than or equal to 0 + description: |- + Returned if: + + * the client tries to write a read-only property (`PropertyIsReadOnly`) + + * a constraint for a property was violated (`PropertyConstraintViolation`) + + * the client provides a link to an invalid resource (`ResourceTypeMismatch`) + headers: {} + tags: + - Work Packages + description: |- + When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. + The required fields of a Relation can be found in its schema, which is embedded in the respective form. + Note that it is only allowed to provide properties or links supporting the write operation. + operationId: Create_Relation + summary: Create Relation + "/api/v3/work_packages/{id}/watchers": + get: + parameters: + - description: Work package id + example: 1 + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/hal+json: + example: + _embedded: + elements: + - _links: + delete: + href: "/api/v3/users/1" + method: DELETE + title: Delete j.sheppard + lock: + href: "/api/v3/users/1/lock" + method: POST + title: Set lock on j.sheppard + self: + href: "/api/v3/users/1" + title: John Sheppard - j.sheppard + showUser: + href: "/users/1" + type: text/html + _type: User + avatar: https://example.org/users/1/avatar + createdAt: "2014-05-21T08:51:20Z" + firstName: John + id: 1 + lastName: Sheppard + login: j.sheppard + mail: shep@mail.com + status: active + updatedAt: "2014-05-21T08:51:20Z" + - _links: + delete: + href: "/api/v3/users/2" + method: DELETE + title: Delete j.sheppard2 + lock: + href: "/api/v3/users/2/lock" + method: POST + title: Set lock on j.sheppard2 + self: + href: "/api/v3/users/2" + title: Jim Sheppard - j.sheppard2 + _type: User + avatar: https://example.org/users/1/avatar + createdAt: "2014-05-21T08:51:20Z" + firstName: Jim + id: 2 + lastName: Sheppard + login: j.sheppard2 + mail: shep@mail.net + status: active + updatedAt: "2014-05-21T08:51:20Z" + _links: + self: + href: "/api/v3/work_packages/14/watchers" + _type: Collection + count: 2 + total: 2 + schema: + "$ref": "#/components/schemas/WatchersModel" + description: OK + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to see the watchers of this work package. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** view work package watchers + + *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work package does not exist. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + + *Note that you will effectively not be able to see the watchers of a work package without being able to see the work package.* + headers: {} + tags: + - Work Packages + description: "" + operationId: List_watchers + summary: List watchers + post: + parameters: + - description: Work package id + example: 1 + in: path + name: id + required: true + schema: + type: integer + responses: + "200": + description: OK + headers: {} + "201": + description: Created + headers: {} + "400": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody + message: The request body was not a single JSON object. + description: |- + Occurs when the client did not send a valid JSON object in the request body. + + For example: + + * The request did not contain a single JSON object + + * The JSON object did not contain the key `user` + + * The value of `users` was not a link object + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: You are not allowed to add watchers to this work package. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permissions:** + + * view work package (for self) + + * add work package watchers (for other users) + + *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work package does not exist. + description: |- + Returned if the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + + *Note that you will effectively not be able to change the watchers of a work package without being able to see the work package.* + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + "422": + description: |- + Returned if: + + * the client tries to specify a link to a resource that is not a user (`ResourceTypeMismatch`) + + * the user specified is not allowed to watch that work package (`PropertyConstraintViolation`) + + * the user specified does not exist (`PropertyConstraintViolation`) + headers: {} + tags: + - Work Packages + description: |- + Adds a watcher to the specified work package. + + The request is expected to contain a single JSON object, that contains a link object under the `user` key. + + The response will be user added as watcher. + In case the user was already watching the work package an `HTTP 200` is returned, an + `HTTP 201` if the user was added as a new watcher. + operationId: Add_watcher + requestBody: + content: + application/json: + schema: + example: + user: + href: "/api/v3/users/1" + properties: + user: + properties: + href: + type: string + type: object + type: object + summary: Add watcher + "/api/v3/work_packages/{id}/watchers/{user_id}": + delete: + parameters: + - description: Work package id + example: "1" + in: path + name: id + required: true + schema: + type: integer + - description: User id + example: "1" + in: path + name: user_id + required: true + schema: + type: integer + responses: + "204": + description: No Content + headers: {} + "403": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission + message: + You are not allowed to remove watchers from this work + package. + description: |- + Returned if the client does not have sufficient permissions. + + **Required permission:** delete work package watchers + + *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.* + headers: {} + "404": + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + examples: + response: + value: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:NotFound + message: The specified work package does not exist. + description: |- + Returned in one of the following cases: + + Either the work package does not exist or the client does not have sufficient permissions to see it. + + **Required permission:** view work package + + Or the specified user does not exist at all. + + *Note that you will effectively not be able to change the watchers of a work package without being able to see the work package.* + headers: {} + "406": + "$ref": "#/components/responses/MissingContentType" + "415": + "$ref": "#/components/responses/UnsupportedMediaType" + tags: + - Work Packages + description: |- + Removes the specified user from the list of watchers for the given work package. + + If the request succeeds, the specified user is not watching the work package anymore. + + *Note: This might also be the case, if the specified user did not watch the work package prior to the request.* + operationId: Remove_watcher + summary: Remove watcher +components: + examples: + DateAlertNotification: + value: + _type: Notification + id: 1 + readIAN: false + reason: dateAlert + createdAt: "2022-04-05T14:38:28Z" + updatedAt: "2022-04-06T09:03:24Z" + _embedded: + project: + _hint: Project resource shortened for brevity + _type: Project + id: 11 + name: Jedi Remnant Locator + resource: + _hint: WorkPackage resource shortened for brevity + _type: WorkPackage + id: 77 + subject: Educate Visas Marr + details: + - _type: Values::Property + property: startDate + value: "2021-01-01" + _links: + self: + href: api/v3/notifications/123/details/0 + schema: + href: api/v3/values/schemas/startDate + _links: + self: + href: "/api/v3/notifications/1" + readIAN: + href: "/api/v3/notifications/1/read_ian" + method: post + actor: + href: + project: + href: "/api/v3/projects/11" + title: Jedi Remnant Locator + activity: + href: + resource: + href: "/api/v3/work_packages/77" + title: Educate Visas Marr + GridSimpleCollectionResponse: + value: + _type: Collection, + total: 1, + count: 1, + pageSize: 30, + offset: 1, + _embedded: + elements: + - _type: Grid + id: 2 + rowCount: 8 + columnCount: 5 + widgets: + - _type: GridWidget + identifier: time_entries_current_user + startRow: 1 + endRow: 8 + startColumn: 1 + endColumn: 3 + - _type: GridWidget + identifier: news + startRow: 3 + endRow: 8 + startColumn: 4 + endColumn: 5 + - _type: GridWidget + identifier: documents + startRow: 1 + endRow: 3 + startColumn: 3 + endColumn: 6 + createdAt: "2018-12-03T16:58:30Z" + updatedAt: "2018-12-13T19:36:40Z" + _links: + scope: + href: "/my/page" + type: text/html + updateImmediately: + href: "/api/v3/grids/2" + method: patch + update: + href: "/api/v3/grids/2/form" + method: post + self: + href: "/api/v3/grids/2" + GridSimplePatchModel: + value: + rowCount: 1 + columnCount: 2 + widgets: + - _type: GridWidget + identifier: tasks + startRow: 1 + endRow: 2 + startColumn: 1 + endColumn: 2 + options: + name: Tasks + - _type: GridWidget + identifier: news + startRow: 1 + endRow: 2 + startColumn: 2 + endColumn: 3 + options: + name: News + _links: + scope: + href: "/my/page" + type: text/html + GridSimpleResponse: + value: + _type: Grid + id: 2 + rowCount: 8 + columnCount: 5 + widgets: + - _type: GridWidget + identifier: tasks + startRow: 1 + endRow: 8 + startColumn: 1 + endColumn: 3 + - _type: GridWidget + identifier: news + startRow: 3 + endRow: 8 + startColumn: 4 + endColumn: 5 + - _type: GridWidget + identifier: documents + startRow: 1 + endRow: 3 + startColumn: 3 + endColumn: 6 + createdAt: "2018-12-03T16:58:30Z" + updatedAt: "2018-12-13T19:36:40Z" + _links: + self: + href: "/api/v3/grids/2" + attachments: + href: "/api/v3/grids/2/attachments" + addAttachment: + href: "/api/v3/grids/2/attachments" + method: post + scope: + href: "/my/page" + type: text/html + updateImmediately: + href: "/api/v3/grids/2" + method: patch + update: + href: "/api/v3/grids/2/form" + method: post + delete: + href: "/api/v3/grids/2" + method: delete + MentionedNotification: + value: + _type: Notification + id: 1 + readIAN: false + reason: mentioned + createdAt: "2022-04-05T14:38:28Z" + updatedAt: "2022-04-06T09:03:24Z" + _embedded: + author: + _hint: User resource shortened for brevity + _type: User + id: 13 + name: Darth Nihilus + project: + _hint: Project resource shortened for brevity + _type: Project + id: 11 + name: Jedi Remnant Locator + activity: + _hint: Activity resource shortened for brevity + _type: Activity::Comment + id: 180 + version: 3 + resource: + _hint: WorkPackage resource shortened for brevity + _type: WorkPackage + id: 77 + subject: Educate Visas Marr + details: [] + _links: + self: + href: "/api/v3/notifications/1" + readIAN: + href: "/api/v3/notifications/1/read_ian" + method: post + actor: + href: "/api/v3/users/13" + title: Darth Nihilus + project: + href: "/api/v3/projects/11" + title: Jedi Remnant Locator + activity: + href: "/api/v3/activities/180" + resource: + href: "/api/v3/work_packages/77" + title: Educate Visas Marr + NotificationCollection: + value: + _type: Collection + count: 2 + total: 2 + offset: 1 + pageSize: 20 + _embedded: + elements: + - _hint: Notification resource shortened for brevity + id: 1 + readIAN: false + reason: mentioned + - _hint: Notification resource shortened for brevity + id: 2 + readIAN: false + reason: dateAlert + _embedded: + details: + - _type: Values::Property + property: startDate + value: "2021-01-01" + _links: + self: + href: api/v3/notifications/123/details/0 + schema: + href: api/v3/values/schemas/startDate + detailsSchemas: + - _type: Schema + property: + name: Property + type: String + value: + name: Start date + type: Date + _links: + self: + href: "/api/v3/values/schemas/startDate" + _links: + self: + href: "/api/v3/notifications?offset=1&pageSize=20" + jumpTo: + href: "/api/v3/notifications?filters=%5B%5D&offset=%7Boffset%7D&pageSize=20" + templated: true + changeSize: + href: "/api/v3/notifications?filters=%5B%5D&offset=1&pageSize=%7Bsize%7D" + templated: true + Project: + value: + _type: Project + _links: + self: + href: "/api/v3/projects/1" + title: Lorem + createWorkPackage: + href: "/api/v3/projects/1/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/1/work_packages" + method: post + categories: + href: "/api/v3/projects/1/categories" + types: + href: "/api/v3/projects/1/types" + versions: + href: "/api/v3/projects/1/versions" + workPackages: + href: "/api/v3/projects/1/work_packages" + memberships: + href: /api/v3/memberships?filters=[{"project":{"operator":"=","values":["1"]}}] + customField456: + href: "/api/v3/users/315" + title: A user + parent: + href: "/api/v3/projects/123" + title: Parent project + ancestors: + - href: "/api/v3/projects/2" + title: Root project + - href: "/api/v3/projects/12" + title: Grandparent project + - href: "/api/v3/projects/123" + title: Parent project + status: + href: "/api/v3/project_statuses/on_track" + title: On track + id: 1 + identifier: project_example + name: Project example + active: true + public: false + statusExplanation: + format: markdown + raw: Everything **fine** + html: "

Everything fine

" + description: + format: markdown + raw: Lorem **ipsum** dolor sit amet + html: "

Lorem ipsum dolor sit amet

" + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + customField123: 123 + ProjectBody: + value: + name: Project example + statusExplanation: + raw: Everything **fine** + description: + raw: Lorem **ipsum** dolor sit amet + customField123: 123 + _links: + parent: + href: "/api/v3/projects/123" + customField456: + href: "/api/v3/users/315" + QueriesModel: + value: + _links: + self: + href: "/api/v3/queries" + total: 1 + count: 1 + _type: Collection + _embedded: + elements: + - _type: Query + id: 9 + name: fdsfdsfdsf + createdAt: "2015-03-20T12:56:56Z" + updatedAt: "2015-05-20T18:16:53Z" + filters: + - _type: StatusQueryFilter + name: Status + _links: + filter: + href: "/api/v3/queries/filters/status" + title: Status + operator: + href: "/api/v3/queries/operators/o" + title: open + schema: + href: "/api/v3/queries/filter_instance_schemas/status" + values: [] + - _type: DueDateQueryFilter + name: Finish date + values: + - "1" + _links: + filter: + href: "/api/v3/queries/filters/dueDate" + title: Finish date + operator: + href: "/api/v3/queries/operators/" + _links: + self: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + jumpTo: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + changeSize: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + createWorkPackage: + href: "/api/v3/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/work_packages" + method: post + _links: + self: + href: "/api/v3/queries/9" + title: fdsfdsfdsf + results: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + columns: + - href: "/api/v3/queries/columns/id" + title: ID + - href: "/api/v3/queries/columns/subject" + title: Subject + - href: "/api/v3/queries/columns/type" + title: Type + - href: "/api/v3/queries/columns/status" + title: Status + - href: "/api/v3/queries/columns/priority" + title: Priority + - href: "/api/v3/queries/columns/assignee" + title: Assignee + - href: "/api/v3/queries/columns/updated_at" + title: Updated on + groupBy: + href: + title: + sortBy: + - href: "/api/v3/queries/sort_bys/parent-desc" + title: Parent (Descending) + user: + href: "/api/v3/users/1" + title: OpenProject Admin + project: + href: "/api/v3/projects/3" + title: copy + QueryModel: + value: + _type: Query + id: 9 + name: abcdefg + createdAt: "2015-03-20T12:56:56Z" + updatedAt: "2015-05-20T18:16:53Z" + filters: + - _type: StatusQueryFilter + name: Status + _links: + filter: + href: "/api/v3/queries/filters/status" + title: Status + operator: + href: "/api/v3/queries/operators/o" + title: open + schema: + href: "/api/v3/queries/filter_instance_schemas/status" + values: [] + - _type: DueDateQueryFilter + name: Finish date + values: + - "1" + _links: + filter: + href: "/api/v3/queries/filters/dueDate" + title: Finish date + operator: + href: "/api/v3/queries/operators/" + _links: + self: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + jumpTo: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + changeSize: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + createWorkPackage: + href: "/api/v3/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/work_packages" + method: post + _links: + self: + href: "/api/v3/queries/9" + title: abcdefg + results: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + groupBy: + href: + title: + sortBy: + - href: "/api/v3/queries/sort_bys/parent-desc" + title: Parent (Descending) + user: + href: "/api/v3/users/1" + title: OpenProject Admin + project: + href: "/api/v3/projects/3" + title: copy + QuerySchemaModel: + value: + _dependencies: [] + _embedded: + filtersSchemas: + _embedded: + elements: + - _dependencies: + - _type: SchemaDependency + dependencies: + "/api/v3/queries/operators/!": + values: + _links: {} + hasDefault: false + name: Values + required: true + type: "[]User" + writable: true + "/api/v3/queries/operators/!*": {} + "/api/v3/queries/operators/*": {} + "/api/v3/queries/operators/=": + values: + _links: {} + hasDefault: false + name: Values + required: true + type: "[]User" + writable: true + "on": operator + _links: + filter: + href: "/api/v3/queries/filters/assignee" + title: Assignee + self: + href: "/api/v3/queries/filter_instance_schemas/assignee" + _type: QueryFilterInstanceSchema + filter: + _links: {} + hasDefault: false + name: Filter + required: true + type: QueryFilter + writable: true + name: + hasDefault: true + name: Name + required: true + type: String + writable: false + - _dependencies: + - _type: SchemaDependency + dependencies: + "/api/v3/queries/operators/!": + values: + _links: {} + hasDefault: false + name: Values + required: true + type: "[]User" + writable: true + "/api/v3/queries/operators/=": + values: + _links: {} + hasDefault: false + name: Values + required: true + type: "[]User" + writable: true + "on": operator + _links: + filter: + href: "/api/v3/queries/filters/author" + title: Author + self: + href: "/api/v3/queries/filter_instance_schemas/author" + _type: QueryFilterInstanceSchema + filter: + _links: {} + hasDefault: false + name: Filter + required: true + type: QueryFilter + writable: true + name: + hasDefault: true + name: Name + required: true + type: String + writable: false + _links: + self: + href: "/api/v3/queries/filter_instance_schemas" + _type: Collection + count: 20 + total: 20 + _links: + self: + href: "/api/v3/queries/schema" + _type: Schema + columns: + _links: {} + hasDefault: true + location: _links + name: Columns + required: false + type: "[]QueryColumn" + writable: true + createdAt: + hasDefault: false + name: Created on + required: true + type: DateTime + writable: false + filters: + _links: + allowedValuesSchemas: + href: "/api/v3/queries/filter_instance_schemas" + hasDefault: true + location: _links + name: Filters + required: false + type: "[]QueryFilterInstance" + writable: true + groupBy: + _links: {} + hasDefault: false + name: Group results by + required: false + type: "[]QueryGroupBy" + writable: true + highlightedAttributes: + hasDefault: true + location: _links + name: Highlighted attributes + required: false + type: "[]QueryColumn" + writable: true + deprecated: true + highlightingMode: + hasDefault: true + name: Highlighting mode + required: false + type: String + writable: true + deprecated: true + id: + hasDefault: false + name: ID + required: true + type: Integer + writable: false + name: + hasDefault: false + maxLength: 255 + minLength: 1 + name: Name + required: true + type: String + writable: true + project: + _links: {} + hasDefault: false + location: _links + name: Project + required: false + type: Project + writable: true + public: + hasDefault: true + name: Public + required: false + type: Boolean + writable: true + results: + hasDefault: false + name: Results + required: false + type: WorkPackageCollection + writable: false + showHierarchies: + hasDefault: true + name: Show hierarchies + required: false + type: Boolean + writable: true + deprecated: true + sortBy: + _links: {} + hasDefault: true + name: Sort by + required: false + type: "[]QuerySortBy" + writable: true + starred: + hasDefault: true + name: Starred + required: false + type: Boolean + writable: true + sums: + hasDefault: true + name: Sums + required: false + type: Boolean + writable: true + timelineLabels: + hasDefault: true + name: Timeline labels + required: false + type: QueryTimelineLabels + writable: true + deprecated: true + timelineVisible: + hasDefault: true + name: Timeline visible + required: false + type: Boolean + writable: true + deprecated: true + timelineZoomLevel: + hasDefault: true + name: Timeline zoom level + required: false + type: String + writable: true + deprecated: true + timestamps: + hasDefault: true + name: Timestamps + required: false + type: "[]Timestamp" + writable: true + updatedAt: + hasDefault: false + name: Updated on + required: true + type: DateTime + writable: false + user: + hasDefault: true + name: User + required: true + type: User + writable: false + ValuesPropertyStartDateSchema: + value: + _type: Schema + property: + name: Property + type: String + value: + name: Start date + type: Date + _links: + self: + href: api/v3/values/schemas/startDate + ValuesPropertyDueDateSchema: + value: + _type: Schema + property: + name: Property + type: String + value: + name: Due date + type: Date + _links: + self: + href: api/v3/values/schemas/dueDate + ValuesPropertyDateSchema: + value: + _type: Schema + property: + name: Property + type: String + value: + name: Date + type: Date + _links: + self: + href: api/v3/values/schemas/date + ValuesPropertyStartDate: + value: + _type: Values::Property + property: startDate + value: "2021-01-01" + _links: + self: + href: api/v3/notifications/123/details/0 + schema: + href: api/v3/values/schemas/startDate + ValuesPropertyDueDate: + value: + _type: Values::Property + property: dueDate + value: "2021-01-01" + _links: + self: + href: api/v3/notifications/123/details/0 + schema: + href: api/v3/values/schemas/dueDate + ValuesPropertyDate: + value: + _type: Values::Property + property: date + value: "2021-01-01" + _links: + self: + href: api/v3/notifications/123/details/0 + schema: + href: api/v3/values/schemas/date + Views: + value: + _links: + self: + href: "/api/v3/views" + changeSize: + href: "/api/v3/views?pageSize={size}" + templated: true + jumpTo: + href: "/api/v3/views?offset={offset}" + templated: true + total: 1 + count: 1 + _type: Collection + _embedded: + elements: + - _type: Views::WorkPackagesTable + name: Current work packages + timelineVisible: true + id: 9 + _links: + self: + href: "/api/v3/views/9" + query: + href: "/api/v3/queries/18" + title: A query + columns: + - href: "/api/v3/users/id" + title: ID + - href: "/api/v3/users/subject" + title: Subject + - href: "/api/v3/users/type" + title: Type + - href: "/api/v3/users/status" + title: Status + - href: "/api/v3/users/priority" + title: Priority + - href: "/api/v3/users/assignee" + title: Assignee + - href: "/api/v3/users/updated_at" + title: Updated on + project: + href: "/api/v3/project/89" + title: The project + ViewWorkPackagesTable: + value: + _type: Views::WorkPackagesTable + name: Current work packages + id: 9 + _links: + self: + href: "/api/v3/views/9" + query: + href: "/api/v3/queries/18" + title: Current work packages + project: + href: "/api/v3/project/89" + title: The project + ViewTeamPlanner: + value: + _type: Views::TeamPlanner + name: Product team + id: 9 + _links: + self: + href: "/api/v3/views/9" + query: + href: "/api/v3/queries/18" + title: Product team + project: + href: "/api/v3/project/89" + title: The project + responses: + InvalidRequestBody: + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody + message: The request body was not a single JSON object. + description: + Occurs when the client did not send a valid JSON object in the + request body. + MissingContentType: + content: + text/plain: + schema: + type: string + description: Occurs when the client did not send a Content-Type header + UnsupportedMediaType: + content: + application/hal+json: + schema: + "$ref": "#/components/schemas/ErrorResponse" + example: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:TypeNotSupported + message: + Expected CONTENT-TYPE to be (expected value) but got (actual + value). + description: Occurs when the client sends an unsupported Content-Type header. + schemas: + ActivityModel: + type: object + properties: + id: + type: integer + description: Activity id + readOnly: true + exclusiveMinimum: 0 + version: + type: integer + description: Activity version + readOnly: true + exclusiveMinimum: 0 + comment: + allOf: + - "$ref": "#/components/schemas/Formattable" + - {} + details: + type: array + readOnly: true + items: + allOf: + - "$ref": "#/components/schemas/Formattable" + createdAt: + type: string + format: date-time + description: Time of creation + readOnly: true + updatedAt: + type: string + format: date-time + description: Time of update + readOnly: true + example: + _type: Activity::Comment + _links: + self: + href: "/api/v3/activity/1" + title: Priority changed from High to Low + workPackage: + href: "/api/v3/work_packages/1" + title: quis numquam qui voluptatum quia praesentium blanditiis nisi + user: + href: "/api/v3/users/1" + title: John Sheppard - admin + id: 1 + details: + - format: markdown + raw: Lorem ipsum dolor sit amet. + html: "

Lorem ipsum dolor sit amet.

" + comment: + format: markdown + raw: Lorem ipsum dolor sit amet. + html: "

Lorem ipsum dolor sit amet.

" + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T09:14:02Z" + version: 31 + AttachmentModel: + type: object + required: + - title + - fileName + - description + - contentType + - digest + - createdAt + properties: + id: + type: integer + description: Attachment's id + minimum: 1 + title: + type: string + description: The name of the file + fileName: + type: string + description: The name of the uploaded file + fileSize: + type: integer + description: The size of the uploaded file in Bytes + minimum: 0 + description: + allOf: + - "$ref": "#/components/schemas/Formattable" + - description: A user provided description of the file + contentType: + type: string + description: The files MIME-Type as determined by the server + digest: + type: string + description: A checksum for the files content + createdAt: + type: string + format: date-time + description: Time of creation + _links: + type: object + required: + - self + - container + - author + - downloadLocation + properties: + delete: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Deletes this attachment + + # Conditions + + **Permission**: edit on attachment container or being the author for attachments without container + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This attachment + + **Resource**: Attachment + container: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The object (e.g. WorkPackage) housing the attachment + + **Resource**: Anything + author: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The user who uploaded the attachment + + **Resource**: User + downloadLocation: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Direct download link to the attachment + + **Resource**: - + example: + _type: Attachment + _links: + self: + href: "/api/v3/attachments/1" + container: + href: "/api/v3/work_packages/1" + author: + href: "/api/v3/users/1" + staticDownloadLocation: + href: "/api/v3/attachments/1/content" + downloadLocation: + href: "/some/remote/aws/url/image.png" + id: 1 + fileName: cat.png + filesize: 24 + description: + format: plain + raw: A picture of a cute cat + html: "

A picture of a cute cat

" + contentType: image/png + digest: + algorithm: md5 + hash: 64c26a8403cd796ea4cf913cda2ee4a9 + createdAt: "2014-05-21T08:51:20Z" + Attachments_Model: + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - _links + - _embedded + properties: + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The attachments collection + + **Resource**: AttachmentsCollection + readOnly: true + _embedded: + type: object + properties: + elements: + type: array + readOnly: true + items: + allOf: + - "$ref": "#/components/schemas/AttachmentModel" + - description: Collection of Attachments + Available_AssigneesModel: + type: object + example: + _links: + self: + href: "/api/v3/projects/42/available_assignees" + total: 2 + count: 2 + _type: Collection + _embedded: + elements: + - _type: User + _links: + self: + href: "/api/v3/users/1" + title: John Sheppard - j.sheppard + lock: + href: "/api/v3/users/1/lock" + title: Set lock on j.sheppard + method: POST + delete: + href: "/api/v3/users/1" + title: Delete j.sheppard + method: DELETE + id: 1 + login: j.sheppard + firstName: John + lastName: Sheppard + email: shep@mail.com + avatar: https://example.org/users/1/avatar + status: active + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + - _type: User + _links: + self: + href: "/api/v3/users/2" + title: Jim Sheppard - j.sheppard2 + lock: + href: "/api/v3/users/2/lock" + title: Set lock on j.sheppard2 + method: POST + delete: + href: "/api/v3/users/2" + title: Delete j.sheppard2 + method: DELETE + id: 2 + login: j.sheppard2 + firstName: Jim + lastName: Sheppard + email: shep@mail.net + avatar: https://example.org/users/1/avatar + status: active + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + Available_ResponsiblesModel: + type: object + example: + _links: + self: + href: "/api/v3/projects/42/available_responsibles" + total: 2 + count: 2 + _type: Collection + _embedded: + elements: + - _type: User + _links: + self: + href: "/api/v3/users/1" + title: John Sheppard - j.sheppard + lock: + href: "/api/v3/users/1/lock" + title: Set lock on j.sheppard + method: POST + delete: + href: "/api/v3/users/1" + title: Delete j.sheppard + method: DELETE + id: 1 + login: j.sheppard + firstName: John + lastName: Sheppard + email: shep@mail.com + avatar: https://example.org/users/1/avatar + status: active + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + - _type: User + _links: + self: + href: "/api/v3/users/2" + title: Jim Sheppard - j.sheppard2 + lock: + href: "/api/v3/users/2/lock" + title: Set lock on j.sheppard2 + method: POST + delete: + href: "/api/v3/users/2" + title: Delete j.sheppard2 + method: DELETE + id: 2 + login: j.sheppard2 + firstName: Jim + lastName: Sheppard + email: shep@mail.net + avatar: https://example.org/users/1/avatar + status: active + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + Available_WatchersModel: + type: object + example: + _links: + self: + href: "/api/v3/work_packages/1/available_watchers" + total: 2 + count: 2 + _type: Collection + _embedded: + elements: + - _type: User + _links: + self: + href: "/api/v3/users/1" + title: John Sheppard - j.sheppard + lock: + href: "/api/v3/users/1/lock" + title: Set lock on j.sheppard + method: POST + delete: + href: "/api/v3/users/1" + title: Delete j.sheppard + method: DELETE + id: 1 + login: j.sheppard + firstName: John + lastName: Sheppard + email: shep@mail.com + avatar: https://example.org/users/1/avatar + status: active + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + - _type: User + _links: + self: + href: "/api/v3/users/2" + title: Jim Sheppard - j.sheppard2 + lock: + href: "/api/v3/users/2/lock" + title: Set lock on j.sheppard2 + method: POST + delete: + href: "/api/v3/users/2" + title: Delete j.sheppard2 + method: DELETE + id: 2 + login: j.sheppard2 + firstName: Jim + lastName: Sheppard + email: shep@mail.net + avatar: https://example.org/users/1/avatar + status: active + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + Available_projects_for_membershipsModel: + type: object + example: + _links: + self: + href: "/api/v3/memberships/available_projects" + _type: Collection + total: 2 + count: 2 + _embedded: + elements: + - _type: Project + _links: + self: + href: "/api/v3/projects/6" + title: A project + editWorkPackage: + href: "/api/v3/work_packages/{id}/form" + templated: true + method: post + createWorkPackage: + href: "/api/v3/projects/6/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/6/work_packages" + method: post + categories: + href: "/api/v3/projects/6/categories" + memberships: + href: "/api/v3/projects/6/memberships" + id: 6 + identifier: a_project + name: A project + description: + Eveniet molestias omnis quis aut qui eum adipisci. Atque + aut aut in exercitationem adipisci amet. Nisi asperiores quia ratione + veritatis enim exercitationem magnam. Aut fuga architecto adipisci nihil. + Et repellat pariatur. Aliquam et sed perferendis nostrum quaerat. Fugit + doloremque voluptatem. + createdAt: "2015-07-06T13:28:14+00:00" + updatedAt: "2015-10-01T09:55:02+00:00" + type: Customer Project + - _type: Project + _links: + self: + href: "/api/v3/projects/14" + title: Another project + createWorkPackage: + href: "/api/v3/projects/14/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/14/work_packages" + method: post + categories: + href: "/api/v3/projects/14/categories" + memberships: + href: "/api/v3/projects/14/memberships" + id: 14 + identifier: another_project + name: Another project + description: "" + createdAt: "2016-02-29T12:50:20+00:00" + updatedAt: "2016-02-29T12:50:20+00:00" + type: + Available_projects_for_queryModel: + type: object + example: + _links: + self: + href: "/api/v3/queries/available_projects" + _type: Collection + total: 2 + count: 2 + _embedded: + elements: + - _type: Project + _links: + self: + href: "/api/v3/projects/6" + title: A project + createWorkPackage: + href: "/api/v3/projects/6/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/6/work_packages" + method: post + categories: + href: "/api/v3/projects/6/categories" + versions: + href: "/api/v3/projects/6/versions" + id: 6 + identifier: a_project + name: A project + description: Eveniet molestias omnis quis aut qui eum adipisci. + createdAt: "2015-07-06T13:28:14+00:00" + updatedAt: "2015-10-01T09:55:02+00:00" + type: Customer Project + - _type: Project + _links: + self: + href: "/api/v3/projects/14" + title: Another project + createWorkPackage: + href: "/api/v3/projects/14/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/14/work_packages" + method: post + categories: + href: "/api/v3/projects/14/categories" + versions: + href: "/api/v3/projects/14/versions" + id: 14 + identifier: another_project + name: Another project + description: "" + createdAt: "2016-02-29T12:50:20+00:00" + updatedAt: "2016-02-29T12:50:20+00:00" + type: + Available_projects_for_time_entriesModel: + type: object + example: + _links: + self: + href: "/api/v3/time_entries/available_projects" + _type: Collection + total: 2 + count: 2 + _embedded: + elements: + - _type: Project... + - _type: Project... + Available_projects_for_versionsModel: + type: object + example: + _links: + self: + href: "/api/v3/versions/available_projects" + _type: Collection + total: 2 + count: 2 + _embedded: + elements: + - _type: Project + _links: + self: + href: "/api/v3/projects/6" + title: A project + editWorkPackage: + href: "/api/v3/work_packages/{id}/form" + templated: true + method: post + createWorkPackage: + href: "/api/v3/projects/6/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/6/work_packages" + method: post + categories: + href: "/api/v3/projects/6/categories" + versions: + href: "/api/v3/projects/6/versions" + id: 6 + identifier: a_project + name: A project + description: + Eveniet molestias omnis quis aut qui eum adipisci. Atque + aut aut in exercitationem adipisci amet. Nisi asperiores quia ratione + veritatis enim exercitationem magnam. Aut fuga architecto adipisci nihil. + Et repellat pariatur. Aliquam et sed perferendis nostrum quaerat. Fugit + doloremque voluptatem. + createdAt: "2015-07-06T13:28:14+00:00" + updatedAt: "2015-10-01T09:55:02+00:00" + type: Customer Project + - _type: Project + _links: + self: + href: "/api/v3/projects/14" + title: Another project + createWorkPackage: + href: "/api/v3/projects/14/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/14/work_packages" + method: post + categories: + href: "/api/v3/projects/14/categories" + versions: + href: "/api/v3/projects/14/versions" + id: 14 + identifier: another_project + name: Another project + description: "" + createdAt: "2016-02-29T12:50:20+00:00" + updatedAt: "2016-02-29T12:50:20+00:00" + type: + Available_projects_for_work_packageModel: + type: object + example: + _links: + self: + href: "/api/v3/work_packages/5/available_projects" + _type: Collection + total: 2 + count: 2 + _embedded: + elements: + - _type: Project + _links: + self: + href: "/api/v3/projects/6" + title: A project + editWorkPackage: + href: "/api/v3/work_packages/{id}/form" + templated: true + method: post + createWorkPackage: + href: "/api/v3/projects/6/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/6/work_packages" + method: post + categories: + href: "/api/v3/projects/6/categories" + versions: + href: "/api/v3/projects/6/versions" + id: 6 + identifier: a_project + name: A project + description: + Eveniet molestias omnis quis aut qui eum adipisci. Atque + aut aut in exercitationem adipisci amet. Nisi asperiores quia ratione + veritatis enim exercitationem magnam. Aut fuga architecto adipisci nihil. + Et repellat pariatur. Aliquam et sed perferendis nostrum quaerat. Fugit + doloremque voluptatem. + createdAt: "2015-07-06T13:28:14+00:00" + updatedAt: "2015-10-01T09:55:02+00:00" + type: Customer Project + - _type: Project + _links: + self: + href: "/api/v3/projects/14" + title: Another project + createWorkPackage: + href: "/api/v3/projects/14/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/14/work_packages" + method: post + categories: + href: "/api/v3/projects/14/categories" + versions: + href: "/api/v3/projects/14/versions" + id: 14 + identifier: another_project + name: Another project + description: "" + createdAt: "2016-02-29T12:50:20+00:00" + updatedAt: "2016-02-29T12:50:20+00:00" + type: + Available_relation_candidatesModel: + type: object + example: + _links: + self: + href: "/api/v3/projects/14/work_packages" + total: 2 + count: 2 + _type: Collection + _embedded: + elements: + - _type: WorkPackage + _links: + self: + href: "/api/v3/work_packages/1" + id: 1 + subject: Skipped other properties for brevity + - _type: WorkPackage + _links: + self: + href: "/api/v3/work_packages/2" + id: 2 + subject: Skipped other properties for brevity + BudgetModel: + type: object + properties: + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This budget + + **Resource**: Budget + readOnly: true + example: + _type: Budget + _links: + self: + href: "/api/v3/budgets/1" + title: Q3 2015 + id: 1 + subject: Q3 2015 + Budgets_by_ProjectModel: + type: object + example: + _links: + self: + href: "/api/v3/projects/1/budgets" + _type: Collection + total: 2 + count: 2 + _embedded: + elements: + - _type: Budget + _links: + self: + href: "/api/v3/budgets/1" + title: Q3 2015 + id: 1 + subject: Q3 2015 + - _type: Budget + _links: + self: + href: "/api/v3/budgets/2" + title: Q4 2015 + id: 2 + subject: Q4 2015 + Categories_by_ProjectModel: + type: object + example: + _links: + self: + href: "/api/v3/projects/11/categories" + total: 2 + count: 2 + _type: Collection + _embedded: + elements: + - _links: + self: + href: "/api/v3/categories/10" + title: Category with assignee + project: + href: "/api/v3/projects/11" + title: Example project + defaultAssignee: + href: "/api/v3/users/42" + title: John Sheppard + _type: Category + id: 10 + name: Foo + - _links: + self: + href: "/api/v3/categories/11" + project: + href: "/api/v3/projects/11" + _type: Category + id: 11 + name: Bar + CategoryModel: + type: object + properties: + id: + type: integer + description: Category id + readOnly: true + exclusiveMinimum: 0 + name: + type: string + description: Category name + _links: + type: object + required: + - self + - project + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This category + + **Resource**: Category + readOnly: true + project: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The project of this category + + **Resource**: Project + readOnly: true + defaultAssignee: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Default assignee for work packages of this category + + **Resource**: User + readOnly: true + example: + _links: + self: + href: "/api/v3/categories/10" + title: Category with assignee + project: + href: "/api/v3/projects/11" + title: Example project + defaultAssignee: + href: "/api/v3/users/42" + title: John Sheppard + _type: Category + id: 10 + name: Foo + CollectionModel: + type: object + required: + - _type + - total + - count + - _links + properties: + _type: + type: string + enum: + - Collection + total: + type: integer + description: The total amount of elements available in the collection. + minimum: 0 + count: + type: integer + description: Actual amount of elements in this response. + minimum: 0 + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This collection resource. + + **Resource**: Collection + ConfigurationModel: + type: object + properties: + maximumAttachmentFileSize: + type: integer + description: The maximum allowed size of an attachment in Bytes + readOnly: true + hostName: + type: string + description: The host name configured for the system + readOnly: true + perPageOptions: + type: array + description: Page size steps to be offered in paginated list UI + items: + type: integer + activeFeatureFlags: + type: array + description: The list of all feature flags that are active + items: + type: string + CustomActionModel: + type: object + properties: + _type: + type: string + enum: + - CustomAction + name: + type: string + description: The name of the custom action + description: + type: string + description: The description for the custom action + _links: + type: object + required: + - self + - executeImmediately + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This custom action + + **Resource**: CustomAction + executeImmediately: + allOf: + - "$ref": "#/components/schemas/Link" + - description: Execute this custom action. + examples: + - _type: CustomAction + name: Change project and type + description: Changes project and type in one go + _links: + executeImmediately: + href: "/api/v3/custom_actions/2/execute" + title: Execute Change project and type + method: post + self: + href: "/api/v3/custom_actions/2" + title: Change project and type + CustomOptionModel: + type: object + properties: + id: + type: integer + description: The identifier + readOnly: true + value: + type: string + description: The value defined for this custom option + readOnly: true + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This custom option. + + **Resource**: CustomOption + readOnly: true + example: + _links: + self: + href: "/api/v3/custom_options/1" + _type: CustomOption + value: Foo + DayCollectionModel: + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - _links + - _embedded + properties: + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This days collection + + **Resource**: DayCollectionModel + _embedded: + type: object + required: + - elements + properties: + elements: + type: array + description: |- + The array of days. Each day has a name and a working status + indicating if it is a working or a non-working day. + items: + "$ref": "#/components/schemas/DayModel" + example: + _type: Collection + total: 5 + count: 5 + _links: + self: + href: /api/v3/days?filters=[{"interval":{"operator":"<>d","values":["2022-04-29","2022-05-03"]}}] + _embedded: + elements: + - _type: Day + date: "2022-04-29" + name: Friday + working: true + _links: + self: + href: "/api/v3/days/2022-04-29" + weekday: + href: "/api/v3/days/week/5" + title: Friday + - _type: Day + date: "2022-04-30" + name: Saturday + working: false + _links: + self: + href: "/api/v3/days/2022-04-30" + nonWorkingReasons: + - href: "/api/v3/days/week/6" + title: Saturday + weekday: + href: "/api/v3/days/week/6" + title: Saturday + - _type: Day + date: "2022-05-01" + name: Sunday (Labour day) + working: false + _links: + self: + href: "/api/v3/days/2022-05-01" + nonWorkingReasons: + - href: "/api/v3/days/week/7" + title: Sunday + - href: "/api/v3/days/non_working/2022-05-01" + title: Labour day + weekday: + href: "/api/v3/days/week/7" + title: Sunday + - _type: Day + date: "2022-05-02" + name: Monday + working: true + _links: + self: + href: "/api/v3/days/2022-05-02" + weekday: + href: "/api/v3/days/week/1" + title: Monday + - _type: Day + date: "2022-05-03" + name: Tuesday + working: true + _links: + self: + href: "/api/v3/days/2022-05-03" + weekday: + href: "/api/v3/days/week/2" + title: Tuesday + DayModel: + type: object + required: + - _type + - date + - name + - working + properties: + _type: + type: string + enum: + - Day + date: + type: string + format: date + description: Date of the day. + name: + type: string + description: Descriptive name for the day. + working: + type: boolean + description: "`true` for a working day, `false` otherwise." + _links: + type: object + required: + - self + properties: + self: + "$ref": "#/components/schemas/Link" + nonWorkingReasons: + type: array + description: |- + A list of resources describing why this day is a non-working day. + Linked resources can be `NonWorkingDay` and `WeekDay` resources. + This property is absent for working days. + items: + "$ref": "#/components/schemas/Link" + weekDay: + allOf: + - "$ref": "#/components/schemas/Link" + - description: The week day for this day. + example: + _type: Day + date: "2022-12-25" + name: Sunday (Christmas) + working: false + _links: + self: + href: "/api/v3/days/2022-12-25" + nonWorkingReasons: + - href: "/api/v3/days/week/7" + title: Sunday + - href: "/api/v3/days/non_working/2022-12-25" + title: Christmas + weekday: + href: "/api/v3/days/week/7" + title: Sunday + Default_QueryModel: + type: object + example: + _type: Query + name: default + filters: + - _type: StatusQueryFilter + name: Status + _links: + filter: + href: "/api/v3/queries/filters/status" + title: Status + operator: + href: "/api/v3/queries/operators/o" + title: open + schema: + href: "/api/v3/queries/filter_instance_schemas/status" + values: [] + public: false + sums: false + timelineVisible: false + timelineZoomLevel: days + timelineLabels: {} + highlightingMode: inline + timestamps: + - P0D + showHierarchies: true + starred: false + _embedded: + results: + _type: WorkPackageCollection + total: 234 + count: 30 + pageSize: 2 + offset: 1 + _embedded: + elements: + - "<--- shortened for brevity --->" + _links: + self: + href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + jumpTo: + href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + changeSize: + href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + createWorkPackage: + href: "/api/v3/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/work_packages" + method: post + highlightedAttributes: [] + _links: + self: + href: "/api/v3/queries/default" + title: Default + results: + href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + columns: + - href: "/api/v3/queries/columns/id" + title: ID + - href: "/api/v3/queries/columns/subject" + title: Subject + - href: "/api/v3/queries/columns/type" + title: Type + - href: "/api/v3/queries/columns/status" + title: Status + - href: "/api/v3/queries/columns/priority" + title: Priority + - href: "/api/v3/queries/columns/assignee" + title: Assignee + - href: "/api/v3/queries/columns/updated_at" + title: Updated on + highlightedAttributes: [] + groupBy: + href: + title: + sortBy: + - href: "/api/v3/queries/sort_bys/parent-desc" + title: Parent (Descending) + user: + href: "/api/v3/users/1" + title: OpenProject Admin + project: + href: + Default_Query_for_ProjectModel: + type: object + example: + _type: Query + name: default + filters: + - _type: StatusQueryFilter + name: Status + _links: + filter: + href: "/api/v3/queries/filters/status" + title: Status + operator: + href: "/api/v3/queries/operators/o" + title: open + schema: + href: "/api/v3/queries/filter_instance_schemas/status" + values: [] + public: false + sums: false + timelineVisible: false + timelineZoomLevel: days + showHierarchies: true + starred: false + _embedded: + results: + _type: WorkPackageCollection + total: 234 + count: 30 + pageSize: 2 + offset: 1 + _embedded: + elements: + - "<--- shortened for brevity --->" + _links: + self: + href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + jumpTo: + href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + changeSize: + href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + createWorkPackage: + href: "/api/v3/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/work_packages" + method: post + _links: + self: + href: "/api/v3/projects/42/queries/default" + title: Default + results: + href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + columns: + - href: "/api/v3/queries/columns/id" + title: ID + - href: "/api/v3/queries/columns/subject" + title: Subject + - href: "/api/v3/queries/columns/type" + title: Type + - href: "/api/v3/queries/columns/status" + title: Status + - href: "/api/v3/queries/columns/priority" + title: Priority + - href: "/api/v3/queries/columns/assignee" + title: Assignee + - href: "/api/v3/queries/columns/updated_at" + title: Updated on + groupBy: + href: + title: + sortBy: + - href: "/api/v3/queries/sort_bys/parent-desc" + title: Parent (Descending) + user: + href: "/api/v3/users/1" + title: OpenProject Admin + project: + href: "/api/v3/projects/42" + title: Lorem ipsum project + DocumentModel: + type: object + properties: + id: + type: integer + description: Document's id + readOnly: true + exclusiveMinimum: 0 + title: + type: string + description: The title chosen for the collection of documents + readOnly: true + description: + type: string + description: A text describing the documents + readOnly: true + createdAt: + type: string + format: date-time + description: The time the document was created at + readOnly: true + _links: + type: object + required: + - self + - project + - attachments + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This document + + **Resource**: Document + readOnly: true + project: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The project the document is in + + **Resource**: Project + attachments: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The attachments belonging to the document + + **Resource**: []Attachment + example: + _type: Document + id: 1 + title: Some other document + description: + format: markdown + raw: + Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur + vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. + Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis + eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus + cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui. + html: + "

Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur + vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. + Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis + eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus + cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.

" + createdAt: "2018-12-10T20:53:39Z" + _links: + attachments: + href: "/api/v3/documents/1/attachments" + addAttachment: + href: "/api/v3/documents/1/attachments" + method: post + self: + href: "/api/v3/documents/1" + title: Some document + project: + href: "/api/v3/projects/19" + title: Some project + _embedded: + project: + _type: Project... + attachments: + _type: Collection + total: 2 + count: 2 + _embedded...: + elements: [] + _links: + self: + href: "/api/v3/documents/1/attachments" + DocumentsModel: + type: object + example: + _type: Collection + total: 2 + count: 2 + pageSize: 30 + offset: 1 + _embedded: + elements: + - description: + format: markdown + raw: + Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur + vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. + Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis + eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus + cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum + qui. + html: + "

Videlicet deserunt aequitas cognatus. Concedo quia est quia + pariatur vorago vallum. Calco autem atavus accusamus conscendo cornu + ulterius. Tam patria ago consectetur ventito sustineo nihil caecus. + Supra officiis eos velociter somniculosus tonsor qui. Suffragium aduro + arguo angustus cogito quia tolero vulnus. Supplanto sortitus cresco + apud vestrum qui.

" + _type: Document + id: 1 + title: Some other document + createdAt: "2018-12-10T20:53:39Z" + _links: + attachments: + href: "/api/v3/documents/1/attachments" + addAttachment: + href: "/api/v3/documents/1/attachments" + method: post + self: + href: "/api/v3/documents/1" + title: Some document + project: + href: "/api/v3/projects/19" + title: Some project + - description: + format: markdown + raw: + Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur + vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. + Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis + eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus + cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum + qui. + html: + "

Videlicet deserunt aequitas cognatus. Concedo quia est quia + pariatur vorago vallum. Calco autem atavus accusamus conscendo cornu + ulterius. Tam patria ago consectetur ventito sustineo nihil caecus. + Supra officiis eos velociter somniculosus tonsor qui. Suffragium aduro + arguo angustus cogito quia tolero vulnus. Supplanto sortitus cresco + apud vestrum qui.

" + _type: Document + id: 2 + title: Some other document + createdAt: "2018-12-10T20:55:54Z" + _links: + attachments: + href: "/api/v3/documents/2/attachments" + addAttachment: + href: "/api/v3/documents/2/attachments" + method: post + self: + href: "/api/v3/documents/2" + title: Some other document + project: + href: "/api/v3/projects/29" + title: Some other project + _links: + self: + href: "/api/v3/documents?offset=1&pageSize=30" + jumpTo: + href: "/api/v3/documents?offset=%7Boffset%7D&pageSize=30" + templated: true + changeSize: + href: "/api/v3/documents?offset=1&pageSize=%7Bsize%7D" + templated: true + ErrorResponse: + type: object + required: + - _type + - errorIdentifier + - message + properties: + _embedded: + type: object + properties: + details: + type: object + properties: + attribute: + type: string + example: project + _type: + type: string + enum: + - Error + errorIdentifier: + type: string + example: urn:openproject-org:api:v3:errors:PropertyConstraintViolation + message: + type: string + example: Project can't be blank. + Example_FormModel: + type: object + example: + _links: + self: + href: "/api/v3/example/form" + validate: + href: "/api/v3/example/form" + method: POST + previewMarkup: + href: "/api/v3/render/markdown" + method: POST + commit: + href: "/api/v3/example" + method: PATCH + _type: Form + _embedded: + payload: + _links: + status: + href: "/api/v3/statuses/1" + _type: Example + lockVersion: 5 + subject: An example title + schema: + _type: Schema + _links: + self: + href: "/api/v3/example/schema" + lockVersion: + type: Integer + writable: false + subject: + type: String + minLength: 1 + maxLength: 255 + status: + _links: + allowedValues: + - href: "/api/v3/statuses/1" + title: New + - href: "/api/v3/statuses/2" + title: Closed + type: Status + _embedded: + allowedValues: + - _links: + self: + href: "/api/v3/statuses/1" + _type: Status + id: 1 + name: New + position: 1 + isDefault: true + isClosed: false + defaultDoneRatio: 0 + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T09:12:00Z" + - _links: + self: + href: "/api/v3/statuses/2" + _type: Status + id: 2 + name: Closed + position: 2 + isDefault: false + isClosed: true + defaultDoneRatio: 100 + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T09:12:00Z" + validationErrors: + subject: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:BadExampleError + message: + For the purpose of this example we need a validation error. + The remainder of the response pretends there were no errors. + Example_SchemaModel: + type: object + example: + _type: Schema + _dependencies: [] + _links: + self: + href: "/api/v3/example/schema" + lockVersion: + name: Resource Version + type: Integer + writable: false + subject: + name: Subject + type: String + minLength: 1 + maxLength: 255 + status: + _links: + allowedValues: + - href: "/api/v3/statuses/1" + title: New + - href: "/api/v3/statuses/2" + title: Closed + name: Status + type: Status + location: _links + _embedded: + allowedValues: + - _links: + self: + href: "/api/v3/statuses/1" + _type: Status + id: 1 + name: New + position: 1 + isDefault: true + isClosed: false + defaultDoneRatio: 0 + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T09:12:00Z" + - _links: + self: + href: "/api/v3/statuses/2" + _type: Status + id: 2 + name: Closed + position: 2 + isDefault: false + isClosed: true + defaultDoneRatio: 100 + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T09:12:00Z" + FileLinkCollectionReadModel: + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - _links + - _embedded + properties: + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This file links collection + + **Resource**: FileLinkCollectionReadModel + _embedded: + type: object + required: + - elements + properties: + elements: + type: array + items: + "$ref": "#/components/schemas/FileLinkReadModel" + example: + _type: Collection + total: 2 + count: 2 + _links: + self: + href: "/api/v3/work_packages/42/file_links" + _embedded: + elements: + - id: 1337 + _type: FileLink + createdAt: "2021-12-20T13:37:00.211Z" + updatedAt: "2021-12-20T13:37:00.211Z" + originData: + id: 5503 + name: logo.png + mimeType: image/png + size: 16042 + createdAt: "2021-12-19T09:42:10.170Z" + lastModifiedAt: "2021-12-20T14:00:13.987Z" + createdByName: Luke Skywalker + lastModifiedByName: Anakin Skywalker + _links: + self: + href: "/api/v3/work_package/17/file_links/1337" + title: file link + storage: + href: "/api/v3/storage/42" + title: storage + container: + href: "/api/v3/work_package/17" + title: work package + creator: + href: "/api/v3/users/33" + title: Obi-Wan Kenobi + delete: + href: "/api/v3/work_package/17/file_links/1337" + method: delete + originOpen: + href: https://nextcloud.deathstar.rocks/index.php/f?fileid=5503 + staticOriginOpen: + href: "/api/v3/work_package/17/file_links/1337/open" + - _hint: File Link resource shortened for brevity + id: 1338 + FileLinkCollectionWriteModel: + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - _embedded + properties: + _embedded: + type: object + required: + - elements + properties: + elements: + type: array + items: + "$ref": "#/components/schemas/FileLinkWriteModel" + example: + _embedded: + elements: + - originData: + id: 5503 + name: logo.png + mimeType: image/png + size: 16042 + createdAt: "2021-12-19T09:42:10.170Z" + lastModifiedAt: "2021-12-20T14:00:13.987Z" + createdByName: Luke Skywalker + lastModifiedByName: Anakin Skywalker + _links: + storage: + href: "/api/v3/storage/42" + - _hint: File Link resource shortened for brevity + id: 1338 + FileLinkOriginDataModel: + type: object + required: + - id + - name + properties: + id: + type: string + description: Linked file's id on the origin + name: + type: string + description: Linked file's name on the origin + mimeType: + type: string + minLength: 0 + description: |- + MIME type of the linked file. + + To link a folder entity, the custom MIME type `application/x-op-directory` MUST be provided. Otherwise it defaults back to + an unknown MIME type. + size: + type: integer + minimum: 0 + description: file size on origin in bytes + createdAt: + type: string + format: date-time + description: Timestamp of the creation datetime of the file on the origin + lastModifiedAt: + type: string + format: date-time + description: + Timestamp of the datetime of the last modification of the file + on the origin + createdByName: + type: string + description: Display name of the author that created the file on the origin + lastModifiedByName: + type: string + description: + Display name of the author that modified the file on the origin + last + FileLinkReadModel: + type: object + required: + - id + - _type + - originData + - _links + properties: + id: + type: integer + description: File link id + _type: + type: string + enum: + - FileLink + createdAt: + type: string + format: date-time + description: Time of creation + updatedAt: + type: string + format: date-time + description: Time of the most recent change to the file link + originData: + "$ref": "#/components/schemas/FileLinkOriginDataModel" + _embedded: + type: object + required: + - storage + - container + properties: + storage: + "$ref": "#/components/schemas/StorageReadModel" + container: + "$ref": "#/components/schemas/Work_PackageModel" + _links: + type: object + required: + - self + - storage + - container + - creator + - permission + - originOpen + - staticOriginOpen + - originOpenLocation + - staticOriginOpenLocation + - staticOriginDownload + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This file link. + + **Resource**: FileLink + storage: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The storage resource of the linked file. + + **Resource**: Storage + container: + allOf: + - "$ref": "#/components/schemas/Link" + - description: + "The container the origin file is linked to.\n\nCan be + one of the following **Resources**: \n\n- WorkPackage" + creator: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The creator of the file link. + + **Resource**: User + delete: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The uri to delete the file link. + + **Resource**: N/A + permission: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The urn of the user specific file link permission on its storage. Can be one of: + + - urn:openproject-org:api:v3:file-links:permission:View + - urn:openproject-org:api:v3:file-links:permission:NotAllowed + + **Resource**: N/A + originOpen: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The uri to open the origin file on the origin itself. + + **Resource**: N/A + staticOriginOpen: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + A static uri to open the origin file on the storage. Responds with a redirect. + + **Resource**: N/A + originOpenLocation: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The uri to open the location of origin file on the origin itself. + + **Resource**: N/A + staticOriginOpenLocation: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + A static uri to open the location of the origin file on the storage. Responds with a redirect. + + **Resource**: N/A + staticOriginDownload: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + A static uri to generate a new download URL from the storage. Responds with a redirect. + + **Resource**: N/A + example: + id: 1337 + _type: FileLink + createdAt: "2021-12-20T13:37:00.211Z" + updatedAt: "2021-12-20T13:37:00.211Z" + originData: + id: 5503 + name: logo.png + mimeType: image/png + size: 16042 + createdAt: "2021-12-19T09:42:10.170Z" + lastModifiedAt: "2021-12-20T14:00:13.987Z" + createdByName: Luke Skywalker + lastModifiedByName: Anakin Skywalker + _embedded: + storage: + id: 1337 + _type: Storage + name: It's no moon + createdAt: "2021-12-20T13:37:00.211Z" + updatedAt: "2021-12-20T13:37:00.211Z" + _links: + self: + href: "/api/v3/storages/1337" + title: It's no moon + type: + href: urn:openproject-org:api:v3:storages:nextcloud + title: Nextcloud + origin: + href: https://nextcloud.deathstar.rocks/ + container: + _hint: Work package resource shortened for brevity + _type: WorkPackage + _links: + self: + href: "/api/v3/work_packages/1528" + title: Develop API + schema: + href: "/api/v3/work_packages/schemas/11-2" + id: 1528 + subject: Develop API + description: + format: markdown + raw: Develop super cool OpenProject API. + html: "

Develop super cool OpenProject API.

" + scheduleManually: false + readonly: false + startDate: + dueDate: + createdAt: "2014-08-29T12:40:53Z" + updatedAt: "2014-08-29T12:44:41Z" + _links: + self: + href: "/api/v3/work_package/17/file_links/1337" + storage: + href: "/api/v3/storage/42" + title: It's no moon + container: + href: "/api/v3/work_package/17" + title: Develop API + creator: + href: "/api/v3/users/33" + title: Obi-Wan Kenobi + delete: + href: "/api/v3/work_package/17/file_links/1337" + permission: + href: urn:openproject-org:api:v3:file-links:permission:View + title: View + originOpen: + href: https://nextcloud.deathstar.rocks/index.php/f/5503?openfile=1 + staticOriginOpen: + href: "/api/v3/file_links/1337/open" + originOpenLocation: + href: https://nextcloud.deathstar.rocks/index.php/f/5503?openfile=0 + staticOriginOpenLocation: + href: "/api/v3/file_links/1337/open?location=true" + staticOriginDownload: + href: "/api/v3/file_links/1337/download" + FileLinkWriteModel: + type: object + required: + - originData + # - _links + properties: + originData: + "$ref": "#/components/schemas/FileLinkOriginDataModel" + # _links: + # oneOf: + # - type: object + # required: + # - storage + # properties: + # storage: + # allOf: + # - "$ref": "#/components/schemas/Link" + # - description: |- + # The storage resource of the linked file. + + # **Resource**: Storage + # - type: object + # required: + # - storageUrl + # properties: + # storageUrl: + # allOf: + # - "$ref": "#/components/schemas/Link" + # - description: |- + # The storage url the file link references to. + + # **Resource**: N/A + example: + originData: + id: 5503 + name: logo.png + mimeType: image/png + size: 16042 + createdAt: "2021-12-19T09:42:10.170Z" + lastModifiedAt: "2021-12-20T14:00:13.987Z" + createdByName: Luke Skywalker + lastModifiedByName: Anakin Skywalker + # _links: + # storageUrl: + # href: https://nextcloud.my-deathstar.org + Formattable: + type: object + required: + - format + properties: + format: + type: string + enum: + - plain + - markdown + - custom + readOnly: true + description: Indicates the formatting language of the raw text + example: markdown + raw: + type: string + description: The raw text, as entered by the user + example: I **am** formatted! + html: + type: string + readOnly: true + description: The text converted to HTML according to the format + example: I am formatted! + example: + format: markdown + raw: I am formatted! + html: I am formatted! + GridCollectionModel: + allOf: + - "$ref": "#/components/schemas/PaginatedCollectionModel" + - type: object + required: + - _embedded + properties: + _embedded: + type: object + required: + - elements + properties: + elements: + type: array + items: + "$ref": "#/components/schemas/GridReadModel" + GridReadModel: + type: object + required: + - _type + - id + - rowCount + - columnCount + - widgets + - _links + properties: + _type: + type: string + enum: + - Grid + id: + type: integer + description: Grid's id + minimum: 1 + rowCount: + type: integer + description: The number of rows the grid has + minimum: 1 + columnCount: + type: integer + description: The number of columns the grid has + minimum: 1 + widgets: + type: array + description: |- + The set of `GridWidget`s selected for the grid. + + # Conditions + + - The widgets must not overlap. + items: + "$ref": "#/components/schemas/GridWidgetModel" + createdAt: + type: string + format: date-time + description: The time the grid was created. + updatedAt: + type: string + format: date-time + description: The time the grid was last updated. + _links: + type: object + required: + - self + - scope + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This grid. + + **Resource**: Grid + attachments: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The attachment collection of this grid. + + **Resource**: AttachmentCollection + addAttachment: + allOf: + - "$ref": "#/components/schemas/Link" + - description: Link for adding an attachment to this grid. + scope: + allOf: + - "$ref": "#/components/schemas/Link" + - description: + The location where this grid is used, usually represented + as a relative URL. + updateImmediately: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Directly perform edits on this grid. + + # Conditions + + **Permission**: depends on the page the grid is defined for + update: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Validate edits on the grid via a form resource before committing + + # Conditions + + **Permission**: depends on the page the grid is defined for + delete: + allOf: + - "$ref": "#/components/schemas/Link" + - description: Deletes this grid resource. + GridWidgetModel: + type: object + required: + - _type + - id + - identifier + - startRow + - endRow + - startColumn + - endColumn + properties: + _type: + type: string + enum: + - GridWidget + id: + type: + - integer + - "null" + description: + The grid widget's unique identifier. Can be null, if a new + widget is created within a grid. + minimum: 1 + identifier: + type: string + description: An alternative, human legible, and unique identifier. + startRow: + type: integer + description: The index of the starting row of the widget. The row is inclusive. + minimum: 1 + endRow: + type: integer + description: The index of the ending row of the widget. The row is exclusive. + minimum: 1 + startColumn: + type: integer + description: + The index of the starting column of the widget. The column + is inclusive. + minimum: 1 + endColumn: + type: integer + description: + The index of the ending column of the widget. The column is + exclusive. + minimum: 1 + options: + type: object + GridWriteModel: + type: object + properties: + rowCount: + type: integer + description: The number of rows the grid has + minimum: 1 + columnCount: + type: integer + description: The number of columns the grid has + minimum: 1 + widgets: + type: array + description: |- + The set of `GridWidget`s selected for the grid. + + # Conditions + + - The widgets must not overlap. + items: + "$ref": "#/components/schemas/GridWidgetModel" + _links: + type: object + properties: + scope: + allOf: + - "$ref": "#/components/schemas/Link" + - description: + The location where this grid is used, usually represented + as a relative URL. + GroupCollectionModel: + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - _links + - _embedded + properties: + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This group collection + + **Resource**: GroupCollectionReadModel + _embedded: + type: object + required: + - elements + properties: + elements: + type: array + items: + "$ref": "#/components/schemas/GroupModel" + example: + _type: Collection + total: 2 + count: 2 + _links: + self: + href: "/api/v3/groups" + _embedded: + elements: + - _type: Group + id: 1337 + name: Stormtroopers + createdAt: "2022-09-23T11:06:36Z" + updatedAt: "2022-09-23T11:06:36Z" + _links: + self: + href: "/api/v3/groups/9" + title: Stormtroopers + delete: + href: "/api/v3/group/9" + method: delete + memberships: + href: /api/v3/memberships?filters=[{"principal":{"operator":"=","values":["9"]}}] + title: Memberships + updateImmediately: + href: "/api/v3/group/9" + method: patch + members: + - href: "/api/v3/users/363" + title: ST-097E + - href: "/api/v3/users/60" + title: ST-C-334 + - _hint: Group resource shortened for brevity + id: 1338 + GroupModel: + type: object + required: + - _type + - id + - _links + properties: + id: + type: integer + description: The group id + minimum: 1 + name: + type: string + description: |- + Group's full name, formatting depends on instance settings + + # Conditions + - admin + createdAt: + type: string + format: date-time + description: |- + Time of creation + + # Conditions + - admin + updatedAt: + type: string + format: date-time + description: Time of the most recent change to the user + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This group resource + + **Resource**: Group + delete: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Deletes the group. + + # Conditions + **Permission**: Administrator + updateImmediately: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Updates the group's attributes. + + # Conditions + **Permission**: Administrator + memberships: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Link to collection of all the group's memberships. The list will only include the memberships in projects + in which the requesting user has the necessary permissions. + + **Resource**: MemberCollection + + # Conditions + **Permission**: `view members` or `manage members` in any project + members: + type: array + items: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + One of the members of the group. + + **Resource**: User + + # Conditions + **Permission**: `manage members` in any project to read & admin to write + example: + _type: Group + id: 9 + name: Stormtroopers + createdAt: "2022-09-23T11:06:36Z" + updatedAt: "2022-09-23T11:06:36Z" + _links: + self: + href: "/api/v3/groups/9" + title: Stormtroopers + delete: + href: "/api/v3/group/9" + method: delete + memberships: + href: /api/v3/memberships?filters=[{"principal":{"operator":"=","values":["9"]}}] + title: Memberships + updateImmediately: + href: "/api/v3/group/9" + method: patch + members: + - href: "/api/v3/users/363" + title: ST-097E + - href: "/api/v3/users/60" + title: ST-C-334 + GroupWriteModel: + type: object + properties: + name: + type: string + description: The new group name. + _links: + type: object + properties: + members: + type: array + items: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + A new member for the group. + + **Resource**: User + example: + name: Emperor's guard + _links: + members: + - href: "/api/v3/users/42" + - href: "/api/v3/users/43" + - href: "/api/v3/users/44" + HelpTextCollectionModel: + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - _links + - _embedded + properties: + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This help text collection + + **Resource**: HelpTextCollectionModel + _embedded: + type: object + required: + - elements + properties: + elements: + type: array + items: + "$ref": "#/components/schemas/HelpTextModel" + example: + total: 2 + count: 2 + _type: Collection + _embedded: + elements: + - _type: HelpText + _links: + self: + href: "/api/v3/help_texts/1" + id: 1 + attribute: id + attributeCaption: ID + scope: WorkPackage + helpText: + format: markdown + raw: Help text for id attribute. + html: "

Help text for id attribute.

" + - _type: HelpText + _links: + self: + href: "/api/v3/help_texts/2" + id: 2 + attribute: status + attributeCaption: Status + scope: WorkPackage + helpText: + format: markdown + raw: Help text for status attribute. + html: "

Help text for status attribute.

" + _links: + self: + href: "/api/v3/help_texts" + HelpTextModel: + type: object + required: + - _type + - id + - attribute + - scope + - helpText + - _links + properties: + _type: + type: string + enum: + - HelpText + id: + type: integer + format: int64 + minimum: 1 + attribute: + type: string + description: The attribute the help text is assigned to. + scope: + type: string + enum: + - WorkPackage + - Project + helpText: + "$ref": "#/components/schemas/Formattable" + _links: + type: object + required: + - self + - editText + - attachments + - addAttachment + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This help text resource. + + **Resource**: HelpText + editText: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Edit the help text entry. + + **Resource**: text/html + attachments: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The attachment collection of this help text. + + **Resource**: AttachmentCollection + addAttachment: + allOf: + - "$ref": "#/components/schemas/Link" + - description: Add an attachment to the help text. + example: + _type: HelpText + id: 1 + attribute: id + scope: WorkPackage + helpText: + format: markdown + raw: Help text for id attribute. + html: "

Help text for id attribute.

" + _links: + self: + href: "/api/v3/help_texts/1" + editText: + href: "/admin/attribute_help_texts/1/edit" + type: text/html + attachments: + href: "/api/v3/help_texts/1/attachments" + addAttachments: + href: "/api/v3/help_texts/1/attachments" + method: post + Link: + type: object + required: + - href + properties: + href: + type: + - string + - "null" + description: URL to the referenced resource (might be relative) + title: + type: string + description: Representative label for the resource + templated: + type: boolean + default: false + description: + If true the href contains parts that need to be replaced by + the client + method: + type: string + default: GET + description: The HTTP verb to use when requesting the resource + payload: + type: object + description: The payload to send in the request to achieve the desired result + identifier: + type: string + description: An optional unique identifier to the link object + example: + href: "/api/v3/work_packages" + method: POST + List_actionsModel: + type: object + example: + _links: + self: + href: "/api/v3/actions" + total: 2 + count: 2 + _type: Collection + _embedded: + elements: + - _links: + self: + href: "/api/v3/actions/work_packages/create" + title: Add work package + _type: Action + id: work_packages/create + name: Add work package + description: + Creating a work package within a project including the uploading + of attachments. Some attributes might not be selected, e.g version which + requires a second permission + modules: + - work_packages + - _links: + self: + href: "/api/v3/actions/work_packages/assign_versions" + title: Assigning version + _type: Action + id: work_packages/assign_versions + name: Assign version + description: + Assigning a work package to a version when creating/updating + a work package. Only principals having this permission can assign a + value to the version property of the work package resource. + modules: + - work_packages + - versions + List_available_parent_project_candidatesModel: + type: object + example: + _links: + self: + href: "/api/v3/projects/available_parent_projects?of=123" + _type: Collection + total: 2 + count: 2 + _embedded: + elements: + - _type: Project + _links: + self: + href: "/api/v3/projects/6" + title: A project + createWorkPackage: + href: "/api/v3/projects/6/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/6/work_packages" + method: post + categories: + href: "/api/v3/projects/6/categories" + versions: + href: "/api/v3/projects/6/versions" + status: + href: "/api/v3/project_statuses/on_track" + title: On track + id: 6 + identifier: a_project + name: A project + active: true + statusExplanation: + format: markdown + raw: Everything **fine** + html: "

Everything fine

" + public: false + description: + format: markdown + raw: Lorem **ipsum** dolor sit amet + html: "

Lorem ipsum dolor sit amet

" + createdAt: "2015-07-06T13:28:14+00:00" + updatedAt: "2015-10-01T09:55:02+00:00" + type: Customer Project + - _type: Project + _links: + self: + href: "/api/v3/projects/14" + title: Another project + createWorkPackage: + href: "/api/v3/projects/14/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/14/work_packages" + method: post + categories: + href: "/api/v3/projects/14/categories" + versions: + href: "/api/v3/projects/14/versions" + status: + href: "/api/v3/project_statuses/on_track" + title: On track + id: 14 + identifier: another_project + name: Another project + active: true + statusExplanation: + format: markdown + raw: Everything super **fine** + html: "

Everything super fine

" + public: true + description: + format: markdown + raw: "" + html: "" + createdAt: "2016-02-29T12:50:20+00:00" + updatedAt: "2016-02-29T12:50:20+00:00" + type: + List_capabilitiesModel: + type: object + example: + _links: + self: + href: "/api/v3/capabilities" + changeSize: + href: "/api/v3/capabilities?pageSize={size}" + templated: true + jumpTo: + href: "/api/v3/capabilities?offset={offset}" + templated: true + total: 4 + count: 4 + _type: Collection + _embedded: + elements: + - _links: + self: + href: "/api/v3/capabilities/work_packages/create/p123-567" + action: + href: "/api/v3/actions/work_packages/create" + title: Add work package + context: + href: "/api/v3/projects/123" + title: A project + principal: + href: "/api/v3/users/567" + title: Some user + _type: Capability + id: work_packages/create/p123-567 + - _links: + self: + href: "/api/v3/capabilities/work_packages/assignee/p123-567" + action: + href: "/api/v3/actions/work_packages/assignee" + context: + href: "/api/v3/projects/123" + title: A project + principal: + href: "/api/v3/users/567" + title: Some user + _type: Capability + id: work_packages/assignee/p123-567 + - _links: + self: + href: "/api/v3/capabilities/memberships/create/p345-821" + title: Create members + action: + href: "/api/v3/actions/memberships/create" + context: + href: "/api/v3/projects/345" + title: A project + principal: + href: "/api/v3/users/821" + title: Some user + _type: Capability + id: memberships/create/p345-821 + - _links: + self: + href: "/api/v3/capabilities/users/delete/g-567" + title: Delete user + context: + href: "/api/v3/capabilities/context/global" + title: Global + principal: + href: "/api/v3/users/567" + title: Some user + _type: Capability + id: users/delete/g-567 + List_membershipsModel: + type: object + example: + _links: + self: + href: "/api/v3/memberships" + total: 2 + count: 2 + _type: Collection + _embedded: + elements: + - _links: + self: + href: "/api/v3/memberships/11" + schema: + href: "/api/v3/memberships/schema" + project: + href: "/api/v3/projects/3" + title: A Project + principal: + href: "/api/v3/users/5" + title: A user + roles: + - href: "/api/v3/roles/4" + title: Reader + _type: Membership + id: 11 + createdAt: "2015-03-20T12:56:56Z" + updatedAt: "2018-12-20T18:16:11Z" + - _links: + self: + href: "/api/v3/memberships/41" + schema: + href: "/api/v3/memberships/schema" + project: + href: "/api/v3/projects/6" + title: Another Project + principal: + href: "/api/v3/groups/5" + title: A group + roles: + - href: "/api/v3/roles/8" + title: Project admin + _type: Membership + id: 41 + createdAt: "2019-12-22T12:56:06Z" + updatedAt: "2020-12-20T18:16:12Z" + List_of_NewsModel: + type: object + example: + _type: Collection + total: 78 + count: 2 + pageSize: 2 + offset: 1 + _embedded: + elements: + - _type: News + id: 1 + title: asperiores possimus nam doloribus ab + summary: + Celebrer spiculum colo viscus claustrum atque. Id nulla culpa + sumptus. Comparo crapula depopulo demonstro. + description: + format: markdown + raw: + Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur + vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. + Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis + eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus + cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum + qui. + html: + "

Videlicet deserunt aequitas cognatus. Concedo quia est quia + pariatur vorago vallum. Calco autem atavus accusamus conscendo cornu + ulterius. Tam patria ago consectetur ventito sustineo nihil caecus. + Supra officiis eos velociter somniculosus tonsor qui. Suffragium aduro + arguo angustus cogito quia tolero vulnus. Supplanto sortitus cresco + apud vestrum qui.

" + createdAt: "2015-03-20T12:57:01Z" + _links: + self: + href: "/api/v3/news/1" + title: asperiores possimus nam doloribus ab + project: + href: "/api/v3/projects/1" + title: Seeded Project + author: + href: "/api/v3/users/2" + title: Peggie Feeney + - _type: News + id: 2 + title: terminatio tutamen. Officia adeptio sp + summary: Consequatur sequi surculus creo tui aequitas. + description: + format: markdown + raw: + Amicitia alius cattus voluntarius. Virgo viduo terminatio tutamen. + Officia adeptio spectaculum atavus nisi cum concido bis. Harum caecus + auxilium sol theatrum eaque consequatur. Omnis aeger suus adipisci + cicuta. Cur delicate alias curto cursim atqui talio fugiat. + html: + "

Amicitia alius cattus voluntarius. Virgo viduo terminatio + tutamen. Officia adeptio spectaculum atavus nisi cum concido bis. + Harum caecus auxilium sol theatrum eaque consequatur. Omnis aeger + suus adipisci cicuta. Cur delicate alias curto cursim atqui talio + fugiat.

" + createdAt: "2015-03-20T12:57:01Z" + _links: + self: + href: "/api/v3/news/2" + title: terminatio tutamen. Officia adeptio sp + project: + href: "/api/v3/projects/1" + title: Seeded Project + author: + href: "/api/v3/users/2" + title: Peggie Feeney + _links: + self: + href: "/api/v3/news?offset=1&pageSize=2" + jumpTo: + href: "/api/v3/news?offset=%7Boffset%7D&pageSize=2" + templated: true + changeSize: + href: "/api/v3/news?offset=1&pageSize=%7Bsize%7D" + templated: true + nextByOffset: + href: "/api/v3/news?offset=2&pageSize=2" + List_projectsModel: + type: object + example: + _links: + self: + href: "/api/v3/projects" + representations: + - href: "/projects.csv?filters=%5B%7B%22nameAndIdentifier%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22open%22%5D%7D%7D%5D&offset=1&pageSize=50" + identifier: csv + type: text/csv + title: CSV + - href: "/projects.xls?filters=%5B%7B%22nameAndIdentifier%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22open%22%5D%7D%7D%5D&offset=1&pageSize=50" + identifier: xls + type: application/vnd.ms-excel + title: XLS + _type: Collection + total: 2 + count: 2 + _embedded: + elements: + - _type: Project + _links: + self: + href: "/api/v3/projects/6" + title: A project + createWorkPackage: + href: "/api/v3/projects/6/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/6/work_packages" + method: post + categories: + href: "/api/v3/projects/6/categories" + versions: + href: "/api/v3/projects/6/versions" + projects: + href: "/api/v3/projects/123" + status: + href: "/api/v3/project_statuses/on_track" + title: On track + id: 6 + identifier: a_project + name: A project + active: true + statusExplanation: + format: markdown + raw: Everything **fine** + html: "

Everything fine

" + public: false + description: + format: markdown + raw: Lorem **ipsum** dolor sit amet + html: "

Lorem ipsum dolor sit amet

" + createdAt: "2015-07-06T13:28:14+00:00" + updatedAt: "2015-10-01T09:55:02+00:00" + type: Customer Project + - _type: Project + _links: + self: + href: "/api/v3/projects/14" + title: Another project + createWorkPackage: + href: "/api/v3/projects/14/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/projects/14/work_packages" + method: post + categories: + href: "/api/v3/projects/14/categories" + versions: + href: "/api/v3/projects/14/versions" + projects: + href: + status: + href: "/api/v3/project_statuses/off_track" + title: Off track + id: 14 + identifier: another_project + name: Another project + active: false + statusExplanation: + format: markdown + raw: Uh **oh** + html: "

Uh oh

" + public: true + description: + format: markdown + raw: "" + html: "" + createdAt: "2016-02-29T12:50:20+00:00" + updatedAt: "2016-02-29T12:50:20+00:00" + type: + List_projects_by_versionModel: + type: object + example: + _links: + self: + href: "/api/v3/versions/2/projects" + total: 1 + count: 1 + _type: Collection + _embedded: + elements: + - _type: Project + _links: + self: + href: "/api/v3/projects/1" + title: Lorem + categories: + href: "/api/v3/projects/1/categories" + versions: + href: "/api/v3/projects/1/versions" + status: + href: "/api/v3/project_statuses/on_track" + title: On track + id: 1 + identifier: project_identifier + name: Project example + description: + format: markdown + raw: Lorem **ipsum** dolor sit amet + html: "

Lorem ipsum dolor sit amet

" + active: true + statusExplanation: + format: markdown + raw: Everything **fine** + html: "

Everything fine

" + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + MarkdownModel: + type: string + format: html + example: +

Hello world! This is + markdown!

+ NewsModel: + type: object + properties: + id: + type: integer + description: News' id + readOnly: true + exclusiveMinimum: 0 + title: + type: string + description: The headline of the news + readOnly: true + summary: + type: string + description: A short summary + readOnly: true + description: + type: string + description: The main body of the news with all the details + readOnly: true + createdAt: + type: string + format: date-time + description: The time the news was created at + readOnly: true + _links: + type: object + required: + - self + - project + - author + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This news + + **Resource**: News + readOnly: true + project: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The project the news is situated in + + **Resource**: Project + author: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The user having created the news + + **Resource**: User + readOnly: true + example: + _type: News + id: 1 + title: asperiores possimus nam doloribus ab + summary: + Celebrer spiculum colo viscus claustrum atque. Id nulla culpa sumptus. + Comparo crapula depopulo demonstro. + description: + format: markdown + raw: + Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur + vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. + Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis + eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus + cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui. + html: + "

Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur + vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. + Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis + eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus + cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.

" + createdAt: "2015-03-20T12:57:01Z" + _links: + self: + href: "/api/v3/news/1" + title: asperiores possimus nam doloribus ab + project: + href: "/api/v3/projects/1" + title: A project + author: + href: "/api/v3/users/2" + title: Peggie Feeney + _embedded: + project: + _type: Project... + author: + _type: User... + NonWorkingDayCollectionModel: + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - _links + - _embedded + properties: + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This non working days collection + + **Resource**: NonWorkingDayCollectionModel + _embedded: + type: object + required: + - elements + properties: + elements: + type: array + description: + The array of non working days. Each day has a name and + a date. + items: + "$ref": "#/components/schemas/NonWorkingDayModel" + example: + _type: Collection + total: 2 + count: 2 + _links: + self: + href: /api/v3/non_working?filters=[{"interval":{"operator":"<>d","values":["2022-04-29","2022-12-24"]}}] + _embedded: + elements: + - _type: NonWorkingDay + date: "2022-12-24" + name: Christmas Evening + _links: + self: + href: "/api/v3/days/non_working/2022-04-24" + weekday: + href: "/api/v3/days/week/6" + title: Saturday + - _type: NonWorkingDay + date: "2022-05-01" + name: Labour day + _links: + self: + href: "/api/v3/days/non_working/2022-05-01" + weekday: + href: "/api/v3/days/week/7" + title: Sunday + NonWorkingDayModel: + type: object + required: + - _type + - date + - name + properties: + _type: + type: string + enum: + - NonWorkingDay + date: + type: string + format: date + description: Date of the non-working day. + name: + type: string + description: Descriptive name for the non-working day. + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This non-working day. + + **Resource**: NonWorkingDay + example: + _type: NonWorkingDay + date: "2022-12-25" + name: Christmas + _links: + self: + href: "/api/v3/days/non_working/2022-12-25" + title: Christmas + NotificationCollectionModel: + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - _links + - _embedded + properties: + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This notification collection + + **Resource**: NotificationCollectionModel + jumpTo: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The notification collection at another offset + + **Resource**: NotificationCollectionModel + changeSize: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The notification collection with another size + + **Resource**: NotificationCollectionModel + _embedded: + type: object + required: + - elements + - detailsSchemas + properties: + elements: + type: array + items: + "$ref": "#/components/schemas/NotificationModel" + detailsSchemas: + type: array + items: + "$ref": "#/components/schemas/SchemaModel" + NotificationModel: + type: object + properties: + _type: + type: string + enum: + - Notification + id: + type: integer + description: Notification id + minimum: 1 + reason: + type: string + description: The reason for the notification + enum: + - assigned + - commented + - created + - dateAlert + - mentioned + - prioritized + - processed + - responsible + - subscribed + - scheduled + - watched + readIAN: + type: boolean + description: Whether the notification is marked as read + details: + type: array + items: + oneOf: + - "$ref": "#/components/schemas/ValuesPropertyModel" + description: + A list of objects including detailed information about the + notification. + createdAt: + type: string + format: date-time + description: The time the notification was created at + updatedAt: + type: string + format: date-time + description: The time the notification was last updated + _embedded: + type: object + required: + - project + - resource + properties: + actor: + "$ref": "#/components/schemas/UserModel" + project: + "$ref": "#/components/schemas/ProjectModel" + activity: + "$ref": "#/components/schemas/ActivityModel" + resource: + oneOf: + - "$ref": "#/components/schemas/Work_PackageModel" + _links: + type: object + required: + - self + - project + - actor + - activity + - resource + - details + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This notification + + **Resource**: Notification + readIAN: + allOf: + - "$ref": "#/components/schemas/Link" + - description: + Request to mark the notification as read. Only available + if the notification is currently unread. + unreadIAN: + allOf: + - "$ref": "#/components/schemas/Link" + - description: + Request to mark the notification as unread. Only available + if the notification is currently read. + project: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The project the notification originated in + + **Resource**: Project + actor: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The user that caused the notification. This might be null in + case no user triggered the notification. + + **Resource**: User + resource: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The linked resource of the notification, if any. + + **Resource**: Polymorphic + activity: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The journal activity, if the notification originated from a journal entry. This might be null in + case no activity triggered the notification. + + **Resource**: Activity + details: + type: array + items: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + A list of objects including detailed information about the notification. The contents of + and type of this can vary widely between different notification reasons. + + **Resource**: Polymorphic (e.g. Values::Property) + OAuthApplicationReadModel: + type: object + required: + - id + - _type + - name + - clientId + - confidential + - _link + properties: + id: + type: integer + minimum: 1 + _type: + type: string + enum: + - OAuthApplication + name: + type: string + description: The name of the OAuth 2 application + clientId: + type: string + description: OAuth 2 client id + clientSecret: + type: string + description: + OAuth 2 client secret. This is only returned when creating + a new OAuth application. + confidential: + type: boolean + description: + true, if OAuth 2 credentials are confidential, false, if no + secret is stored + createdAt: + type: string + format: date-time + description: The time the OAuth 2 Application was created at + updatedAt: + type: string + format: date-time + description: The time the OAuth 2 Application was last updated + scopes: + type: array + description: An array of the scopes of the OAuth 2 Application + items: + type: string + _links: + type: object + required: + - self + - owner + - redirectUri + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This OAuth application + + **Resource**: OAuthApplication + owner: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The user that created the OAuth application. + + **Resource**: User + integration: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The resource that integrates this OAuth application into itself. Currently, only `Storage` resources are + able to create and maintain own OAuth application. + + **Resource**: Storage + redirectUri: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The redirect URI of the OAuth application + + **Resource**: N/A + example: + id: 1337 + _type: OauthClientCredentials + name: Vader's secure OAuth app + clientId: O5h6WObhMg1Z8IcLHRE3_LMh4jJYmmca2V6OTFSv8DA + confidential: true + createdAt: "2022-12-07T12:56:42Z" + updatedAt: "2022-12-07T12:56:42Z" + scopes: + - api_v3 + _links: + self: + href: "/api/v3/oauth_applications/1337" + owner: + href: "/api/v3/users/13" + title: Darth Vader + integration: + href: "/api/v3/storages/42" + title: Death Star Cloud + redirectUri: + href: https://death-star.cloud.tools/index.php/apps/integration_openproject/oauth-redirect + OAuthClientCredentialsReadModel: + type: object + required: + - id + - _type + - clientId + - confidential + - _links + properties: + id: + type: integer + minimum: 1 + _type: + type: string + enum: + - OAuthClientCredentials + clientId: + type: string + description: OAuth 2 client id + confidential: + type: boolean + description: + true, if OAuth 2 credentials are confidential, false, if no + secret is stored + createdAt: + type: string + format: date-time + description: The time the OAuth client credentials were created at + updatedAt: + type: string + format: date-time + description: The time the OAuth client credentials were last updated + _links: + type: object + required: + - self + - integration + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This OAuth Client Credentials object + + **Resource**: OAuthClientCredentials + integration: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The resource that integrates this OAuth client credentials. Currently, only `Storage` resources are + able to contain OAuth client credentials. + + **Resource**: Storage + example: + id: 1337 + _type: OAuthClientCredentials + clientId: O5h6WObhMg1Z8IcLHRE3_LMh4jJYmmca2V6OTFSv8DA + confidential: true + createdAt: "2022-12-07T12:56:42Z" + updatedAt: "2022-12-07T12:56:42Z" + _link: + self: + href: "/api/v3/oauth_client_credentials/1337" + integration: + href: "/api/v3/storages/42" + title: Death Star Cloud + OAuthClientCredentialsWriteModel: + type: object + required: + - clientId + - clientSecret + properties: + clientId: + type: string + description: OAuth 2 client id + clientSecret: + type: string + description: OAuth 2 client secret + example: + clientId: O5h6WObhMg1Z8IcLHRE3_LMh4jJYmmca2V6OTFSv8DA + clientSecret: LSk52mn4jmtSYTgH0NzDj-u2z5LMpT8bsS0BouwJQQw + PaginatedCollectionModel: + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - pageSize + - offset + properties: + pageSize: + type: integer + description: Amount of elements that a response will hold. + minimum: 0 + offset: + type: integer + description: The page number that is requested from paginated collection. + minimum: 1 + _links: + type: object + required: + - jumpTo + - changeSize + properties: + jumpTo: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Templated link to another page offset. + + **Resource**: Collection + changeSize: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Templated link for another page size. + + **Resource**: Collection + Plain_TextModel: + type: string + format: html + example: "

Hello world! This *is* plain text!

" + PostModel: + type: object + required: + - subject + properties: + id: + type: integer + description: Identifier of this post + readOnly: true + exclusiveMinimum: 0 + subject: + type: string + description: The post's subject + _links: + type: object + properties: + addAttachment: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Attach a file to the post + + # Conditions + + **Permission**: edit messages + readOnly: true + example: + _type: Post + id: 1 + subject: A post with a subject + _embedded: + project: + _type: Project... + _links: + self: + href: "/api/v3/posts/1" + attachments: + href: "/api/v3/posts/1/attachments" + addAttachment: + href: "/api/v3/posts/1/attachments" + method: post + project: + href: "/api/v3/projects/1" + title: A project with a title + PrincipalsModel: + type: object + example: + _type: Collection + total: 4 + count: 4 + _embedded: + elements: + - _type: User + id: 4 + login: Eliza92778 + admin: false + firstName: Danika + lastName: O'Keefe + name: Danika O'Keefe + email: jackie@dicki.org + avatar: https://example.org/users/4/avatar + createdAt: "2015-03-20T12:57:02Z" + updatedAt: "2015-06-16T15:28:14Z" + status: active + identityUrl: + _links: + self: + href: "/api/v3/users/4" + title: Danika O'Keefe + showUser: + href: "/users/4" + type: text/html + updateImmediately: + href: "/api/v3/users/4" + title: Update Eliza92778 + method: patch + lock: + href: "/api/v3/users/4/lock" + title: Set lock on Eliza92778 + method: post + delete: + href: "/api/v3/users/4" + title: Delete Eliza92778 + method: delete + - _type: User + id: 2 + login: Sebastian9686 + admin: false + firstName: Peggie + lastName: Feeney + name: Peggie Feeney + email: + avatar: https://example.org/users/4/avatar + createdAt: "2015-03-20T12:56:55Z" + updatedAt: "2015-03-20T12:56:55Z" + status: active + identityUrl: + _links: + self: + href: "/api/v3/users/2" + title: Peggie Feeney + showUser: + href: "/users/2" + type: text/html + updateImmediately: + href: "/api/v3/users/2" + title: Update Sebastian9686 + method: patch + lock: + href: "/api/v3/users/2/lock" + title: Set lock on Sebastian9686 + method: post + delete: + href: "/api/v3/users/2" + title: Delete Sebastian9686 + method: delete + - _type: Group + id: 9 + name: The group + createdAt: "2015-09-23T11:06:36Z" + updatedAt: "2015-09-23T11:06:36Z" + _links: + self: + href: "/api/v3/groups/9" + title: The group + - _type: PlaceholderUser + id: 29 + name: UX Designer + createdAt: "2018-09-23T11:06:36Z" + updatedAt: "2019-10-23T11:06:36Z" + _links: + self: + href: "/api/v3/placeholder_users/29" + title: UX Designer + _links: + self: + href: "/api/v3/principals" + PrioritiesModel: + type: object + example: + _links: + self: + href: "/api/v3/priorities" + _type: Collection + total: 4 + count: 4 + _embedded: + elements: + - _type: Priority + _links: + self: + href: "/api/v3/priorities/1" + title: Low + id: 1 + name: Low + position: 1 + isDefault: false + isActive: true + - _type: Priority + _links: + self: + href: "/api/v3/priorities/2" + title: Normal + id: 2 + name: Normal + position: 2 + isDefault: true + isActive: true + - _type: Priority + _links: + self: + href: "/api/v3/priorities/3" + title: High + id: 3 + name: High + position: 3 + isDefault: false + isActive: true + - _type: Priority + _links: + self: + href: "/api/v3/priorities/4" + title: Immediate + id: 4 + name: Immediate + position: 5 + isDefault: false + isActive: true + PriorityModel: + type: object + properties: + id: + type: integer + description: Priority id + readOnly: true + exclusiveMinimum: 0 + name: + type: string + description: Priority name + readOnly: true + minLength: 1 + position: + type: integer + description: Sort index of the priority + readOnly: true + exclusiveMinimum: 0 + isDefault: + type: boolean + description: Indicates whether this is the default value + readOnly: true + isActive: + type: boolean + description: Indicates whether the priority is available + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This priority + + **Resource**: Priority + readOnly: true + example: + _type: Priority + _links: + self: + href: "/api/v3/priorities/1" + title: Low + id: 1 + name: Low + position: 1 + isDefault: false + isActive: true + ProjectModel: + type: object + properties: + _type: + type: string + enum: + - Project + id: + type: integer + description: Projects' id + minimum: 1 + identifier: + type: string + name: + type: string + active: + type: boolean + description: + Indicates whether the project is currently active or already + archived + statusExplanation: + allOf: + - "$ref": "#/components/schemas/Formattable" + - description: + A text detailing and explaining why the project has the reported + status + public: + type: boolean + description: Indicates whether the project is accessible for everybody + description: + "$ref": "#/components/schemas/Formattable" + createdAt: + type: string + format: date-time + description: Time of creation + updatedAt: + type: string + format: date-time + description: Time of the most recent change to the project + _links: + type: object + required: + - self + - categories + - types + - versions + - memberships + - workPackages + properties: + update: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Form endpoint that aids in updating this project + + # Conditions + + **Permission**: edit project + updateImmediately: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Directly update this project + + # Conditions + + **Permission**: edit project + delete: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Delete this project + + # Conditions + + **Permission**: admin + createWorkPackage: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Form endpoint that aids in preparing and creating a work package + + # Conditions + + **Permission**: add work packages + createWorkPackageImmediately: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Directly creates a work package in the project + + # Conditions + + **Permission**: add work packages + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This project + + **Resource**: Project + categories: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Categories available in this project + + **Resource**: Collection + types: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Types available in this project + + **Resource**: Collection + + # Conditions + + **Permission**: view work packages or manage types + versions: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Versions available in this project + + **Resource**: Collection + + # Conditions + + **Permission**: view work packages or manage versions + memberships: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Memberships in the project + + **Resource**: Collection + + # Conditions + + **Permission**: view members + workPackages: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Work Packages of this project + + **Resource**: Collection + parent: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Parent project of the project + + **Resource**: Project + + # Conditions + + **Permission** edit project + status: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Denotes the status of the project, so whether the project is on track, at risk or is having trouble. + + **Resource**: ProjectStatus + + # Conditions + + **Permission** edit project + storages: + type: array + items: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The link to a storage that is active for this project. + + **Resource**: Storage + + # Conditions + + **Permission**: view_file_links + ProjectStorageCollectionModel: + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - _links + - _embedded + properties: + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This file links collection + + **Resource**: ProjectStorageCollectionModel + _embedded: + type: object + required: + - elements + properties: + elements: + type: array + items: + "$ref": "#/components/schemas/ProjectStorageModel" + example: + _type: Collection + total: 2 + count: 2 + _links: + self: + href: "/api/v3/project_storages?filters=%5B%7B%22storage%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%2281%22%5D%7D%7D%5D" + _embedded: + elements: + - id: 1337 + _type: ProjectStorage + _hint: project storage resource shortened for brevity + - id: 1338 + _type: ProjectStorage + _hint: File Link resource shortened for brevity + ProjectStorageModel: + type: object + required: + - _type + - id + - projectFolderMode + - createdAt + - updatedAt + properties: + _type: + type: string + enum: + - ProjectStorage + id: + type: integer + description: The project storage's id + minimum: 1 + projectFolderMode: + type: string + enum: + - inactive + - manual + createdAt: + type: string + format: date-time + description: Time of creation + updatedAt: + type: string + format: date-time + description: Time of the most recent change to the project storage + _links: + type: object + required: + - self + - creator + - storage + - project + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This project storage. + + **Resource**: ProjectStorage + creator: + allOf: + - "$ref": "#/components/schemas/Link" + - description: + "The user who created the project storage. \n\n**Resource**: + User" + storage: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The storage resource, that is linked to a project with this project storage. + + **Resource**: Storage + project: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The project resource, that is linked to a storage with this project storage. + + **Resource**: Project + projectFolder: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The directory on the storage that is used as a manual project folder. + + **Resource**: StorageFile + + # Conditions + + Only provided, if the `projectFolderMode` is set to `manual`. + example: + _type: ProjectStorage + id: 1337 + projectFolderMode: manual + createdAt: "2023-01-20T14:30:00Z" + updatedAt: "2023-05-23T11:57:48Z" + _links: + self: + href: "/api/v3/project_storages/23" + projectFolder: + href: "/api/v3/storages/81/files/30" + creator: + title: Darth Vader + href: "/api/v3/users/3" + project: + title: Death Star 3.0 + href: "/api/v3/projects/11" + storage: + title: Palpatine's Data Vault + href: "/api/v3/storages/81" + Projects_schemaModel: + type: object + example: + _type: Schema + _dependencies: [] + id: + type: Integer + name: ID + required: true + hasDefault: false + writable: false + name: + type: String + name: Name + required: true + hasDefault: false + writable: true + minLength: 1 + maxLength: 255 + identifier: + type: String + name: Identifier + required: true + hasDefault: false + writable: true + minLength: 1 + maxLength: 100 + description: + type: Formattable + name: Description + required: false + hasDefault: false + writable: true + public: + type: Boolean + name: Public + required: true + hasDefault: false + writable: true + active: + type: Boolean + name: Active + required: true + hasDefault: true + writable: true + status: + type: ProjectStatus + name: Status + required: false + hasDefault: true + writable: true + _links: + allowedValues: + - href: "/api/v3/project_statuses/on_track" + title: On track + - href: "/api/v3/project_statuses/at_risk" + title: At risk + - href: "/api/v3/project_statuses/off_track" + title: Off track + statusExplanation: + type: Formattable + name: Status explanation + required: false + hasDefault: false + writable: true + parent: + type: Project + name: Subproject of + required: false + hasDefault: false + writable: true + location: _links + visibility: default + _links: {} + createdAt: + type: DateTime + name: Created on + required: true + hasDefault: false + writable: false + updatedAt: + type: DateTime + name: Updated on + required: true + hasDefault: false + writable: false + customField30: + type: Integer + name: Integer project custom field + required: false + hasDefault: false + writable: true + visibility: default + customField31: + type: CustomOption + name: List project custom field + required: false + hasDefault: false + writable: true + location: _links + visibility: default + _links: {} + customField32: + type: Version + name: Version project custom field + required: false + hasDefault: false + writable: true + location: _links + visibility: default + _links: {} + customField34: + type: Boolean + name: Boolean project custom field + required: false + hasDefault: false + writable: true + visibility: default + customField35: + type: String + name: Text project custom field + required: true + hasDefault: false + writable: true + visibility: default + _links: + self: + href: "/api/v3/projects/schema" + QueriesModel: + type: object + example: + _links: + self: + href: "/api/v3/queries" + total: 1 + count: 1 + _type: Collection + _embedded: + elements: + - _type: Query + id: 9 + name: fdsfdsfdsf + createdAt: "2015-03-20T12:56:56Z" + updatedAt: "2015-05-20T18:16:53Z" + filters: + - _type: StatusQueryFilter + name: Status + _links: + filter: + href: "/api/v3/queries/filters/status" + title: Status + operator: + href: "/api/v3/queries/operators/o" + title: open + schema: + href: "/api/v3/queries/filter_instance_schemas/status" + values: [] + - _type: DueDateQueryFilter + name: Finish date + values: + - "1" + _links: + filter: + href: "/api/v3/queries/filters/dueDate" + title: Finish date + operator: + href: "/api/v3/queries/operators/" + _links: + self: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + jumpTo: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + changeSize: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + createWorkPackage: + href: "/api/v3/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/work_packages" + method: post + _links: + self: + href: "/api/v3/queries/9" + title: fdsfdsfdsf + results: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + columns: + - href: "/api/v3/queries/columns/id" + title: ID + - href: "/api/v3/queries/columns/subject" + title: Subject + - href: "/api/v3/queries/columns/type" + title: Type + - href: "/api/v3/queries/columns/status" + title: Status + - href: "/api/v3/queries/columns/priority" + title: Priority + - href: "/api/v3/queries/columns/assignee" + title: Assignee + - href: "/api/v3/queries/columns/updated_at" + title: Updated on + groupBy: + href: + title: + sortBy: + - href: "/api/v3/queries/sort_bys/parent-desc" + title: Parent (Descending) + user: + href: "/api/v3/users/1" + title: OpenProject Admin + project: + href: "/api/v3/projects/3" + title: copy + QueryModel: + type: object + required: + - createdAt + - updatedAt + properties: + id: + type: integer + description: Query id + readOnly: true + exclusiveMinimum: 0 + name: + type: string + description: Query name + readOnly: true + filters: + type: array + description: + A set of QueryFilters which will be applied to the work packages + to determine the resulting work packages + readOnly: false + items: + "$ref": "#/components/schemas/Query_Filter_Instance_SchemaModel" + sums: + type: boolean + description: Should sums (of supported properties) be shown? + readOnly: true + timelineVisible: + type: boolean + description: Should the timeline mode be shown? + readOnly: true + deprecated: true + timelineLabels: + type: array + description: Which labels are shown in the timeline, empty when default + readOnly: true + deprecated: true + items: + type: string + timelineZoomLevel: + type: string + description: Which zoom level should the timeline be rendered in? + readOnly: true + deprecated: true + timestamps: + type: array + description: + Timestamps to filter by when showing changed attributes on + work packages. + readOnly: false + highlightingMode: + type: string + description: Which highlighting mode should the table have? + readOnly: true + deprecated: true + showHierarchies: + type: boolean + description: Should the hierarchy mode be enabled? + readOnly: true + deprecated: true + hidden: + type: boolean + description: Should the query be hidden from the query list? + readOnly: true + deprecated: true + public: + type: boolean + description: Can users besides the owner see the query? + readOnly: true + starred: + type: boolean + description: Should the query be highlighted to the user? + readOnly: true + createdAt: + type: string + format: date-time + description: Time of creation + readOnly: true + updatedAt: + type: string + format: date-time + description: Time of the most recent change to the query + readOnly: true + _links: + type: object + properties: + star: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Elevates the query to the status of 'starred' + + # Conditions + + **Permission**: save queries for own queries, manage public queries for public queries; Only present if query is not yet starred + readOnly: true + unstar: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Removes the 'starred' status + + # Conditions + + **Permission**: save queries for own queries, manage public queries for public queries; Only present if query is starred + readOnly: true + update: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Use the Form based process to verify the query before persisting + + # Conditions + + **Permission**: view work packages + readOnly: true + updateImmediately: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Persist the query without using a Form based process for guidance + + # Conditions + + **Permission**: save queries for own queries, manage public queries for public queries; + readOnly: true + Query_ColumnModel: + type: object + required: + - id + - name + properties: + id: + type: string + description: Query column id + readOnly: true + name: + type: string + description: Query column name + example: + _type: QueryColumn::Property + id: priority + name: Priority + _links: + self: + href: "/api/v3/queries/columns/priority" + title: Priority + Query_Create_Form: + type: object + properties: + name: + type: string + description: Query name. + example: + name: New query name + Query_FilterModel: + type: object + required: + - id + properties: + id: + type: string + description: QueryFilter id + example: + _type: QueryFilter + id: status + _links: + self: + href: "/api/v3/queries/filters/status" + title: Status + Query_Filter_Instance_SchemaModel: + type: object + required: + - name + - filter + properties: + name: + type: string + description: Describes the name attribute + readOnly: true + filter: + type: string + description: QuerySortBy name + _links: + type: object + required: + - self + - filter + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This QueryFilterInstanceSchema (same as for schema) + + **Resource**: QueryFilterInstanceSchema + readOnly: true + filter: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The filter for which this schema is specific + + **Resource**: Filter + readOnly: true + example: + _type: QueryFilterInstanceSchema + _dependencies: + - _type: SchemaDependency + "on": operator + dependencies: + "/api/v3/queries/operators/=": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + "/api/v3/queries/operators/!": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + name: + type: String + name: Name + required: true + hasDefault: true + writable: false + filter: + type: QueryFilter + name: Filter + required: true + hasDefault: false + writable: true + _links: {} + _links: + self: + href: "/api/v3/queries/filter_instance_schemas/author" + filter: + href: "/api/v3/queries/filters/author" + title: Author + Query_Filter_Instance_SchemasModel: + type: object + example: + _type: Collection + total: 2 + count: 2 + _embedded: + elements: + - _type: QueryFilterInstanceSchema + _dependencies: + - _type: SchemaDependency + "on": operator + dependencies: + "/api/v3/queries/operators/=": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + "/api/v3/queries/operators/!": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + "/api/v3/queries/operators/!*": {} + "/api/v3/queries/operators/*": {} + name: + type: String + name: Name + required: true + hasDefault: true + writable: false + filter: + type: QueryFilter + name: Filter + required: true + hasDefault: false + writable: true + _links: {} + _links: + self: + href: "/api/v3/queries/filter_instance_schemas/assignee" + filter: + href: "/api/v3/queries/filters/assignee" + title: Assignee + - _type: QueryFilterInstanceSchema + _dependencies: + - _type: SchemaDependency + "on": operator + dependencies: + "/api/v3/queries/operators/=": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + "/api/v3/queries/operators/!": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + name: + type: String + name: Name + required: true + hasDefault: true + writable: false + filter: + type: QueryFilter + name: Filter + required: true + hasDefault: false + writable: true + _links: {} + _links: + self: + href: "/api/v3/queries/filter_instance_schemas/author" + filter: + href: "/api/v3/queries/filters/author" + title: Author + _links: + self: + href: "/api/v3/queries/filter_instance_schemas" + Query_Filter_Instance_Schemas_For_ProjectModel: + type: object + example: + _type: Collection + total: 2 + count: 2 + _embedded: + elements: + - _type: QueryFilterInstanceSchema + _dependencies: + - _type: SchemaDependency + "on": operator + dependencies: + "/api/v3/queries/operators/=": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + "/api/v3/queries/operators/!": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + "/api/v3/queries/operators/!*": {} + "/api/v3/queries/operators/*": {} + name: + type: String + name: Name + required: true + hasDefault: true + writable: false + filter: + type: QueryFilter + name: Filter + required: true + hasDefault: false + writable: true + _links: {} + _links: + self: + href: "/api/v3/queries/filter_instance_schemas/assignee" + filter: + href: "/api/v3/queries/filters/assignee" + title: Assignee + - _type: QueryFilterInstanceSchema + _dependencies: + - _type: SchemaDependency + "on": operator + dependencies: + "/api/v3/queries/operators/=": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + "/api/v3/queries/operators/!": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + name: + type: String + name: Name + required: true + hasDefault: true + writable: false + filter: + type: QueryFilter + name: Filter + required: true + hasDefault: false + writable: true + _links: {} + _links: + self: + href: "/api/v3/queries/filter_instance_schemas/author" + filter: + href: "/api/v3/queries/filters/author" + title: Author + _links: + self: + href: "/api/v3/projects/42/queries/filter_instance_schemas" + Query_OperatorModel: + type: object + required: + - id + - name + properties: + id: + type: string + description: Query operator id + readOnly: true + name: + type: string + description: Query operator name + example: + _type: QueryOperator + id: "!" + name: is not + _links: + self: + href: "/api/v3/queries/operators/!" + title: is not + Query_Sort_ByModel: + type: object + required: + - id + - name + properties: + id: + type: string + description: QuerySortBy id + readOnly: true + name: + type: string + description: QuerySortBy name + example: + _type: QuerySortBy + id: status-asc + name: Status (Ascending) + _links: + self: + href: "/api/v3/queries/sort_bys/status-asc" + title: Status (Ascending) + column: + href: "/api/v3/queries/columns/status" + title: Status + direction: + href: urn:openproject-org:api:v3:queries:directions:asc + title: Ascending + Query_Update_Form: + type: object + properties: + name: + type: string + description: Query name. + example: + name: Updated query name + RelationModel: + type: object + properties: + id: + type: integer + description: Relation ID + readOnly: true + exclusiveMinimum: 0 + name: + type: string + description: The internationalized name of this kind of relation + type: + type: string + description: Which kind of relation (blocks, precedes, etc.) + reverseType: + type: string + description: The kind of relation from the other WP's perspective + readOnly: true + description: + type: string + description: Short text further describing the relation + delay*: + type: integer + description: The delay in days between closing of `from` and start of `to` + minimum: 0 + _links: + type: object + required: + - self + - schema + - from + - to + properties: + update: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Updates the relation between two work packages via a form + + # Conditions + + **Permission**: manage work package relations + readOnly: true + updateImmediately: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Updates the relation between two work packages + + # Conditions + + **Permission**: manage work package relations + readOnly: true + delete: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Destroys the relation between the two work packages + + # Conditions + + **Permission**: manage work package relations + readOnly: true + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This relation + + **Resource**: Relation + + # Conditions + + **Permission**: view work packages + readOnly: true + schema: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The schema of this relation + + **Resource**: Schema + readOnly: true + from: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The emanating work package + + **Resource**: WorkPackage + + # Conditions + + **Permission**: view work packages + readOnly: true + to: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The work package the relation ends in + + **Resource**: WorkPackage + + # Conditions + + **Permission**: view work packages + readOnly: true + example: + _links: + self: + href: "/api/v3/relations/1" + update: + href: "/api/v3/relations/1/form" + method: POST + updateImmediately: + href: "/api/v3/relations/1" + method: PATCH + delete: + href: "/api/v3/relations/1" + method: DELETE + from: + href: "/api/v3/work_packages/42" + title: Steel Delivery + to: + href: "/api/v3/work_packages/84" + title: Bending the steel + _type: Relation + id: 1 + name: precedes + type: precedes + reverseType: follows + description: We can't bend the steel before it's been delivered! + delay: 0 + Relation_edit_formModel: + type: object + example: + _links: + self: + href: "/api/v3/relations/form" + validate: + href: "/api/v3/relations/form" + method: POST + commit: + href: "/api/v3/relations" + method: PATCH + _type: Form + _embedded: + payload: + _links: + from: + href: "/api/v3/work_packages/4534" + to: + href: "/api/v3/work_packages/3857" + _type: WorkPackage + type: follows + delay: 3 + description: let it rest for 3 days + schema: + _type: Schema + _links: + self: + href: "/api/v3/relations/schema" + id: + name: ID + type: Integer + writable: false + type: + name: Type + type: String + writable: true + allowedValues: + - relates + - duplicates + - duplicated + - blocks + - blocked + - precedes + - follows + - includes + - partof + - requires + - required + reverseType: + name: Reverse Type + type: String + writable: false + description: + name: Description + type: String + writable: true + from: + name: From work package + type: WorkPackage + writable: false + to: + name: To work package + type: WorkPackage + writable: false + delay: + name: Delay + type: Integer + writable: true + validationErrors: + from: + _type: Error + errorIdentifier: urn:openproject-org:api:v3:errors:BadExampleError + message: + For the purpose of this example we need a validation error. + The remainder of the response pretends there were no errors. + Relation_schemaModel: + type: object + example: + _type: Schema + _links: + self: + href: "/api/v3/relations/schema" + id: + name: ID + type: Integer + writable: false + type: + name: Type + type: String + writable: true + reverseType: + name: Reverse Type + type: String + writable: false + description: + name: Description + type: String + writable: true + from: + name: From work package + type: WorkPackage + writable: false + to: + name: To work package + type: WorkPackage + writable: false + delay: + name: Delay + type: Integer + writable: true + RelationsModel: + type: object + example: + _links: + self: + href: "/api/v3/relations" + total: 3 + count: 1 + _type: Collection + _embedded: + elements: + - _links: + self: + href: "/api/v3/relations/1" + update: + href: "/api/v3/relations/1/form" + method: POST + updateImmediately: + href: "/api/v3/relations/1" + method: PATCH + delete: + href: "/api/v3/relations/1" + method: DELETE + from: + href: "/api/v3/work_packages/42" + title: Steel Delivery + to: + href: "/api/v3/work_packages/84" + title: Bending the steel + _type: Relation + id: 1 + name: precedes + type: precedes + reverseType: follows + description: We can't bend the steel before it's been delivered! + delay: 0 + RevisionModel: + type: object + required: + - identifier + - formattedIdentifier + - authorName + - message + - createdAt + properties: + id: + type: integer + description: Revision's id, assigned by OpenProject + readOnly: true + exclusiveMinimum: 0 + identifier: + type: string + description: The raw SCM identifier of the revision (e.g. full SHA hash) + readOnly: true + formattedIdentifier: + type: string + description: + The SCM identifier of the revision, formatted (e.g. shortened + unambiguous SHA hash). May be identical to identifier in many cases + readOnly: true + authorName: + type: string + description: + The name of the author that committed this revision. Note that + this name is retrieved from the repository and does not identify a user + in OpenProject. + readOnly: true + message: + allOf: + - "$ref": "#/components/schemas/Formattable" + - description: The commit message of the revision + readOnly: true + createdAt: + type: string + format: date-time + description: The time this revision was committed to the repository + _links: + type: object + required: + - self + - project + - showRevision + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This revision + + **Resource**: Revision + readOnly: true + project: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The project to which the revision belongs + + **Resource**: Project + readOnly: true + author: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The user that added this revision, if the authorName was mapped to a user in OpenProject + + **Resource**: User + readOnly: true + showRevision: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + A URL to the repository view (outside APIv3) showing this revision + + **Resource**: - + readOnly: true + example: + _type: Revision + _links: + self: + href: "/api/v3/revisions/1" + project: + href: "/api/v3/projects/1" + author: + href: "/api/v3/users/1" + showRevision: + href: "/projects/identifier/repository/revision/11f4b07" + id: 1 + identifier: 11f4b07dff4f4ce9548a52b7d002daca7cd63ec6 + formattedIdentifier: 11f4b07 + authorName: Some Developer + message: + format: plain + raw: |- + This revision provides new features + + An elaborate description + html: "

This revision provides new features

An elaborate description

" + createdAt: "2015-07-21T13:36:59Z" + RevisionsModel: + type: object + example: + _links: + self: + href: "/api/v3/work_packages/42/revisions" + total: 2 + count: 2 + _type: Collection + _embedded: + elements: + - _type: Revision + _links: + self: + href: "/api/v3/revisions/13" + project: + href: "/api/v3/projects/1" + title: A Test Project + author: + href: "/api/v3/users/1" + title: John Sheppard - j.sheppard + showRevision: + href: "/projects/identifier/repository/revision/11f4b07" + id: 13 + identifier: 11f4b07dff4f4ce9548a52b7d002daca7cd63ec6 + formattedIdentifier: 11f4b07 + authorName: John Sheppard + message: + format: plain + raw: |- + This revision provides new features + + An elaborate description + html: + "

This revision provides new features

An elaborate + description

" + createdAt: "2015-07-21T13:36:59Z" + - _type: Revision + _links: + self: + href: "/api/v3/revisions/14" + project: + href: "/api/v3/projects/1" + title: A Test Project + author: + href: "/api/v3/users/2" + title: Jim Sheppard - j.sheppard + showRevision: + href: "/projects/identifier/repository/revision/029ed72a" + id: 13 + identifier: "029ed72a3b7b7c4ab332b1f6eaa6576e7c946059" + formattedIdentifier: "029ed72a" + authorName: j1msheppard + message: + format: plain + raw: |- + This revision fixes some stuff + + More information here + html: "

This revision fixes some stuff

More information here

" + createdAt: "2015-06-30T08:47:00Z" + RoleModel: + type: object + required: + - name + properties: + _type: + type: string + enum: + - Role + id: + type: integer + description: Role id + readOnly: true + minimum: 1 + name: + type: string + description: Role name + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This role + + **Resource**: Role + readOnly: true + example: + _type: Role + id: 3 + name: Manager + _links: + self: + href: "/api/v3/roles/3" + title: Manager + RolesModel: + type: object + example: + _type: Collection + total: 5 + count: 5 + _embedded: + elements: + - _type: Role + id: 3 + name: Manager + _links: + self: + href: "/api/v3/roles/3" + title: Manager + - _type: Role + id: 2 + name: Anonymous + _links: + self: + href: "/api/v3/roles/2" + title: Anonymous + - _type: Role + id: 5 + name: Reader + _links: + self: + href: "/api/v3/roles/5" + title: Reader + - _type: Role + id: 4 + name: Member + _links: + self: + href: "/api/v3/roles/4" + title: Member + - _type: Role + id: 1 + name: Non member + _links: + self: + href: "/api/v3/roles/1" + title: Non member + _links: + self: + href: "/api/v3/roles" + RootModel: + type: object + required: + - _type + - instanceName + - _links + properties: + _type: + type: string + enum: + - Root + instanceName: + type: string + description: The name of the OpenProject instance + coreVersion: + type: string + description: |- + The OpenProject core version number for the instance + + # Conditions + + **Permission** requires admin privileges + _links: + type: object + required: + - self + - configuration + - memberships + - priorities + - relations + - statuses + - time_entries + - types + - user + - userPreferences + - workPackages + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This root information object. + + **Resource**: Root + configuration: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The configuration resource. + + **Resource**: Configuration + memberships: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The collection of memberships. + + **Resource**: Collection + priorities: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The collection of priorities. + + **Resource**: Collection + relations: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The collection of relations. + + **Resource**: Collection + statuses: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The collection of statuses. + + **Resource**: Collection + time_entries: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The collection of time entries. + + **Resource**: Collection + types: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The collection of types. + + **Resource**: Collection + user: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The current user resource. + + **Resource**: User + userPreferences: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The current user preferences resource. + + **Resource**: UserPreferences + workPackages: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The work package collection. + + **Resource**: Collection + example: + _type: Root + instanceName: OpenProject + coreVersion: 12.1.0 + _links: + self: + href: "/api/v3" + configuration: + href: "/api/v3/configuration" + memberships: + href: "/api/v3/memberships" + priorities: + href: "/api/v3/priorities" + relations: + href: "/api/v3/relations" + statuses: + href: "/api/v3/statuses" + time_entries: + href: "/api/v3/time_entries" + types: + href: "/api/v3/types" + user: + href: "/api/v3/users/3" + title: Anakin Skywalker + userPreferences: + href: "/api/v3/users/3/preferences" + workPackages: + href: "/api/v3/work_packages" + SchemaModel: + type: object + required: + - _type + - _links + properties: + _type: + type: string + enum: + - Schema + _dependencies: + type: array + description: + A list of dependencies between one property's value and another + property + items: + type: string + _links: + type: object + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This schema + + **Resource**: Schema + readOnly: true + Schema_For_Global_QueriesModel: + type: object + example: + _type: Schema + _dependencies: [] + id: + type: Integer + name: ID + required: true + hasDefault: false + writable: false + name: + type: String + name: Name + required: true + hasDefault: false + writable: true + minLength: 1 + maxLength: 255 + createdAt: + type: DateTime + name: Created on + required: true + hasDefault: false + writable: false + updatedAt: + type: DateTime + name: Updated on + required: true + hasDefault: false + writable: false + user: + type: User + name: User + required: true + hasDefault: true + writable: false + project: + type: Project + name: Project + required: false + hasDefault: false + writable: true + location: _links + _links: {} + public: + type: Boolean + name: Public + required: false + hasDefault: true + writable: true + sums: + type: Boolean + name: Sums + required: false + hasDefault: true + writable: true + timelineVisible: + type: Boolean + name: Timeline visible + required: false + hasDefault: true + writable: true + deprecated: true + timelineZoomLevel: + type: String + name: Timeline zoom level + required: false + hasDefault: true + writable: true + deprecated: true + timelineLabels: + type: QueryTimelineLabels + name: Timeline labels + required: false + hasDefault: true + writable: true + deprecated: true + timestamps: + type: "[]Timestamp" + name: Timestamps + required: false + hasDefault: true + writable: true + highlightingMode: + type: String + name: Highlighting mode + required: false + hasDefault: true + writable: true + deprecated: true + highlightedAttributes: + type: "[]QueryColumn" + name: Highlighted attributes + required: false + hasDefault: true + writable: true + location: _links + deprecated: true + showHierarchies: + type: Boolean + name: Show hierarchies + required: false + hasDefault: true + writable: true + deprecated: true + starred: + type: Boolean + name: Starred + required: false + hasDefault: true + writable: true + columns: + type: "[]QueryColumn" + name: Columns + required: false + hasDefault: true + writable: true + location: _links + _links: {} + filters: + type: "[]QueryFilterInstance" + name: Filters + required: false + writable: true + hasDefault: true + location: _links + _links: + allowedValuesSchemas: + href: "/api/v3/queries/filter_instance_schemas" + groupBy: + type: "[]QueryGroupBy" + name: Group results by + required: false + hasDefault: false + writable: true + _links: {} + sortBy: + type: "[]QuerySortBy" + name: Sort by + required: false + hasDefault: true + writable: true + _links: {} + results: + type: WorkPackageCollection + name: Results + required: false + hasDefault: false + writable: false + _embedded: + filtersSchemas: + _type: Collection + total: 20 + count: 20 + _embedded: + elements: + - _type: QueryFilterInstanceSchema + _dependencies: + - _type: SchemaDependency + "on": operator + dependencies: + "/api/v3/queries/operators/=": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + "/api/v3/queries/operators/!": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + "/api/v3/queries/operators/!*": {} + "/api/v3/queries/operators/*": {} + name: + type: String + name: Name + required: true + hasDefault: true + writable: false + filter: + type: QueryFilter + name: Filter + required: true + hasDefault: false + writable: true + _links: {} + _links: + self: + href: "/api/v3/queries/filter_instance_schemas/assignee" + filter: + href: "/api/v3/queries/filters/assignee" + title: Assignee + - _type: QueryFilterInstanceSchema + _dependencies: + - _type: SchemaDependency + "on": operator + dependencies: + "/api/v3/queries/operators/=": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + "/api/v3/queries/operators/!": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + name: + type: String + name: Name + required: true + hasDefault: true + writable: false + filter: + type: QueryFilter + name: Filter + required: true + hasDefault: false + writable: true + _links: {} + _links: + self: + href: "/api/v3/queries/filter_instance_schemas/author" + filter: + href: "/api/v3/queries/filters/author" + title: Author + _links: + self: + href: "/api/v3/queries/filter_instance_schemas" + _links: + self: + href: "/api/v3/queries/schema" + Schema_For_Project_QueriesModel: + type: object + example: + _type: Schema + _dependencies: [] + id: + type: Integer + name: ID + required: true + hasDefault: false + writable: false + name: + type: String + name: Name + required: true + hasDefault: false + writable: true + minLength: 1 + maxLength: 255 + createdAt: + type: DateTime + name: Created on + required: true + hasDefault: false + writable: false + updatedAt: + type: DateTime + name: Updated on + required: true + hasDefault: false + writable: false + user: + type: User + name: User + required: true + hasDefault: true + writable: false + project: + type: Project + name: Project + required: false + hasDefault: false + writable: true + _links: {} + public: + type: Boolean + name: Public + required: false + hasDefault: true + writable: true + sums: + type: Boolean + name: Sums + required: false + hasDefault: true + writable: true + timelineVisible: + type: Boolean + name: Timeline visible + required: false + hasDefault: true + writable: true + timelineZoomLevel: + type: String + name: Timeline zoom level + required: false + hasDefault: true + writable: true + showHierarchies: + type: Boolean + name: Show hierarchies + required: false + hasDefault: true + writable: true + starred: + type: Boolean + name: Starred + required: false + hasDefault: true + writable: true + columns: + type: "[]QueryColumn" + name: Columns + required: false + hasDefault: true + writable: true + _links: {} + filters: + type: "[]QueryFilterInstance" + name: Filters + required: false + writable: true + hasDefault: true + _links: + allowedValuesSchemas: + href: "/api/v3/projects/42/queries/filter_instance_schemas" + groupBy: + type: "[]QueryGroupBy" + name: Group results by + required: false + hasDefault: false + writable: true + _links: {} + sortBy: + type: "[]QuerySortBy" + name: Sort by + required: false + hasDefault: true + writable: true + _links: {} + results: + type: WorkPackageCollection + name: Results + required: false + hasDefault: false + writable: false + _embedded: + filtersSchemas: + _type: Collection + total: 20 + count: 20 + _embedded: + elements: + - _type: QueryFilterInstanceSchema + _dependencies: + - _type: SchemaDependency + "on": operator + dependencies: + "/api/v3/queries/operators/=": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + "/api/v3/queries/operators/!": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + "/api/v3/queries/operators/!*": {} + "/api/v3/queries/operators/*": {} + name: + type: String + name: Name + required: true + hasDefault: true + writable: false + filter: + type: QueryFilter + name: Filter + required: true + hasDefault: false + writable: true + _links: {} + _links: + self: + href: "/api/v3/queries/filter_instance_schemas/assignee" + filter: + href: "/api/v3/queries/filters/assignee" + title: Assignee + - _type: QueryFilterInstanceSchema + _dependencies: + - _type: SchemaDependency + "on": operator + dependencies: + "/api/v3/queries/operators/=": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + "/api/v3/queries/operators/!": + values: + type: "[]User" + name: Values + required: true + hasDefault: false + writable: true + _links: {} + name: + type: String + name: Name + required: true + hasDefault: true + writable: false + filter: + type: QueryFilter + name: Filter + required: true + hasDefault: false + writable: true + _links: {} + _links: + self: + href: "/api/v3/queries/filter_instance_schemas/author" + filter: + href: "/api/v3/queries/filters/author" + title: Author + _links: + self: + href: "/api/v3/projects/42/queries/filter_instance_schemas" + _links: + self: + href: "/api/v3/projects/42/queries/schema" + Star_QueryModel: + type: object + example: + _type: Query + id: 9 + name: fdsfdsfdsf + createdAt: "2015-03-20T12:56:56Z" + updatedAt: "2015-05-20T18:16:53Z" + filters: + - _type: StatusQueryFilter + name: Status + _links: + filter: + href: "/api/v3/queries/filters/status" + title: Status + operator: + href: "/api/v3/queries/operators/o" + title: open + schema: + href: "/api/v3/queries/filter_instance_schemas/status" + values: [] + - _type: DueDateQueryFilter + name: Finish date + values: + - "1" + _links: + filter: + href: "/api/v3/queries/filters/dueDate" + title: Finish date + operator: + href: "/api/v3/queries/operators/" + _links: + self: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + jumpTo: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + changeSize: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + createWorkPackage: + href: "/api/v3/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/work_packages" + method: post + _links: + self: + href: "/api/v3/queries/9" + title: fdsfdsfdsf + results: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + columns: + - href: "/api/v3/queries/columns/id" + title: ID + - href: "/api/v3/queries/columns/subject" + title: Subject + - href: "/api/v3/queries/columns/type" + title: Type + - href: "/api/v3/queries/columns/status" + title: Status + - href: "/api/v3/queries/columns/priority" + title: Priority + - href: "/api/v3/queries/columns/assignee" + title: Assignee + - href: "/api/v3/queries/columns/updated_at" + title: Updated on + groupBy: + href: + title: + sortBy: + - href: "/api/v3/queries/sort_bys/parent-desc" + title: Parent (Descending) + user: + href: "/api/v3/users/1" + title: OpenProject Admin + project: + href: "/api/v3/projects/3" + title: copy + StatusModel: + type: object + properties: + _type: + type: string + enum: + - Status + id: + type: integer + description: Status id + readOnly: true + minimum: 1 + name: + type: string + description: Status name + readOnly: true + position: + type: integer + description: Sort index of the status + readOnly: true + isDefault: + type: boolean + readOnly: true + isClosed: + type: boolean + description: are tickets of this status considered closed? + readOnly: true + isReadonly: + type: boolean + description: are tickets of this status read only? + readOnly: true + defaultDoneRatio: + type: integer + description: The percentageDone being applied when changing to this status + maximum: 100 + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This status + + **Resource**: Status + readOnly: true + example: + _links: + self: + href: "/api/v3/statuses/1" + _type: Status + id: 1 + name: New + position: 1 + isDefault: true + isClosed: false + defaultDoneRatio: 0 + StatusesModel: + type: object + example: + _links: + self: + href: "/api/v3/statuses" + total: 6 + count: 6 + _type: Collection + _embedded: + elements: + - _links: + self: + href: "/api/v3/statuses/1" + _type: Status + id: 1 + name: New + position: 1 + isDefault: true + isClosed: false + defaultDoneRatio: 0 + - _links: + self: + href: "/api/v3/statuses/3" + _type: Status + id: 3 + name: Resolved + position: 3 + isDefault: false + isClosed: false + isReadonly: false + defaultDoneRatio: 75 + - _links: + self: + href: "/api/v3/statuses/4" + _type: Status + id: 4 + name: Feedback + position: 4 + isDefault: false + isClosed: false + defaultDoneRatio: 25 + - _links: + self: + href: "/api/v3/statuses/5" + _type: Status + id: 5 + name: Closed + position: 5 + isDefault: false + isClosed: true + defaultDoneRatio: 100 + - _links: + self: + href: "/api/v3/statuses/6" + _type: Status + id: 6 + name: Rejected + position: 6 + isDefault: false + isClosed: true + defaultDoneRatio: 100 + - _links: + self: + href: "/api/v3/statuses/2" + _type: Status + id: 2 + name: In Progress + position: 3 + isDefault: false + isClosed: false + defaultDoneRatio: 50 + StorageFileModel: + allOf: + - "$ref": "#/components/schemas/FileLinkOriginDataModel" + - type: object + required: + - _type + - location + - _links + properties: + _type: + type: string + enum: + - StorageFile + location: + type: string + description: Location identification for file in storage + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Not provided + + **Resource**: urn:openproject-org:api:v3:storages:storage_file:no_link_provided + example: + id: 42 + name: readme.md + _type: StorageFile + location: "/readme.md" + _links: + self: + href: urn:openproject-org:api:v3:storages:storage_file:no_link_provided + StorageFilesModel: + type: object + required: + - _type + - files + - parent + - ancestors + - _links + properties: + _type: + type: string + enum: + - StorageFiles + files: + type: array + items: + "$ref": "#/components/schemas/StorageFileModel" + description: List of files provided by the selected storage. + parent: + allOf: + - "$ref": "#/components/schemas/StorageFileModel" + - description: File of the currently selected parent directory. + ancestors: + type: array + items: + "$ref": "#/components/schemas/StorageFileModel" + description: + List of ancestors of the parent directory. Can be empty, if + parent directory was root directory. + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Not provided + + **Resource**: urn:openproject-org:api:v3:storages:storage_file:no_link_provided + example: + _type: StorageFiles + files: + - id: 42 + name: readme.md + _type: StorageFile + location: "/readme.md" + mimeType: text/markdown + size: 4096 + createdAt: "2021-12-19T09:42:10.170Z" + lastModifiedAt: "2021-12-20T14:00:13.987Z" + createdByName: Luke Skywalker + lastModifiedByName: Anakin Skywalker + _links: + self: + href: urn:openproject-org:api:v3:storages:storage_file:no_link_provided + - id: 43 + name: readme.pdf + _type: StorageFile + location: "/readme.pdf" + mimeType: application/pdf + size: 2048 + createdAt: "2021-12-19T09:42:10.170Z" + lastModifiedAt: "2021-12-20T14:00:13.987Z" + createdByName: Luke Skywalker + lastModifiedByName: Anakin Skywalker + _links: + self: + href: urn:openproject-org:api:v3:storages:storage_file:no_link_provided + parent: + id: 41 + name: "/" + location: "/" + mimeType: application/x-op-directory + size: 6144 + createdAt: "2021-12-20T09:42:10.170Z" + lastModifiedAt: "2021-12-21T14:00:13.987Z" + createdByName: Luke Skywalker + lastModifiedByName: Anakin Skywalker + _links: + self: + href: urn:openproject-org:api:v3:storages:storage_file:no_link_provided + ancestors: [] + _links: + self: + href: urn:openproject-org:api:v3:storages:storage_file:no_link_provided + StorageFileUploadPreparationModel: + type: object + required: + - projectId + - fileName + - parent + properties: + projectId: + type: integer + description: + The project identifier, from where a user starts uploading + a file. + minimum: 1 + fileName: + type: string + description: The file name. + parent: + type: string + description: |- + The directory to which the file is to be uploaded. For root directories, the value `/` must + be provided. + StorageFileUploadLinkModel: + type: object + required: + - _type + - _links + properties: + _type: + type: string + enum: + - UploadLink + _links: + type: object + required: + - self + - destination + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The resource link of the upload link resource. + + As the upload link is a temporal object, and cannot be retrieved again, the + self link usually is `urn:openproject-org:api:v3:storages:upload_link:no_link_provided`. + + **Resource**: UploadLink + destination: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The direct upload link. + + **Resource**: N/A + StorageReadModel: + type: object + required: + - id + - _type + - name + - _links + properties: + id: + type: integer + description: Storage id + _type: + type: string + enum: + - Storage + name: + type: string + description: Storage name + hasApplicationPassword: + type: boolean + description: |- + Whether the storage has the application password to use for the Nextcloud storage. + + Ignored if the provider type is not Nextcloud + createdAt: + type: string + format: date-time + description: Time of creation + updatedAt: + type: string + format: date-time + description: Time of the most recent change to the storage + _embedded: + type: object + required: + - oauthApplication + - oauthClientCredentials + properties: + oauthApplication: + "$ref": "#/components/schemas/OAuthApplicationReadModel" + oauthClientCredentials: + "$ref": "#/components/schemas/OAuthClientCredentialsReadModel" + _links: + type: object + required: + - self + - type + - origin + - open + - authorizationState + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This storage resource. Contains the user defined storage name as title. + + **Resource**: Storage + type: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The urn of the storage type. Currently only nextcloud storages are supported. + + **Resource**: N/A + origin: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Web URI of the storage instance. + + **Resource**: N/A + open: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + URI of the file storage location, from where the user usually starts browsing files. + + **Resource**: N/A + authorizationState: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The urn of the storage connection state. Can be one of: + + - urn:openproject-org:api:v3:storages:authorization:Connected + - urn:openproject-org:api:v3:storages:authorization:FailedAuthorization + - urn:openproject-org:api:v3:storages:authorization:Error + + **Resource**: N/A + authorize: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The link to the starting point of the authorization cycle for a configured storage provider. + + # Conditions + + `authorizationState` is: + + - urn:openproject-org:api:v3:storages:authorization:FailedAuthorization + + **Resource**: N/A + oauthApplication: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The OAuth 2 provider application linked to the storage. + + # Conditions + + - User has role `admin` + + **Resource**: OAuthApplication + oauthClientCredentials: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The OAuth 2 credentials resource linked to the storage. + + # Conditions + + - User has role `admin` + + **Resource**: OAuthClientCredentials + example: + id: 1337 + _type: Storage + name: It's no moon + hasApplicationPassword: true + createdAt: "2021-12-20T13:37:00.211Z" + updatedAt: "2021-12-20T13:37:00.211Z" + _links: + self: + href: "/api/v3/storages/1337" + title: It's no moon + type: + href: urn:openproject-org:api:v3:storages:nextcloud + title: Nextcloud + origin: + href: https://nextcloud.deathstar.rocks/ + open: + href: https://nextcloud.deathstar.rocks/apps/files + authorizationState: + href: urn:openproject-org:api:v3:storages:authorization:FailedAuthorization + title: Failed Authorization + authorize: + href: https://nextcloud.deathstar.rocks/authorize/ + title: Authorize + oauthApplication: + href: "/api/v3/oauth_application/42" + title: It's no moon (Nextcloud) + oauthClientCredentials: + href: "/api/v3/oauth_client_credentials/42" + StorageWriteModel: + type: object + properties: + name: + type: string + description: Storage name, if not provided, falls back to a default. + applicationPassword: + type: + - string + - "null" + description: |- + The application password to use for the Nextcloud storage. Ignored if the provider type is not Nextcloud. + + If a string is provided, the password is set and automatic management is enabled for the storage. + If null is provided, the password is unset and automatic management is disabled for the storage. + _links: + type: object + required: + - origin + - type + properties: + origin: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The storage's host URL. + + **Resource**: N/A + type: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The urn of the storage type. Currently only nextcloud storages are supported. + + - urn:openproject-org:api:v3:storages:Nextcloud + + **Resource**: N/A + example: + name: Coruscant + applicationPassword: qJ_VLNReW@sd-Edz2hyC + _links: + origin: + href: https://nextcloud.deathstar.rocks + type: + href: urn:openproject-org:api:v3:storages:Nextcloud + TimeEntryActivityModel: + type: object + required: + - _type + - id + - name + - position + - default + - _embedded + - _links + properties: + _type: + type: string + enum: + - TimeEntriesActivity + id: + type: integer + description: Time entry id + minimum: 1 + name: + type: string + description: The human readable name chosen for this activity + position: + type: integer + description: The rank the activity has in a list of activities + default: + type: boolean + description: Flag to signal whether this activity is the default activity + _embedded: + type: object + required: + - projects + properties: + projects: + type: array + items: + "$ref": "#/components/schemas/ProjectModel" + _links: + type: object + required: + - self + - projects + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This time entry activity + + **Resource**: TimeEntriesActivity + projects: + type: array + items: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + One of the projects the time entry is active in. + + **Resource**: Project + examples: + - _type: TimeEntriesActivity + id: 18 + name: Management + position: 8 + default: false + _embedded: + projects: [] + _links: + self: + href: "/api/v3/time_entries/activities/18" + title: Management + projects: + - href: "/api/v3/projects/death_star_v2" + title: DeathStarV2 + - href: "/api/v3/projects/star_killer_base" + title: StarKillerBase + TimeEntryCollectionModel: + type: object + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - _links + - _embedded + properties: + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This time entry collection + + **Resource**: TimeEntryCollectionModel + _embedded: + type: object + required: + - elements + properties: + elements: + type: array + items: + "$ref": "#/components/schemas/TimeEntryModel" + examples: + - _type: Collection + total: 39 + count: 2 + pageSize: 2 + offset: 1 + _embedded: + elements: + - _type: TimeEntry + id: 5 + comment: + format: plain + raw: Some comment + html: "

Some comment

" + spentOn: "2015-03-20" + hours: PT5H + createdAt: "2015-03-20T12:56:56Z" + updatedAt: "2015-03-20T12:56:56Z" + _links: + self: + href: "/api/v3/time_entries/1" + updateImmediately: + href: "/api/v3/time_entries/1" + method: patch + delete: + href: "/api/v3/time_entries/1" + method: delete + project: + href: "/api/v3/projects/1" + title: Some project + workPackage: + href: "/api/v3/work_packages/1" + title: Some work package + user: + href: "/api/v3/users/2" + title: Some user + activity: + href: "/api/v3/time_entries/activities/18" + title: Some time entry activity + - _type: TimeEntry + id: 10 + comment: + format: plain + raw: Another comment + html: "

Another comment

" + spentOn: "2015-03-21" + hours: PT7H + createdAt: "2015-03-20T12:56:56Z" + updatedAt: "2015-03-20T12:56:56Z" + _links: + self: + href: "/api/v3/time_entries/2" + project: + href: "/api/v3/projects/42" + title: Some other project + workPackage: + href: "/api/v3/work_packages/541" + title: Some other work package + user: + href: "/api/v3/users/6" + title: Some other project + activity: + href: "/api/v3/time_entries/activities/14" + title: some other time entry activity + _links: + self: + href: "/api/v3/time_entries?offset=1&pageSize=2" + jumpTo: + href: "/api/v3/time_entries?offset=%7Boffset%7D&pageSize=2" + templated: true + changeSize: + href: "/api/v3/time_entries?offset=1&pageSize=%7Bsize%7D" + templated: true + nextByOffset: + href: "/api/v3/time_entries?offset=2&pageSize=2" + createTimeEntry: + href: "/api/v3/time_entries/form" + method: post + createTimeEntryImmediately: + href: "/api/v3/time_entries" + method: post + TimeEntryModel: + type: object + properties: + id: + type: integer + description: The id of the time entry + minimum: 1 + comment: + allOf: + - "$ref": "#/components/schemas/Formattable" + - description: A comment to the time entry + spentOn: + type: string + format: date + description: The date the expenditure is booked for + hours: + type: string + format: duration + description: The time quantifying the expenditure + ongoing: + type: boolean + description: Whether the time entry is actively tracking time + createdAt: + type: string + format: date-time + description: The time the time entry was created + updatedAt: + type: string + format: date-time + description: The time the time entry was last updated + _links: + type: object + required: + - self + - project + - user + - activity + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This time entry + + **Resource**: TimeEntry + updateImmediately: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Directly perform edits on this time entry + + # Conditions + + **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user + update: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Form endpoint that aids in preparing and performing edits on a TimeEntry + + # Conditions + + **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user + delete: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Delete this time entry + + # Conditions + + **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user + schema: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The time entry schema + + **Resource**: Schema + project: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The project the time entry is bundled in. The project might be different from the work package's project once the workPackage is moved. + + **Resource**: Project + workPackage: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The work package the time entry is created on + + **Resource**: WorkPackage + user: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The user the time entry tracks expenditures for + + **Resource**: User + activity: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The time entry activity the time entry is categorized as + + **Resource**: TimeEntriesActivity + examples: + - _type: TimeEntry + id: 42 + comment: + format: plain + raw: The force shall set me free. + html: "

The force shall set me free.

" + spentOn: "2023-01-11" + hours: PT4H + createdAt: "2023-01-11T13:58:24Z" + updatedAt: "2023-01-11T13:58:24Z" + _links: + self: + href: "/api/v3/time_entries/42" + updateImmediately: + href: "/api/v3/time_entries/42" + method: patch + update: + href: "/api/v3/time_entries/42/form" + method: post + delete: + href: "/api/v3/time_entries/42" + method: delete + schema: + href: "/api/v3/time_entries/schema" + project: + href: "/api/v3/projects/11" + title: DeathStarV2 + workPackage: + href: "/api/v3/work_packages/77" + title: Build new hangar + user: + href: "/api/v3/users/3" + title: Darth Vader + activity: + href: "/api/v3/time_entries/activities/1" + title: Management + TypeModel: + type: object + properties: + id: + type: integer + description: Type id + readOnly: true + exclusiveMinimum: 0 + name: + type: string + description: Type name + readOnly: true + color: + type: string + description: The color used to represent this type + readOnly: true + position: + type: integer + description: Sort index of the type + readOnly: true + isDefault: + type: boolean + description: Is this type active by default in new projects? + readOnly: true + isMilestone: + type: boolean + description: Do work packages of this type represent a milestone? + readOnly: true + createdAt: + type: string + format: date-time + description: Time of creation + readOnly: true + updatedAt: + type: string + format: date-time + description: Time of the most recent change to the user + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This type + + **Resource**: Type + readOnly: true + example: + _links: + self: + href: "/api/v3/types/1" + _type: Type + id: 1 + name: Bug + color: "#ff0000" + position: 1 + isDefault: true + isMilestone: false + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + TypesModel: + type: object + example: + _links: + self: + href: "/api/v3/types" + total: 2 + count: 2 + _type: Collection + _embedded: + elements: + - _links: + self: + href: "/api/v3/types/1" + _type: Type + id: 1 + name: Bug + color: "#ff0000" + position: 1 + isDefault: true + isMilestone: false + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + - _links: + self: + href: "/api/v3/types/2" + _type: Type + id: 2 + name: Feature + color: "#888" + position: 2 + isDefault: false + isMilestone: false + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + Types_by_ProjectModel: + type: object + example: + _links: + self: + href: "/api/v3/projects/11/types" + total: 2 + count: 2 + _type: Collection + _embedded: + elements: + - _links: + self: + href: "/api/v3/types/1" + _type: Type + id: 1 + name: Bug + color: "#ff0000" + position: 1 + isDefault: true + isMilestone: false + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + - _links: + self: + href: "/api/v3/types/2" + _type: Type + id: 2 + name: Feature + color: "#888" + position: 2 + isDefault: false + isMilestone: false + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + Unstar_QueryModel: + type: object + example: + _type: Query + id: 9 + name: fdsfdsfdsf + createdAt: "2015-03-20T12:56:56Z" + updatedAt: "2015-05-20T18:16:53Z" + filters: + - _type: StatusQueryFilter + name: Status + _links: + filter: + href: "/api/v3/queries/filters/status" + title: Status + operator: + href: "/api/v3/queries/operators/o" + title: open + schema: + href: "/api/v3/queries/filter_instance_schemas/status" + values: [] + - _type: DueDateQueryFilter + name: Finish date + values: + - "1" + _links: + filter: + href: "/api/v3/queries/filters/dueDate" + title: Finish date + operator: + href: "/api/v3/queries/operators/" + _links: + self: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + jumpTo: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + changeSize: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + templated: true + createWorkPackage: + href: "/api/v3/work_packages/form" + method: post + createWorkPackageImmediate: + href: "/api/v3/work_packages" + method: post + _links: + self: + href: "/api/v3/queries/9" + title: fdsfdsfdsf + results: + href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D" + columns: + - href: "/api/v3/queries/columns/id" + title: ID + - href: "/api/v3/queries/columns/subject" + title: Subject + - href: "/api/v3/queries/columns/type" + title: Type + - href: "/api/v3/queries/columns/status" + title: Status + - href: "/api/v3/queries/columns/priority" + title: Priority + - href: "/api/v3/queries/columns/assignee" + title: Assignee + - href: "/api/v3/queries/columns/updated_at" + title: Updated on + groupBy: + href: + title: + sortBy: + - href: "/api/v3/queries/sort_bys/parent-desc" + title: Parent (Descending) + user: + href: "/api/v3/users/1" + title: OpenProject Admin + project: + href: "/api/v3/projects/3" + title: copy + UserCollectionModel: + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - _links + - _embedded + properties: + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This user collection + + **Resource**: UserCollectionModel + _embedded: + type: object + required: + - elements + properties: + elements: + type: array + items: + "$ref": "#/components/schemas/UserModel" + example: + _type: Collection + total: 2 + count: 2 + _links: + self: + href: "/api/v3/users" + _embedded: + elements: + - _hint: User resource shortened for brevity + _type: User + id: 1337 + - _hint: User resource shortened for brevity + _type: User + id: 1338 + UserCreateModel: + type: object + required: + - admin + - email + - login + - firstName + - lastName + - language + properties: + admin: + type: boolean + email: + type: string + maxLength: 60 + login: + type: string + maxLength: 256 + password: + type: string + description: |- + The users password. + + *Conditions:* + + Only writable on creation, not on update. + firstName: + type: string + maxLength: 30 + lastName: + type: string + maxLength: 30 + status: + type: string + description: |- + The current activation status of the user. + + *Conditions:* + + Only writable on creation, not on update. + language: + type: string + example: + login: j.sheppard + password: idestroyedsouvereign + firstName: John + lastName: Sheppard + email: shep@mail.com + admin: true + status: active + language: en + UserModel: + type: object + required: + - _type + - id + - name + - avatar + - _links + properties: + _type: + type: string + enum: + - User + id: + type: integer + description: User's id + minimum: 0 + login: + type: string + description: |- + User's login name + + # Conditions + + **Permission**: Administrator, manage_user global permission + maxLength: 256 + firstName: + type: string + description: |- + User's first name + + # Conditions + + **Permission**: Administrator, manage_user global permission + maxLength: 30 + lastName: + type: string + description: |- + User's last name + + # Conditions + + **Permission**: Administrator, manage_user global permission + maxLength: 30 + name: + type: string + description: User's full name, formatting depends on instance settings + email: + type: string + description: |- + User's email address + + # Conditions + + E-Mail address not hidden, **Permission**: Administrator, manage_user global permission + maxLength: 60 + admin: + type: boolean + description: |- + Flag indicating whether or not the user is an admin + + # Conditions + + **Permission**: Administrator + avatar: + type: string + format: uri + description: URL to user's avatar + status: + type: string + description: The current activation status of the user (see below) + language: + type: string + description: |- + User's language | ISO 639-1 format + + # Conditions + + **Permission**: Administrator, manage_user global permission + identityUrl: + type: + - string + - "null" + description: |- + User's identity_url for OmniAuth authentication + + # Conditions + + **Permission**: Administrator + createdAt: + type: string + format: date-time + description: Time of creation + updatedAt: + type: string + format: date-time + description: Time of the most recent change to the user + _links: + type: object + required: + - self + - memberships + - showUser + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This user + + **Resource**: User + memberships: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Link to collection of all the user's memberships. The list will only include the memberships in projects in which the requesting user has the necessary permissions. + + **Resource**: MemberCollection + + # Conditions + + **Permission**: view members or manage members in any project + showUser: + allOf: + - "$ref": "#/components/schemas/Link" + - description: Link to the OpenProject user page (HTML) + updateImmediately: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Updates the user's attributes. + + # Conditions + + **Permission**: Administrator, manage_user global permission + lock: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Restrict the user from logging in and performing any actions + + # Conditions + + not locked; **Permission**: Administrator + unlock: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Allow a locked user to login and act again + + # Conditions + + locked; **Permission**: Administrator + delete: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Permanently remove a user from the instance + + # Conditions + + **Permission**: Administrator, self-delete + example: + _type: User + id: 1 + name: John Sheppard + login: j.sheppard + firstName: John + lastName: Sheppard + email: shep@mail.com + admin: true + avatar: https://example.org/users/1/avatar + status: active + identityUrl: null, + language: en + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + _links: + self: + href: "/api/v3/users/1" + title: John Sheppard + memberships: + href: "/api/v3/memberships?filters=%5B%7B%22principal%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D," + title: Members + showUser: + href: "/users/1" + type: text/html + lock: + href: "/api/v3/users/1/lock" + title: Set lock on John Sheppard + method: post + updateImmediately: + href: "/api/v3/users/1" + title: update John Sheppard + method: patch + delete: + href: "/api/v3/users/1" + title: delete John Sheppard + method: delete + UserPreferencesModel: + type: object + example: + _links: + self: + href: "/api/v3/my_preferences" + user: + href: "/api/v3/users/1" + title: John Sheppard + updateImmediately: + href: "/api/v3/users/3/preferences" + method: patch + _type: UserPreferences + commentSortDescending: true + hideMail: false + timeZone: Europe/Berlin + warnOnLeavingUnsaved: true + notifications: + - watched: false + involved: true + mentioned: false + newsAdded: false, + newsCommented: false + documentAdded: false + forumMessages: false + wikiPageAdded: false + wikiPageUpdated: false + membershipAdded: false + membershipUpdated: false + workPackageCommented: false + workPackageProcessed: false + workPackagePrioritized: false + workPackageScheduled: false + _links: + project: + href: + ValuesPropertyModel: + type: object + required: + - _type + - property + - value + - _links + properties: + _type: + type: string + enum: + - Values::Property + property: + type: string + description: The key of the key - value pair represented by the Values::Property + value: + type: string + description: The value of the key - value pair represented by the Values::Property + _links: + type: object + required: + - self + - schema + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This key - value pair. + + **Resource**: Storage + schema: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The schema describing the key - value pair. + + **Resource**: Schema + VersionModel: + type: object + required: + - name + - status + - sharing + - createdAt + - updatedAt + properties: + id: + type: integer + description: Version id + readOnly: true + exclusiveMinimum: 0 + name: + type: string + description: Version name + description: + allOf: + - "$ref": "#/components/schemas/Formattable" + - {} + startDate: + type: string + format: date + endDate: + type: string + format: date + status: + type: string + description: The current status of the version + sharing: + type: string + description: The current status of the version + createdAt: + type: string + format: date-time + description: Time of creation + readOnly: true + updatedAt: + type: string + format: date-time + description: Time of the most recent change to the version + readOnly: true + _links: + type: object + required: + - self + - availableInProjects + properties: + update: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Form endpoint that aids in preparing and performing edits on the version + + # Conditions + + **Permission**: manage versions + readOnly: true + updateImmediately: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Directly perform edits on the version + + # Conditions + + **Permission**: manage versions + readOnly: true + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This version + + **Resource**: Version + readOnly: true + definingProject: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The project to which the version belongs + + **Resource**: Project + readOnly: true + availableInProjects: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Projects where this version can be used + + **Resource**: Projects + readOnly: true + example: + _links: + self: + href: "/api/v3/versions/11" + update: + href: "/api/v3/versions/11/form" + method: POST + updateImmediately: + href: "/api/v3/versions/11" + method: PATCH + definingProject: + href: "/api/v3/projects/11" + availableInProjects: + href: "/api/v3/versions/11/projects" + customField4: + href: "/api/v3/custom_options/5" + title: Custom field option + _type: Version + id: 11 + name: v3.0 Alpha + description: + format: plain + raw: This version has a description + html: This version has a description + startDate: "2014-11-20" + endDate: + status: open + sharing: system + customField14: "1234567890" + Version_schemaModel: + type: object + example: + _type: Schema + _dependencies: [] + id: + type: Integer + name: ID + required: true + hasDefault: false + writable: false + name: + type: String + name: Name + required: true + hasDefault: false + writable: true + minLength: 1 + maxLength: 60 + description: + type: Formattable + name: Description + required: false + hasDefault: false + writable: true + startDate: + type: Date + name: Start date + required: false + hasDefault: false + writable: true + endDate: + type: Date + name: Finish date + required: false + hasDefault: false + writable: false + status: + type: String + name: Status + required: true + hasDefault: false + writable: true + visibility: default + _links: {} + sharing: + type: String + name: Sharing + required: true + hasDefault: false + writable: true + visibility: default + _links: {} + createdAt: + type: DateTime + name: Created on + required: true + hasDefault: false + writable: false + updatedAt: + type: DateTime + name: Updated on + required: true + hasDefault: false + writable: false + definingProject: + type: Project + name: Project + required: true + hasDefault: false + writable: true + _links: {} + customField14: + type: String + name: text CF + required: false + hasDefault: false + writable: true + visibility: default + customField40: + type: CustomOption + name: List CF + required: false + hasDefault: false + writable: true + location: _links + visibility: default + _links: {} + _links: + self: + href: "/api/v3/versions/schema" + VersionsModel: + type: object + example: + _links: + self: + href: "/api/v3/versions" + total: 3 + count: 3 + _type: Collection + _embedded: + elements: + - _links: + self: + href: "/api/v3/versions/11" + definingProject: + href: "/api/v3/projects/12" + availableInProjects: + href: "/api/v3/versions/11/projects" + _type: Version + id: 11 + name: v3.0 Alpha + description: + format: plain + raw: This version has a description + html: This version has a description + startDate: "2014-11-20" + endDate: + status: Open + - _links: + self: + href: "/api/v3/versions/12" + definingProject: + href: "/api/v3/projects/11" + availableInProjects: + href: "/api/v3/versions/12/projects" + _type: Version + id: 12 + name: v2.0 + description: + format: plain + raw: "" + html: "" + startDate: + endDate: + status: Closed + - _links: + self: + href: "/api/v3/versions/10" + definingProject: + href: "/api/v3/projects/13" + availableInProjects: + href: "/api/v3/versions/13/projects" + _type: Version + id: 10 + name: v1.0 + description: + format: plain + raw: "" + html: "" + startDate: + endDate: + status: Open + Versions_by_ProjectModel: + type: object + example: + _links: + self: + href: "/api/v3/projects/11/versions" + total: 3 + count: 3 + _type: Collection + _embedded: + elements: + - _links: + self: + href: "/api/v3/versions/11" + definingProject: + href: "/api/v3/projects/11" + availableInProjects: + href: "/api/v3/versions/11/projects" + _type: Version + id: 11 + name: v3.0 Alpha + description: + format: plain + raw: This version has a description + html: This version has a description + startDate: "2014-11-20" + endDate: + status: Open + - _links: + self: + href: "/api/v3/versions/12" + definingProject: + href: "/api/v3/projects/11" + availableInProjects: + href: "/api/v3/versions/12/projects" + _type: Version + id: 12 + name: v2.0 + description: + format: plain + raw: "" + html: "" + startDate: + endDate: + status: Closed + - _links: + self: + href: "/api/v3/versions/10" + definingProject: + href: "/api/v3/projects/11" + availableInProjects: + href: "/api/v3/versions/10/projects" + _type: Version + id: 10 + name: v1.0 + description: + format: plain + raw: "" + html: "" + startDate: + endDate: + status: Open + View_actionModel: + type: object + example: + _links: + self: + href: "/api/v3/actions/work_packages/create" + title: Add work package + _type: Action + id: work_packages/create + name: Add work package + description: + Creating a work package within a project including the uploading + of attachments. Some attributes might not be selected, e.g version which + requires a second permission + modules: + - work_packages + View_capabilitiesModel: + type: object + example: + _links: + self: + href: "/api/v3/capabilities/work_packages/create/p123-567" + action: + href: "/api/v3/actions/work_packages/create" + title: Add work package + context: + href: "/api/v3/projects/123" + title: A project + principal: + href: "/api/v3/users/567" + title: Some user + _type: Capability + id: work_packages/create/p123-567 + View_global_contextModel: + type: object + example: + _links: + self: + href: "/api/v3/capabilities/context/global" + _type: CapabilityContext::Global + id: global + View_membershipModel: + type: object + example: + _links: + self: + href: "/api/v3/memberships/11" + title: Some user + schema: + href: "/api/v3/memberships/schema" + update: + href: "/api/v3/memberships/11/form" + method: post + updateImmediately: + href: "/api/v3/memberships/11" + method: patch + project: + href: "/api/v3/projects/3" + title: A project + principal: + href: "/api/v3/users/4" + title: Some user + roles: + - href: "/api/v3/roles/5" + title: Member + - href: "/api/v3/roles/4" + title: Reader + _type: Membership + id: 11 + createdAt: "2015-03-20T12:56:56Z" + updatedAt: "2018-12-20T18:16:11Z" + _embedded: + project...: {} + principal...: {} + roles...: [] + View_membership_schemaModel: + type: object + example: + _type: Schema + _dependencies: [] + id: + type: Integer + name: ID + required: true + hasDefault: false + writable: false + createdAt: + type: DateTime + name: Created on + required: true + hasDefault: false + writable: false + updatedAt: + type: DateTime + name: Updated on + required: true + hasDefault: false + writable: false + notificationMessage: + type: Formattable + name: Message + required: false + hasDefault: false + writable: true + options: {} + location: _meta + project: + type: Project + name: Project + required: false + hasDefault: false + writable: true + location: _links + _links: {} + principal: + type: Principal + name: Principal + required: true + hasDefault: false + writable: true + location: _links + _links: {} + roles: + type: "[]Role" + name: Role + required: true + hasDefault: false + writable: true + location: _links + _links: {} + _links: + self: + href: "/api/v3/memberships/schema" + View_project_statusModel: + type: object + example: + _type: ProjectStatus + id: on_track + name: On track + _links: + self: + href: "/api/v3/project_statuses/on_track" + View_time_entry_schemaModel: + type: object + example: + _type: Schema + _dependencies: [] + id: + type: Integer + name: ID + required: true + hasDefault: false + writable: false + options: {} + createdAt: + type: DateTime + name: Created on + required: true + hasDefault: false + writable: false + options: {} + updatedAt: + type: DateTime + name: Updated on + required: true + hasDefault: false + writable: false + options: {} + spentOn: + type: Date + name: Date + required: true + hasDefault: false + writable: true + options: {} + hours: + type: Duration + name: Hours + required: true + hasDefault: false + writable: true + options: {} + user: + type: User + name: User + required: true + hasDefault: false + writable: false + options: {} + workPackage: + type: WorkPackage + name: Work package + required: false + hasDefault: false + writable: true + location: _links + _links: {} + project: + type: Project + name: Project + required: false + hasDefault: false + writable: true + location: _links + _links: {} + activity: + type: TimeEntriesActivity + name: Activity + required: true + hasDefault: true + writable: true + location: _links + _links: {} + customField29: + type: String + name: sfsdfsdfsdfsdfdsf + required: false + hasDefault: false + writable: true + options: + rtl: + _links: + self: + href: "/api/v3/time_entries/schema" + View_user_schemaModel: + type: object + example: + _type: Schema + _dependencies: [] + id: + type: Integer + name: ID + required: true + hasDefault: false + writable: false + options: {} + login: + type: String + name: Username + required: true + hasDefault: false + writable: true + minLength: 1 + maxLength: 255 + options: {} + admin: + type: Boolean + name: Administrator + required: false + hasDefault: false + writable: true + options: {} + mail: + type: String + name: Email + required: true + hasDefault: false + writable: true + minLength: 1 + maxLength: 255 + options: {} + firstName: + type: String + name: First name + required: true + hasDefault: false + writable: false + minLength: 1 + maxLength: 255 + options: {} + lastName: + type: String + name: Last name + required: true + hasDefault: false + writable: false + minLength: 1 + maxLength: 255 + options: {} + avatar: + type: String + name: Avatar + required: false + hasDefault: false + writable: false + options: {} + status: + type: String + name: Status + required: false + hasDefault: false + writable: true + options: {} + identityUrl: + type: String + name: Identity url + required: false + hasDefault: false + writable: true + options: {} + language: + type: String + name: Language + required: false + hasDefault: false + writable: true + options: {} + password: + type: Password + name: Password + required: false + hasDefault: false + writable: false + options: {} + createdAt: + type: DateTime + name: Created on + required: true + hasDefault: false + writable: false + options: {} + updatedAt: + type: DateTime + name: Updated on + required: true + hasDefault: false + writable: false + options: {} + customField1: + type: String + name: User String CF + required: false + hasDefault: false + writable: true + customField2: + type: CustomOption + name: User List cf + required: false + hasDefault: false + writable: true + location: _links + _links: + self: + href: "/api/v3/users/schema" + WatchersModel: + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - _links + - _embedded + properties: + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The watcher list + + **Resource**: WatchersModel + readOnly: true + _embedded: + type: object + properties: + elements: + type: array + readOnly: true + items: + allOf: + - "$ref": "#/components/schemas/UserModel" + - description: Collection of Users + example: + _links: + self: + href: "/api/v3/work_packages/14/watchers" + total: 2 + count: 2 + _type: Collection + _embedded: + elements: + - _type: User + _links: + self: + href: "/api/v3/users/1" + title: John Sheppard - j.sheppard + showUser: + href: "/users/1" + type: text/html + lock: + href: "/api/v3/users/1/lock" + title: Set lock on j.sheppard + method: POST + delete: + href: "/api/v3/users/1" + title: Delete j.sheppard + method: DELETE + id: 1 + login: j.sheppard + firstName: John + lastName: Sheppard + mail: shep@mail.com + avatar: https://example.org/users/1/avatar + status: active + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + - _type: User + _links: + self: + href: "/api/v3/users/2" + title: Jim Sheppard - j.sheppard2 + lock: + href: "/api/v3/users/2/lock" + title: Set lock on j.sheppard2 + method: POST + delete: + href: "/api/v3/users/2" + title: Delete j.sheppard2 + method: DELETE + id: 2 + login: j.sheppard2 + firstName: Jim + lastName: Sheppard + mail: shep@mail.net + avatar: https://example.org/users/1/avatar + status: active + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T08:51:20Z" + WeekDayCollectionModel: + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - _links + - _embedded + properties: + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This week days collection + + **Resource**: WeekDayCollectionModel + _embedded: + type: object + required: + - elements + properties: + elements: + type: array + description: The array of week days. + minItems: 7 + maxItems: 7 + items: + "$ref": "#/components/schemas/WeekDayModel" + example: + _type: Collection + total: 7 + count: 7 + _links: + self: + href: "/api/v3/days/week" + _embedded: + elements: + - _type: WeekDay + day: 1 + name: Monday + working: true + _links: + self: + href: "/api/v3/days/week/1" + title: Monday + - _type: WeekDay + day: 2 + name: Tuesday + working: true + _links: + self: + href: "/api/v3/days/week/2" + title: Tuesday + - _type: WeekDay + day: 3 + name: Wednesday + working: true + _links: + self: + href: "/api/v3/days/week/3" + title: Wednesday + - _type: WeekDay + day: 4 + name: Thursday + working: true + _links: + self: + href: "/api/v3/days/week/4" + title: Thursday + - _type: WeekDay + day: 5 + name: Friday + working: true + _links: + self: + href: "/api/v3/days/week/5" + title: Friday + - _type: WeekDay + day: 6 + name: Saturday + working: false + _links: + self: + href: "/api/v3/days/week/6" + title: Saturday + - _type: WeekDay + day: 7 + name: Sunday + working: false + _links: + self: + href: "/api/v3/days/week/7" + title: Sunday + WeekDayCollectionWriteModel: + type: object + required: + - _type + - _embedded + properties: + _type: + type: string + enum: + - Collection + _embedded: + type: object + required: + - elements + properties: + elements: + type: array + description: The array of week days. + minItems: 1 + maxItems: 7 + items: + allOf: + - "$ref": "#/components/schemas/WeekDayWriteModel" + - type: object + required: + - _links + properties: + _links: + allOf: + - "$ref": "#/components/schemas/WeekDaySelfLinkModel" + example: + _type: Collection + _embedded: + elements: + - _type: WeekDay + working: true + _links: + self: + href: "/api/v3/days/week/1" + - _type: WeekDay + working: true + _links: + self: + href: "/api/v3/days/week/2" + - _type: WeekDay + working: true + _links: + self: + href: "/api/v3/days/week/4" + - _type: WeekDay + working: false + _links: + self: + href: "/api/v3/days/week/6" + - _type: WeekDay + working: false + _links: + self: + href: "/api/v3/days/week/7" + WeekDayModel: + type: object + required: + - _type + - day + - name + - working + properties: + _type: + type: string + enum: + - WeekDay + day: + type: integer + description: The week day from 1 to 7. 1 is Monday. 7 is Sunday. + readOnly: true + minimum: 1 + maximum: 7 + name: + type: string + description: The week day name. + working: + type: boolean + description: "`true` for a working week day, `false` otherwise." + _links: + allOf: + - "$ref": "#/components/schemas/WeekDaySelfLinkModel" + example: + _type: WeekDay + day: 5 + name: Friday + working: false + _links: + self: + href: "/api/v3/day/week/5" + title: Friday + WeekDaySelfLinkModel: + type: object + description: Identify a particular week day by its href. + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This week day resource link. + + **Resource**: WeekDay + readOnly: true + example: + self: + href: "/api/v3/days/week/3" + title: Wednesday + WeekDayWriteModel: + type: object + description: Describes a week day as a working day or a non-working day (weekend). + required: + - _type + - working + properties: + _type: + type: string + enum: + - WeekDay + working: + type: boolean + description: "`true` for a working day. `false` for a weekend day." + example: + _type: WeekDay + working: false + Wiki_PageModel: + type: object + required: + - title + properties: + id: + type: integer + description: Identifier of this wiki page + readOnly: true + exclusiveMinimum: 0 + title: + type: string + description: The wiki page's title + _links: + type: object + properties: + addAttachment: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Attach a file to the wiki page + + # Conditions + + **Permission**: edit wiki page + readOnly: true + example: + _type: WikiPage + id: 72 + title: A wiki page with a name + _embedded: + project: + _type: Project... + id: 12 + _links: + self: + href: "/api/v3/wiki_pages/72" + attachments: + href: "/api/v3/wiki_pages/72/attachments" + addAttachment: + href: "/api/v3/wiki_pages/72/attachments" + method: post + project: + href: "/api/v3/projects/12" + title: some project + Work_PackageModel: + type: object + required: + - subject + - _links + properties: + id: + type: integer + description: Work package id + readOnly: true + minimum: 1 + lockVersion: + type: integer + description: The version of the item as used for optimistic locking + readOnly: true + subject: + type: string + description: Work package subject + _type: + type: string + enum: + - WorkPackage + readOnly: true + description: + allOf: + - "$ref": "#/components/schemas/Formattable" + - description: The work package description + scheduleManually: + type: boolean + description: If false (default) schedule automatically. + readonly: + type: boolean + description: + If true, the work package is in a readonly status so with the + exception of the status, no other property can be altered. + startDate: + type: string + format: date + description: Scheduled beginning of a work package + dueDate: + type: string + format: date + description: Scheduled end of a work package + date: + type: string + format: date + description: Date on which a milestone is achieved + derivedStartDate: + type: string + format: date + description: + Similar to start date but is not set by a client but rather + deduced by the work packages' descendants. If manual scheduleManually + is active, the two dates can deviate. + readOnly: true + derivedDueDate: + type: string + format: date + description: + Similar to due date but is not set by a client but rather deduced + by the work packages' descendants. If manual scheduleManually is active, + the two dates can deviate. + readOnly: true + duration: + type: string + format: duration + description: |- + **(NOT IMPLEMENTED)** The amount of time in hours the work package needs to be completed. + Not available for milestone type of work packages. + readOnly: true + estimatedTime: + type: string + format: duration + description: + Time a work package likely needs to be completed excluding + its descendants + derivedEstimatedTime: + type: string + format: duration + description: + Time a work package likely needs to be completed including + its descendants + readOnly: true + ignoreNonWorkingDays: + type: boolean + description: |- + **(NOT IMPLEMENTED)** When scheduling, whether or not to ignore the non working days being defined. + A work package with the flag set to true will be allowed to be scheduled to a non working day. + readOnly: true + spentTime: + type: string + format: duration + description: |- + The time booked for this work package by users working on it + + # Conditions + + **Permission** view time entries + readOnly: true + percentageDone: + type: integer + description: Amount of total completion for a work package + maximum: 100 + createdAt: + type: string + format: date-time + description: Time of creation + readOnly: true + updatedAt: + type: string + format: date-time + description: Time of the most recent change to the work package + readOnly: true + _links: + type: object + required: + - self + - schema + - ancestors + - attachments + - author + - children + - priority + - project + - status + - type + properties: + addAttachment: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Attach a file to the WP + + # Conditions + + **Permission**: edit work package + readOnly: true + addComment: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Post comment to WP + + # Conditions + + **Permission**: add work package notes + readOnly: true + addRelation: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Adds a relation to this work package. + + # Conditions + + **Permission**: manage wp relations + readOnly: true + addWatcher: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Add any user to WP watchers + + # Conditions + + **Permission**: add watcher + readOnly: true + customActions: + type: array + readOnly: true + items: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + A predefined action that can be applied to the work package. + + **Resource**: CustomAction + readOnly: true + previewMarkup: + allOf: + - "$ref": "#/components/schemas/Link" + - description: + Post markup (in markdown) here to receive an HTML-rendered + response + readOnly: true + removeWatcher: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Remove any user from WP watchers + + # Conditions + + **Permission**: delete watcher + readOnly: true + unwatch: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Remove current user from WP watchers + + # Conditions + + logged in; watching + readOnly: true + update: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Form endpoint that aids in preparing and performing edits on a WP + + # Conditions + + **Permission**: edit work package + readOnly: true + updateImmediately: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Directly perform edits on a work package + + # Conditions + + **Permission**: edit work package + readOnly: true + watch: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Add current user to WP watchers + + # Conditions + + logged in; not watching + readOnly: true + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + This work package + + **Resource**: WorkPackage + readOnly: true + schema: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The schema of this work package + + **Resource**: Schema + readOnly: true + ancestors: + type: array + readOnly: true + items: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + A visible ancestor work package of the current work package. + + **Resource**: WorkPackage + + # Conditions + + **Permission** view work packages + readOnly: true + attachments: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The files attached to this work package + + **Resource**: Collection + author: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The person that created the work package + + **Resource**: User + readOnly: true + assignee: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The person that is intended to work on the work package + + **Resource**: User + availableWatchers: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + All users that can be added to the work package as watchers. + + **Resource**: User + + # Conditions + + **Permission** add work package watchers + readOnly: true + budget: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The budget this work package is associated to + + **Resource**: Budget + + # Conditions + + **Permission** view cost objects + category: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The category of the work package + + **Resource**: Category + children: + type: array + readOnly: true + items: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + A visible child work package of the current work package. + + **Resource**: WorkPackage + + # Conditions + + **Permission** view work packages + readOnly: true + addFileLink: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Add a file link to the work package + + # Conditions + + **Permission**: manage file links + fileLinks: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Gets the file link collection of this work package + + # Conditions + + **Permission**: view file links + parent: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Parent work package + + **Resource**: WorkPackage + priority: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The priority of the work package + + **Resource**: Priority + project: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The project to which the work package belongs + + **Resource**: Project + responsible: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The person that is responsible for the overall outcome + + **Resource**: User + relations: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Relations this work package is involved in + + **Resource**: Relation + + # Conditions + + **Permission** view work packages + readOnly: true + revisions: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Revisions that are referencing the work package + + **Resource**: Revision + + # Conditions + + **Permission** view changesets + readOnly: true + status: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The current status of the work package + + **Resource**: Status + timeEntries: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + All time entries logged on the work package. Please note that this is a link to an HTML resource for now and as such, the link is subject to change. + + **Resource**: N/A + + # Conditions + + **Permission** view time entries + readOnly: true + type: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The type of the work package + + **Resource**: Type + version: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The version associated to the work package + + **Resource**: Version + watchers: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + All users that are currently watching this work package + + **Resource**: Collection + + # Conditions + + **Permission** view work package watchers + readOnly: true + example: + _type: WorkPackage + _links: + self: + href: "/api/v3/work_packages/1528" + title: Develop API + schema: + href: "/api/v3/work_packages/schemas/11-2" + update: + href: "/api/v3/work_packages/1528" + method: patch + title: Update Develop API + delete: + href: "/work_packages/bulk?ids=1528" + method: delete + title: Delete Develop API + logTime: + href: "/work_packages/1528/time_entries/new" + type: text/html + title: Log time on Develop API + move: + href: "/work_packages/1528/move/new" + type: text/html + title: Move Develop API + attachments: + href: "/api/v3/work_packages/1528/attachments" + addAttachment: + href: "/api/v3/work_packages/1528/attachments" + method: post + author: + href: "/api/v3/users/1" + title: OpenProject Admin - admin + customActions: + - href: "/api/v3/work_packages/1528/custom_actions/153/execute" + method: post + title: Reset + - href: "/api/v3/work_packages/1528/custom_actions/94/execute" + method: post + title: Forward to accounting + responsible: + href: "/api/v3/users/23" + title: Laron Leuschke - Alaina5788 + relations: + href: "/api/v3/work_packages/1528/relations" + title: Show relations + revisions: + href: "/api/v3/work_packages/1528/revisions" + assignee: + href: "/api/v3/users/11" + title: Emmie Okuneva - Adele5450 + priority: + href: "/api/v3/priorities/2" + title: Normal + project: + href: "/api/v3/projects/1" + title: A Test Project + status: + href: "/api/v3/statuses/1" + title: New + type: + href: "/api/v3/types/1" + title: A Type + version: + href: "/api/v3/versions/1" + title: Version 1 + availableWatchers: + href: "/api/v3/work_packages/1528/available_watchers" + watch: + href: "/api/v3/work_packages/1528/watchers" + method: post + payload: + user: + href: "/api/v3/users/1" + addWatcher: + href: "/api/v3/work_packages/1528/watchers" + method: post + payload: + user: + href: "/api/v3/users/{user_id}" + templated: true + removeWatcher: + href: "/api/v3/work_packages/1528/watchers/{user_id}" + method: delete + templated: true + addRelation: + href: "/api/v3/relations" + method: post + title: Add relation + changeParent: + href: "/api/v3/work_packages/694" + method: patch + title: Change parent of Bug in OpenProject + addComment: + href: "/api/v3/work_packages/1528/activities" + method: post + title: Add comment + parent: + href: "/api/v3/work_packages/1298" + title: nisi eligendi officiis eos delectus quis voluptas dolores + category: + href: "/api/v3/categories/1298" + title: eligend isi + children: + - href: "/api/v3/work_packages/1529" + title: Write API documentation + ancestors: + - href: "/api/v3/work_packages/1290" + title: Root node of hierarchy + - href: "/api/v3/work_packages/1291" + title: Intermediate node of hierarchy + - href: "/api/v3/work_packages/1298" + title: nisi eligendi officiis eos delectus quis voluptas dolores + timeEntries: + href: "/work_packages/1528/time_entries" + type: text/html + title: Time entries + watchers: + href: "/api/v3/work_packages/1528/watchers" + customField3: + href: api/v3/users/14 + id: 1528 + subject: Develop API + description: + format: markdown + raw: Develop super cool OpenProject API. + html: "

Develop super cool OpenProject API.

" + scheduleManually: false + readonly: false + startDate: + dueDate: + derivedStartDate: + derivedDueDate: + estimatedTime: PT2H + derivedEstimatedTime: PT10H + percentageDone: 0 + customField1: Foo + customField2: 42 + createdAt: "2014-08-29T12:40:53Z" + updatedAt: "2014-08-29T12:44:41Z" + Work_Package_SchemasModel: + type: object + example: + _links: + self: + href: "/api/v3/work_packages/schemas" + total: 5 + count: 2 + _type: Collection + _embedded: + elements: + - _type: Schema... + _links: + self: + href: "/api/v3/work_packages/schemas/13-1" + - _type: Schema... + _links: + self: + href: "/api/v3/work_packages/schemas/7-6" + Work_Package_activitiesModel: + type: object + example: + _links: + self: + href: "/api/v3/work_packages/1/revisions" + total: 2 + count: 2 + _type: Collection + _embedded: + elements: + - _type: Activity + _links: + self: + href: "/api/v3/activity/1" + workPackage: + href: "/api/v3/work_packages/1" + user: + href: "/api/v3/users/1" + id: 1 + details: [] + comment: + format: markdown + raw: Lorem ipsum dolor sit amet. + html: "

Lorem ipsum dolor sit amet.

" + createdAt: "2014-05-21T08:51:20Z" + updatedAt: "2014-05-21T09:14:02Z" + version: 1 + - _type: Activity + _links: + self: + href: "/api/v3/activity/2" + workPackage: + href: "/api/v3/work_packages/1" + user: + href: "/api/v3/users/1" + id: 2 + details: [] + comment: + format: markdown + raw: Lorem ipsum dolor sit amet. + html: "

Lorem ipsum dolor sit amet.

" + createdAt: "2014-05-21T09:51:22Z" + updatedAt: "2014-05-21T10:14:02Z" + version: 2 + Work_PackagesModel: + allOf: + - "$ref": "#/components/schemas/CollectionModel" + - type: object + required: + - _links + - _embedded + properties: + _links: + type: object + required: + - self + properties: + self: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The work package collection + + **Resource**: WorkPackageCollection + readOnly: true + _embedded: + type: object + required: + - elements + properties: + elements: + type: array + items: + "$ref": "#/components/schemas/Work_PackageModel" + example: + _links: + self: + href: "/api/v3/work_packages" + total: 2 + count: 2 + _type: Collection + _embedded: + elements: + - _hint: Work package resource shortened for brevity + _type: WorkPackage + _links: + self: + href: "/api/v3/work_packages/1" + id: 1 + - _hint: Work package resource shortened for brevity + _type: WorkPackage + _links: + self: + href: "/api/v3/work_packages/2" + id: 2 + WorkPackagePatchModel: + type: object + required: + - lockVersion + properties: + lockVersion: + type: integer + description: The version of the item as used for optimistic locking + subject: + type: string + description: Work package subject + description: + allOf: + - "$ref": "#/components/schemas/Formattable" + - description: The work package description + scheduleManually: + type: boolean + description: If false (default) schedule automatically. + startDate: + type: string + format: date + description: Scheduled beginning of a work package + dueDate: + type: string + format: date + description: Scheduled end of a work package + date: + type: string + format: date + description: Date on which a milestone is achieved + estimatedTime: + type: string + format: duration + description: + Time a work package likely needs to be completed excluding + its descendants + ignoreNonWorkingDays: + type: boolean + description: |- + **(NOT IMPLEMENTED)** When scheduling, whether or not to ignore the non working days being defined. + A work package with the flag set to true will be allowed to be scheduled to a non working day. + readOnly: true + spentTime: + type: string + format: duration + description: |- + The time booked for this work package by users working on it + + # Conditions + + **Permission** view time entries + readOnly: true + percentageDone: + type: integer + description: Amount of total completion for a work package + maximum: 100 + createdAt: + type: string + format: date-time + description: Time of creation + readOnly: true + updatedAt: + type: string + format: date-time + description: Time of the most recent change to the work package + readOnly: true + _links: + type: object + properties: + assignee: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The person that is intended to work on the work package + + **Resource**: User + budget: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The budget this work package is associated to + + **Resource**: Budget + + # Conditions + + **Permission** view cost objects + category: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The category of the work package + + **Resource**: Category + parent: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + Parent work package + + **Resource**: WorkPackage + priority: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The priority of the work package + + **Resource**: Priority + project: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The project to which the work package belongs + + **Resource**: Project + responsible: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The person that is responsible for the overall outcome + + **Resource**: User + status: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The current status of the work package + + **Resource**: Status + type: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The type of the work package + + **Resource**: Type + version: + allOf: + - "$ref": "#/components/schemas/Link" + - description: |- + The version associated to the work package + + **Resource**: Version + examples: + - subject: Upgrade hangar 25 + lockVersion: 0 + description: + format: markdown + raw: we need more place for new TIE Advanced + html: "

we need more place for new TIE Advanced

" + scheduleManually: false + _links: + responsible: + href: "/api/v3/users/23" + title: Palpatine + assignee: + href: "/api/v3/users/33" + title: Darth Vader + priority: + href: "/api/v3/priorities/2" + title: Normal + project: + href: "/api/v3/projects/1" + title: Galactic Conquest + status: + href: "/api/v3/statuses/1" + title: New + type: + href: "/api/v3/types/11" + title: DeathStarUpgrades + version: + href: "/api/v3/versions/1" + title: Version 1 + parent: + href: "/api/v3/work_packages/1298" + title: ct'hulhu f'tagn + securitySchemes: + BasicAuth: + type: http + scheme: basic +tags: + - description: |- + ## Links + + Links to other resources in the API are represented uniformly by so called link objects. + + ### Local Properties + + | Property | Description | Type | Required | Nullable | Default | + |:---------:| ------------------------------------------------------------------------ | ------- |:--------:|:--------:| ----------- | + | href | URL to the referenced resource (might be relative) | String | ✓ | ✓ | | + | title | Representative label for the resource | String | | | | + | templated | If true the `href` contains parts that need to be replaced by the client | Boolean | | | false | + | method | The HTTP verb to use when requesting the resource | String | | | GET | + | payload | The payload to send in the request to achieve the desired result | String | | | unspecified | + | identifier| An optional unique identifier to the link object | String | | | unspecified | + + All link objects *must* contain the `href` property, though it might be `null`. Thus the following is a valid + link object: `{ "href": null }` whereas `{ }` is not a valid link object. + The meaning of `"href": null` is that **no** resource is referenced. + For example a work package without an assignee will still have an assignee link, but its `href` will be `null`. + + If a `title` is present, the client can display the title to the user when referring to the resource. + + Templated links are links that contain client replaceable parts. Replaceable parts are enclosed in braces. For example + the link `api/v3/example/{id}` is not complete in itself, but the client needs to replace the string `{id}` itself. + As of now the API does not indicate the valid replacement values. + + The `method` indicates which HTTP verb the client *must* use when following the link for the intended purpose. + + If a `payload` is specified, it needs to be sent as the body of the request to achieve the desired result (e.g. perform the + action represented by the link). If no `payload` is specified, there is either no payload to send or a valid payload is not specified + by the link object. A payload might also be templated slightly. If the `templated` property is true, a payload might contain replaceable parts + in its strings (e.g. `{ "href": "/api/v3/examples/{example_id}" }`). + + Note: When writing links (e.g. during a `PATCH` operation) only changes to `href` are accepted. + Changes to all other properties will be **silently ignored**. + + For resources invisible to the client (e.g. because of missing permissions), a link will contain + the uri `urn:openproject-org:api:v3:undisclosed` instead of a url. This indicates the existence of a value + without revealing the actual value. An example for this is the parent project. A project resource which itself might be + visible to the client can have a reference to a parent project invisible to the same client. Revealing the existence of + a parent over hiding has the benefit of allowing the client to make an informed decision of whether to keep the existing reference + or updating it. Sending ‘{ "href": "urn:openproject-org:api:v3:undisclosed" }` for a resource will have the effect of keeping the + original value. This is especially beneficial if the client creates and updates resources based on the payload object provided + as part of a form as is recommended when interacting with the API. + + ## Errors + + In case of an error, the API will respond with an appropriate HTTP status code. + For responses with an HTTP status of `4xx` and `5xx` the body will always contain a single error object. + Error objects shall give the client additional details about the cause of an erroneous response. + + ### General errors + + * Error objects have their `_type` set to `Error` + + * The `errorIdentifier` serves as a unique (and machine readable) identifier for a specific error cause + * There *may* be multiple possible error identifiers per HTTP status code + * There *may* be multiple possible HTTP status codes per error identifier + * The "List of Error Identifiers" defines the possible mappings between HTTP status and error identifier + + * The `message` contains a human readable concise message describing the error + * It *optionally* includes specific information, for example which permission would have been needed to perform an action + * It is localized depending on the users preferences + * It *must not* include HTML or other kind of markup + * Error messages form complete sentences including punctuation + + ##### Example + + ```json + { + "_type": "Error", + "errorIdentifier": "urn:openproject-org:api:v3:errors:InternalServerError", + "message": "An internal server error occurred. This is not your fault." + } + ``` + + ### Embedded error information + + Errors might optionally contain embedded objects that contain further information. + + #### Error details + + Under the embedded key `details` there might be an object describing the error more verbosely. For example if the + error affects a specific field, this field could be defined there. + + ##### Example + + ```json + { + "_type": "Error", + "errorIdentifier": "urn:openproject-org:api:v3:examples:ExampleError", + "message": "This is an example error.", + "_embedded": { + "details": { + "_type": "ExampleErrorDetailInformation", + "erroneousField": "subject" + } + } + } + ``` + + #### Multiple error objects + + To ease implementation of basic clients it is guaranteed that the response body always only contains a single error object. + However it is allowed that an error object *embeds* other error objects under the key `errors`, thereby aggregating them. + + The `errorIdentifier` of such an object is always `urn:openproject-org:api:v3:errors:MultipleErrors`. The message can either describe one of the + embedded errors or simply state that multiple errors occurred. + + ##### Example + + ```json + { + "_type": "Error", + "errorIdentifier": "urn:openproject-org:api:v3:errors:MultipleErrors", + "message": "Multiple fields violated their constraints.", + "_embedded": { + "errors": [ + { + "_type": "Error", + "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation", + "...": "..." + }, + { + "_type": "Error", + "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation", + "...": "..." + } + ] + } + } + ``` + + ### List of Error Identifiers + + * `urn:openproject-org:api:v3:errors:InvalidQuery` (**HTTP 400**) + The query contained a value that did not match the servers expectation + + * `urn:openproject-org:api:v3:errors:InvalidRenderContext` (**HTTP 400**) + The client specified a rendering context that does not exist + + * `urn:openproject-org:api:v3:errors:InvalidRequestBody` (**HTTP 400**) + The format of the request body did not match the servers expectation + + * `urn:openproject-org:api:v3:errors:InvalidSignal` (**HTTP 400**) + The client specified a select not available on the resource, e.g because the property/link does not exist on it. + + * `urn:openproject-org:api:v3:errors:InvalidUserStatusTransition` (**HTTP 400**) + The client used an invalid transition in the attempt to change the status of a user account. + + * `urn:openproject-org:api:v3:errors:Unauthenticated` (**HTTP 401**) + The client has to authenticate to access the requested resource. + + * `urn:openproject-org:api:v3:errors:MissingPermission` (**HTTP 403**) + The client does not have the needed permissions to perform the requested action + + * `urn:openproject-org:api:v3:errors:NotFound` (**HTTP 404**) + Default for HTTP 404 when no further information is available + + * `urn:openproject-org:api:v3:errors:UpdateConflict` (**HTTP 409**) + The resource changed between GET-ing it and performing an update on it + + * `urn:openproject-org:api:v3:errors:TypeNotSupported` (**HTTP 415**) + The request contained data in an unsupported media type (Content-Type) + + * `urn:openproject-org:api:v3:errors:PropertyConstraintViolation` (**HTTP 422**) + The client tried to set a property to an invalid value + + * `urn:openproject-org:api:v3:errors:PropertyIsReadOnly` (**HTTP 422**) + The client tried to set or change a property that is not writable + + * `urn:openproject-org:api:v3:errors:PropertyFormatError` (**HTTP 422**) + A property value was provided in a format that the server does not understand or accept + + * `urn:openproject-org:api:v3:errors:PropertyMissingError` (**HTTP 422**) + The request is syntactically correct, but is missing a property to perform the requested action + + * `urn:openproject-org:api:v3:errors:PropertyValueNotAvailableAnymore` (**HTTP 422**) + An unchanged property needs to be changed, because other changes to the resource make it unavailable + + * `urn:openproject-org:api:v3:errors:ResourceTypeMismatch` (**HTTP 422**) + A link to a resource of a specific type was expected, but the link to another type of resource was provided + + * `urn:openproject-org:api:v3:errors:InternalServerError` (**HTTP 500**) + Default for HTTP 500 when no further information is available + + * `urn:openproject-org:api:v3:errors:MultipleErrors` + Multiple errors occurred. See the embedded `errors` array for more details. + + ## Formattable Text + + OpenProject supports text formatting in Markdown. Properties that contain formattable text have a special representation in this API. In this specification their + type is indicated as `Formattable`. Their representation contains the following properties: + + | Property | Description | Type | Example | Supported operations | + |:--------:| -------------------------------------------------- | ------ | ---------------------------------- | -------------------- | + | format | Indicates the formatting language of the raw text | String | markdown | READ | + | raw | The raw text, as entered by the user | String | `I **am** formatted!` | READ / WRITE | + | html | The text converted to HTML according to the format | String | `I am formatted!` | READ | + + `format` can as of today have one of the following values: + + * `plain` - only basic formatting, e.g. inserting paragraphs and line breaks into HTML + + * `markdown` - formatting using Markdown + + * `custom` - There is no apparent formatting rule that transforms the raw version to HTML (only used for read only properties) + + Note that `raw` is the only property supporting the **write** operation. A property of type *Formattable* that + is marked as **read and write**, will only accept changes to the `raw` property. Changes to `format` and `html` will be **silently ignored**. + It is thus sufficient to solely provide the `raw` property for changes. + + If the *Formattable* is marked as **read only**, the `raw` attribute also becomes **read only**. + + ##### Example + + ```json + { + "format": "markdown", + "raw": "I **am** formatted!", + "html": "I am formatted!" + } + ``` + + ## Dates, Times, Durations and Timestamps + + Representation of time related values in this API is done according to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). + In this specification the following terms will be used as type specifiers (e.g. in tables): + + * `Date` - refers to an ISO 8601 date, e.g. "2014-05-21" + + * `DateTime` - refers to an ISO 8601 combined date and time, e.g. "2014-05-21T13:37:00Z" + + * `Duration` - refers to an ISO 8601 duration, e.g. "P1DT18H" + + * `Timestamp` - refers to an ISO 8601 combined date and time, e.g. "2014-05-21T13:37:00Z" or to an ISO 8601 duration, e.g. "P1DT18H". + The following shorthand values are also being parsed as duration: "1d", "1w", "1m", "1y", "1y-2m", "-2y". + It can also refer the following relative date keywords: `"oneDayAgo@HH:MM+HH:MM", "lastWorkingDay@HH:MM+HH:MM", "oneWeekAgo@HH:MM+HH:MM", "oneMonthAgo@HH:MM+HH:MM"`. + The `"HH:MM"` part represents the zero paded hours and minutes, e.g. `"oneMonthAgo@21:00+00:00"`. The last "+HH:MM" part represents the timezone offset from UTC + associated with the time, e.g. `"oneMonthAgo@21:00+02:00"` means a +2 hour timezone offset from UTC. + The offset can be positive or negative e.g."oneDayAgo@01:00+01:00", "oneDayAgo@01:00-01:00". + Values older than 1 day are accepted only with valid Enterprise Token available. + + ## Colors + + Colors are represented in RGB using hexadecimal notation as specified in [CSS Color Module Level 3](https://www.w3.org/TR/css3-color/). + That is a `#` followed by either three or six hexadecimal digits. + + ##### Example + + ``` + red: #ff0000 or #f00 + green: #00ff00 or #0f0 + black: #000000 or #000 + white: #ffffff or #fff + ``` + + ## Digests + + Digests (or Hashes) are one way functions that map data of arbitrary size to data of a fixed size. + In OpenProject they are for example used to calculate checksums for (attachment) files. + The checksum calculated depends on the hashed data and the algorithm used as hash function. + + Therefore all digests are represented in the following form: + + | Property | Description | Type | Example | + |:---------:| -------------------------------------------------- | ------ | ---------------------------------- | + | algorithm | The algorithm used to compute the digest | String | md5 | + | hash | The calculated digest in hexadecimal notation | String | 64c26a8403cd796ea4cf913cda2ee4a9 | + + ##### Example + + ```json + { + "algorithm": "md5", + "hash": "64c26a8403cd796ea4cf913cda2ee4a9" + } + ``` + name: Basic Objects + - description: |- + Whenever a client calls a resource that can return more than one element, it will receive a collection of elements. + However as collections can become quite large, the API will **not** simply return a JSON array, but a special collection + object that will contain the actual elements in its embedded property `elements`. + + Collections *may* be paginated, this means that a single response from the server will not contain all elements of the collection, + but only a subset. In this case the client can issue further requests to retrieve the remaining elements. + There are two ways to access the result pages of a paginated collection: + + * offset based pagination + + * cursor based pagination + + The available ways of pagination depend on the collection queried. Some collections feature no pagination at all, meaning they + will always return all elements. Others might only offer one of the two pagination methods or both of them. + + A collection also carries meta information like the total count of elements in the collection or - in case of a paginated collection - + the amount of elements returned in this response and action links to retrieve the remaining elements. + + ## Local Properties + + | Property | Description | Type | Availability | + |:--------:| --------------------------------------------------------------- | ------- | --------------------------- | + | total | The total amount of elements available in the collection | Integer | always | + | pageSize | Amount of elements that a response will hold | Integer | when paginated | + | count | Actual amount of elements in this response | Integer | always | + | offset | The page number that is requested from paginated collection | Integer | when offset based available | + | groups | Summarized information about aggregation groups | Object | when grouping | + | totalSums| Aggregations of supported values for elements of the collection | Object | when showing sums | + + ## Links + + | Link | Description | Availability | + |:----------------:| ------------------------------------------------------------------------ | --------------------------- | + | self | Link to the current page in the collection | always | + | changeSize | Templated link to change the page size, might change relative position | when paginated | + | jumpTo | Templated link to jump to a specified offset | when offset based available | + | nextByOffset | Link to retrieve the following page of elements (offset based) | when offset based available | + | previousByOffset | Link to retrieve the preceding page of elements (offset based) | when offset based available | + | nextByCursor | Link to retrieve the elements following the current page (cursor based) | when cursor based available | + | previousByCursor | Link to retrieve the elements preceding the current page (cursor based) | when cursor based available | + name: Collections + - description: |- + Filter objects can be added to a number of endpoints in the OpenProject APIv3. With them, you can create powerful queries to endpoints to return the data that you want. + + They all share the following basic properties: + + - They consist of three items: A property to filter or a specific filter name, one or more values, and a filter operator that defines what query to produce with the given values + + - You can combine any number of distinct filters can be added to the endpoint definitions in this API documentation + + - A combination of filter objects are treated as an AND filter. OR filters are not yet possible in a single query. + + ## Filter syntax + + The filter syntax is a JSON object that can be passed as a GET parameter to the endpoints as an URL-encoded JSON string looks like the following: + + ```json5 + [ + { "": { "operator": "", "values": [, ...] } }, + // ... + ] + ``` + + **Example** + + Filtering the work packages API endpoint for a work package that matches the subject or ID "12" and has a status with the ID=5. + + ```json + [ + { "subjectOrId": { "operator": "**", "values": ["12"] } }, + { "status": { "operator": "=", "values": ["5"] } } + ] + ``` + + With the above JSON stringified and URL-encoded, this can be added to the `/api/v3/work_packages` endpoint using the `filter` parameter to form the URL: + + ``` + https://community.openproject.com/api/v3/work_packages?filters=%5B%7B%22subjectOrId%22:%7B%22operator%22:%22**%22,%22values%22:%5B%2212%22%5D%7D%7D,%7B%22status%22:%7B%22operator%22:%22=%22,%22values%22:%5B%225%22%5D%7D%7D%5D + ``` + + ## Compression + + As the above can become quite long, especially if a lot of filter values are included, the API offers to wrap all query props into a zlib compressed and base64 encoded property (`eprops`). + The property will then not only include the filter but the complete query props set (e.g. `pageSize`, `offset` and `columns`. So `eprops` is then a JSON object that is compressed and encoded. + + **Example** + + Instead of the request + + ``` + https://community.openproject.com/api/v3/work_packages?filters=[%7B%22subjectOrId%22:%7B%22operator%22:%22**%22,%22values%22:[%2212%22]%7D%7D,%7B%22status%22:%7B%22operator%22:%22=%22,%22values%22:[%225%22]%7D%7D]&pageSize=10&sortBy=[[%22id%22,%20%22asc%22]] + ``` + + Which in a non URL encoded style would be + + ``` + https://community.openproject.com/api/v3/work_packages?filters=[{"subjectOrId":{"operator":"**","values":["12"]}},{"status":{"operator":"=","values":["5"]}}]&pageSize=10&sortBy=[["id", "asc"]] + ``` + + All of the props can be put inside a json object + + ```json + { + "filters": "[{\"subjectOrId\":{\"operator\":\"**\",\"values\":[\"12\"]}},{\"status\":{\"operator\":\"=\",\"values\":[\"5\"]}}]", + "sortBy": "[[\"id\",\"asc\"]]", + "pageSize": 10 + } + ``` + + Please note, that all objects that have to be json (e.g `filters`) will be double encoded. + + That json object can then be compressed and encoded and the result sent over as the combined `eprops` parameter: + + ``` + https://community.openproject.com/api/v3/work_packages?eprops=eJxtjTELwjAUhP%2FLjSWDFVwCLt2cHBz7OsT2VSKFlLwXQUv%2Bu0lXHe%2B7%2B7gN%0As1%2BUo8Ci3wiS7k8e9RovE8EWEFaOTkMsidA0BEN4uSWxFNIT2iNhyNlUV50m%0A%2BaOdf6zTLg0wkBC1e9f3gv20L52Mpa%2Ft6h588x%2BGbQ%2F5C12YN%2BM%3D%0A + ``` + + ## Available filters + + The availability of filters depend on the endpoint you're querying and will be listed in each endpoint definition. For work packages, you can also [start using filters in the work packages module](https://community.openproject.com/projects/openproject/work_packages) to build your query and then simply copy the URL from your browser to get the resulting filter values and their operators. + + ## Available operators + + The following table is a list of all available operators. Not all endpoints and parameters support all values, but this list serves as a lookup table for identifying and using the operators. When building a filter object, you use the **symbol** listed below. + + | Symbol | Description of filtered properties | Values array contains | + | ------ | ------------------------------------------------------------ | -------------------------- | + | `=` | are equal to one of the given value(s) | At least one typed value | + | `&=` | are containing all of the given value(s) | At least one typed value | + | `!` | are not equal one of the given value(s) | At least one typed value | + | `>=` | are greater or equal than the given value | One numerical value | + | `<=` | are lesser or equal than the given value | One numerical value | + | `t-` | are the given number of days in the past | 1 integer (days) | + | `t+` | are the given number of days in the future | 1 integer (days) | + | `t+` | are *more than* the given number of days in the future | 1 integer (days) | + | `>t-` | are *less than* the given number of days in the past | 1 integer (days) | + | `d` | are between the two given dates. | 2 ISO8601 date/datetimes | + | `w` | are in this week | *nothing, values is empty* | + | `t` | are today | *nothing, values is empty* | + | `~` | are containing the given words (SQL LIKE) in that order | At least one string value | + | `!~` | are *not* containing the given words (SQL LIKE) in that order | At least one string value | + + ​ + + **Special operators for work packages** + + There are some additional operators only in use for work packages: + + | Symbol | Description of filtered properties | Values array contains | + | ------ | ------------------------------------------ | -------------------------- | + | `o` | the status of the work package is *open* | *nothing, values is empty* | + | `c` | the status of the work package is *closed* | *nothing, values is empty* | + | `ow` | the work packages have a manual sort order | *nothing, values is empty* | + + There are also relation filters for work packages that have the symbols `blocks/blocked` `children/parent` `follows/precedes` `duplicates/duplicated` `partof/includes` `relates` `requires/required` depending on the direction of the relation and take as value the work package ID that is the target node of the relation. + + **Special values for boolean filters** + + If you're using an operator that requires boolean values, please note that they need to be presented in this form: + + - `['f']` for false + - `['t']` for true + name: Filters + - description: |- + Baseline comparisons allow to compare work packages or collections of work packages with respect to different points in time. + + This helps to answer questions like: + + - Which work packages match a certain set of filters today, which work packages match this set of filters at a certain earlier point in time? + - Which properties of these work packages have changed with respect to these points in time? + + This tool can be used to analyze how a project plan has changed with respect to a certain baseline date. + + ## Requesting Work Packages for Different Timestamps + + The work-packages API supports a `timestamps` parameter to gather information about a single work package or a collection of work packages for several points in time. + + ``` + GET /api/v3/work_packages?timestamps=2022-01-01T00:00:00Z,PT0S + ``` + + ``` + GET /api/v3/work_packages/123?timestamps=2022-01-01T00:00:00Z,PT0S + ``` + + Each timestamp should be given as an [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) string, either an absolute date and time with timezone, e.g. `"2022-01-01T00:00:00Z"`, or a relative timestamp utilizing the [ISO-8601-Duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) format, e.g. `"P-1Y"`, which is composed of an initial `"P"` for "Period", and a duration. `"P-1Y"` is interpreted as the relative timestamp "1 year ago". + Furthermore, a set of predefined relative date keywords can also be passed for the timestamps: `"oneDayAgo@HH:MM+HH:MM", "lastWorkingDay@HH:MM+HH:MM", "oneWeekAgo@HH:MM+HH:MM", "oneMonthAgo@HH:MM+HH:MM"`. The `"HH:MM"` part represents the zero paded hours and minutes, e.g. `"oneMonthAgo@21:00+00:00"`. The last "+HH:MM" part represents the timezone offset from UTC associated with the time, + e.g. `"oneMonthAgo@21:00+02:00"` means a +2 hour timezone offset from UTC. The offset can be positive or negative e.g."oneDayAgo@01:00+01:00", "oneDayAgo@01:00-01:00". + + Several timestamps should be passed as comma-separated list of these ISO-8601 strings to the `timestamps` parameter, e.g. `"2022-01-01T00:00:00Z,PT0S"`. + + The timestamps should be given in ascending temporal order, such that the first timestamp is the **baseline** timestamp, and the last timestamp is the **current** timestamp. + + Values older than 1 day are accepted only with valid Enterprise Token available. + + ## Response Overview + + When providing a `timestamps` parameter, the response has several additional properties: + + | Property | Description | Type | Further information | + | ----------------------- | -------------------------------------------------------------------------------------- | ---------------- | --------------------------------------------------- | + | `timestamp` | The requested timestamp corresponding to the surrounding embedded object | String | Section *[Timestamps](#timestamps)* below | + | `attributesByTimestamp` | Attributes and meta information of the work packages at the respective timestamps | Array of Objects | Section *[Attributes](#attributes)* below | + | `matchesFilters` | Marks whether the work package matches the filter criteria at the respective timestamp | Bool | Section *[Filter Matching](#filter-matching)* below | + | `exists` | Marks whether the work package exists at the respective timestamp | Bool | Section *[Existence](#existence)* below | + + Each work-package element has the `attributesByTimestamp` as `_embedded` section. + + The properties `timestamp`, `matchesFilters`, and `exists` are wrapped in a `_meta` section, which is added to each work-package element as well as to each element of the `attributesByTimestamp` array. + + ```json5 + // /api/v3/work_packages?timestamps=2022-01-01T00:00:00Z,PT0S + { + "_type": "WorkPackageCollection", + "total": 1, + "_embedded": { + "elements": [ + { + "_type": "WorkPackage", + "id": 1528, + "subject": "Current subject of the work package", + // other attributes ..., + "_links": { + "self": { + "href": "/api/v3/work_packages/1528?timestamps=2022-01-01T00:00:00Z,2023-03-01T01:37:10Z" + } + }, + "_meta": { + "matchesFilters": true, + "exists": true, + "timestamp": "PT0S" + }, + "_embedded": { + "attributesByTimestamp": [ + { + "subject": "Original subject of the work package", + "_meta": { + "matchesFilters": true, + "exists": true, + "timestamp": "2022-01-01T00:00:00Z" + }, + "_links": { + "self": { + "href": "/api/v3/work_packages/1528?timestamps=2022-01-01T00:00:00Z" + } + }, + }, + { + "_meta": { + "matchesFilters": true, + "exists": true, + "timestamp": "PT0S" + }, + "_links": { + "self": { + "href": "/api/v3/work_packages/1528?timestamps=2023-03-01T01:37:10Z" + } + } + } + ], + } + } + ] + }, + "_links": { + "self": { + "href": "/api/v3/work_packages?timestamps=2022-01-01T00:00:00Z,2023-03-01T01:37:10Z" + } + } + } + ``` + + ## Meta Information + + Each `_meta` section describes the surrounding object of the meta section, which may be the main work-package object, or an attributes object within the `attributesByTimestamp` array. + + Note that the `_meta` information of the most current (rightmost) timestamp is redundant: It is given as `_meta` section of the main work-package object as well as `_meta` section of the last object within the `attributesByTimestamp` array. + + ## Timestamps + + Each `_meta` section contains a `timestamp` property, which is to the requested `timestamp` corresponding to the object the `_meta` section describes. + + The `timestamp` has the same ISO-8601 format as in the `timestamps` request parameter and preserves the absolute or relative character of the requested timestamp. + + Furthermore, each self link corresponding to an earlier point in time has also a `timestamps` request parameter added to it, which is converted to an absolute ISO-8601 string at the execution time of the query. (in the above example, `PT0S` was converted to `2023-03-01T01:37:10Z` as the query was executed at that time.) + + ## Attributes + + To read out the attributes of the work packages at the current timestamp (the last of the given `timestamps`), check the attributes of the work-package objects. To read out the attributes of the work packages at the other given timestamps, check the attributes within `"_embedded"` section `"attributesAtTimestamp"`. + + To save bandwidth, only attributes that differ from the ones in the main work-package object are included in the `"attributesByTimestamp"`. Attributes with the same value as in the main work-package object are not included in the `"attributesByTimestamp"` section. + + ```json5 + // /api/v3/work_packages?timestamps=2022-01-01T00:00:00Z,PT0S + { + "_type": "WorkPackageCollection", + "_embedded": { + "elements": [ + { + "_type": "WorkPackage", + "subject": "Current subject of the work package", + "_meta": { + "timestamp": "PT0S" + }, + "_embedded": { + "attributesByTimestamp": [ + { + "subject": "Original subject of the work package", + "_meta": { + "timestamp": "2022-01-01T00:00:00Z" + } + }, + { + "_meta": { + "timestamp": "PT0S" + } + } + ], + } + } + ] + } + } + ``` + + In the above example, the last of the given `timestamps` is `"PT0S"` (which means 0 seconds ago, i.e. now). The work-package attributes at this time are included in the main work-package object. The `"subject"` of the work package at the timestamp `"PT0S"` (now) is `"Current subject of the work package"`. + + The `"_embedded"` section `"attributesByTimestamp"` has an array entry for the timestamp `"PT0S"`, which is the last array entry. Because the value of the `"subject"` is the same as up in the main work-package object, the `"subject"` attribute is left out in the `"attributesByTimestamp"` for the timestamp `"PT0S"`. The `"subject"` of the work package at the timestamp `"PT0S"` (now) is `"Current subject of the work package"`. + + The `"_embedded"` section `"attributesByTimestamp"` has an array entry for the baseline timestamp `"2022-01-01T00:00:00Z"`, which is the first array entry. The `"subject"` of the work package at the timestamp `"2022-01-01T00:00:00Z"` is `"Original subject of the work package"`. It is included in the `"attributesByTimestamp"` for the timestamp `"2022-01-01T00:00:00Z"` because it differs from the `"subject"` in the main work-package object, which is `"Current subject of the work package"`. + + ## Filter Matching + + The work-packages API supports filtering the query results by one or several search criteria. See: [Filters](../filters) + + To find out whether a work package matches the given set of filter criteria at a certain timestamp, check the `"matchesFilters"` property in the `"_meta"` section for that timestamp: + + ```json5 + // /api/v3/work_packages?filters=...×tamps=2022-01-01T00:00:00Z,PT0S + { + "_type": "WorkPackageCollection", + "_embedded": { + "elements": [ + { + "_type": "WorkPackage", + "_meta": { + "matchesFilters": true, + "timestamp": "PT0S" + }, + "_embedded": { + "attributesByTimestamp": [ + { + "_meta": { + "matchesFilters": false, + "timestamp": "2022-01-01T00:00:00Z" + } + }, + { + "_meta": { + "matchesFilters": true, + "timestamp": "PT0S" + } + } + ], + } + } + ] + } + } + ``` + + In the above example, the work package matches the filter criteria at the timestamp `"PT0S"`, but does not match the filter criteria at the timestamp `"2022-01-01T00:00:00Z"`. + + In another example, it might be the other way around: The work package could match the filter criteria (`"matchesFilters": true`) at the baseline timestamp, but not match the filter criteria anymore (`"matchesFilters": false`) at the current timestamp. + + The work package is included in the returned collection if it matches the filter criteria at least at one of the requested timestamps. + + ## Existence + + To find out whether a work package has existed at a requested timestamp, check the `"exists"` property in the `"_meta"` section for that timestamp: + + ```json5 + // /api/v3/work_packages?timestamps=2022-01-01T00:00:00Z,PT0S + { + "_type": "WorkPackageCollection", + "_embedded": { + "elements": [ + { + "_type": "WorkPackage", + "_meta": { + "exists": true, + "timestamp": "PT0S" + }, + "_embedded": { + "attributesByTimestamp": [ + { + "_meta": { + "exists": false, + "timestamp": "2022-01-01T00:00:00Z" + } + }, + { + "_meta": { + "exists": true, + "timestamp": "PT0S" + } + } + ], + } + } + ] + } + } + ``` + + In the above example, the work package exists at the timestamp `"PT0S"`, but has not existed at the timestamp `"2022-01-01T00:00:00Z"`. + + In another example, it might be the other way around: The work package could exist (`"exists": true`) at the baseline time, but could have been deleted after that time such that it does not exist (`"exists": false`) at the current time. Please note, however, that OpenProject does not support [soft deletion](https://community.openproject.org/projects/openproject/work_packages/40015), yet. Currently, when a work package is deleted, its history is deleted as well, so that its history cannot be retrieved through the baseline API anymore. + + The work package is included in the returned collection if it has existed at least at one of the requested timestamps. + + ## Usage Example + + In this example ruby script, the work packages are retrieved at a baseline date and in their current state. Then the subject of the first work package is compared with respect to the baseline date and the current state. + + ```ruby + # Define timestamps + baseline_timestamp = "2022-01-01T00:00:00Z" + current_timestamp = "PT0S" + timestamps = [baseline_timestamp, current_timestamp] + + # Retrieve work packages + url = "https://community.openproject.org/api/v3/work_packages?timestamps=#{timestamps.join(',')}" + response = JSON.parse(RestClient.get(url), object_class: OpenStruct) + work_packages = response.dig("_embedded", "elements") + + # Extract differing baseline attributes + work_package = work_packages.first + baseline_attributes = work_package.dig("_embedded", "attributesByTimestamp").first + + # Compare baseline state to current state of the work package + if baseline_attributes.subject.present? and baseline_attributes.subject != work_package.subject + puts "The subject of the work package has changed." + puts "Subject at the baseline time: #{baseline_attributes.subject}" + puts "Current subject: #{work_package.subject}" + end + + # Check existence + puts "The work package did exist at the baseline time." if baseline_attributes.dig("_meta", "exists") + puts "The work package exists at the current time." if work_package.dig("_meta", "exists") + + # Check filter matching + puts "The work package matches the query filters at the baseline time." if baseline_attributes.dig("_meta", "matchesFilters") + puts "The work package matches the query filters at the current time." if work_package.dig("_meta", "matchesFilters") + ``` + name: Baseline Comparisons + - description: |- + This API provides forms as a concept to aid in editing or creating resources. The goal of forms is to: + + * make writable properties of a resource discoverable + + * show to which values a property can be set + + * validate changes to a resource and indicate validation errors + + These benefits aside, a client can freely choose to immediately edit a resource without prior validation by a form. + In the case of an invalid request the edit will fail and return appropriate errors nevertheless. + + A form is associated to a single resource and aids in performing changes on that resource. + When posting to a form endpoint with an empty request body or an empty JSON object, + you will receive an initial form for the associated resource. + Subsequent calls to the form should contain a single JSON object as described by the form. + + ## Actions + + | Link | Description | Condition | + |:-------------------:| --------------------------------------------------------------------- | -------------------------------- | + | validate | Validate changes, show errors and allowed values for changed resource | | + | commit | Actually perform changes to the resource | form content is valid | + | previewMarkup | Post markup (e.g. markdown) here to receive an HTML-rendered response | | + + ## Linked Properties + + | Link | Description | Type | Nullable | Supported operations | + |:-------------------:| ------------------------------------------------ | ------------- | -------- | -------------------- | + | self | This form | Form | | READ | + + ## Embedded Properties: + + Apart from the linked properties, forms contain always three other embedded properties: + + * `payload` + + * `schema` + + * `validationErrors` + + Their purpose is explained below. + + ### Payload + + The payload contains an edited version of the resource that will be modified when committing the form. + This representation contains all writable properties of the resource and reflects all changes that the latest call to **validate** included, + thereby acting as a preview for the changes. + + In case the client tries to set the value to something invalid, the invalid change is also reflected here. However a validation error (see below) + indicates that a commit of this payload would fail. + + It might happen that setting one property affects the allowed values for another property. Thus by changing a property A + the current value of another property B might become invalid. If the client did not yet touch the value of B, the payload will + contain a default value for that property. Nevertheless the client will also receive an appropriate validation error for value B. + + The content of this element *can* be used as a template for the request body of a call to **validate** or **commit**. + + A call to **validate** and **commit** does not need to include all properties that were defined in the `payload` section. + It is only necessary to include the properties that you want to change, as well as the `lockVersion` if one is present. + However you *may* include all the properties sent in the `payload` section. + + ### Schema + + The schema embedded in a form is a normal [schema describing the underlying resource](https://www.openproject.org/docs/api/endpoints/schemas/). + However, the embedded schema can change with each revalidation of the form. + For example it might be possible, that changing the type of a work package affects its available properties, + as well as possible values for certain properties. + As this makes the embedded schema very dynamic, it is not included as a static link. + + ### Validation Errors + + Like a schema the validation errors build a dictionary where the key is a property name. + Each value is an error object that indicates the error that occurred validating the corresponding property. + There are only key value pairs for properties that failed validation, the element is empty if all validations succeeded. + + However note that even in the case of validation errors, the response you receive from the form endpoint will be an HTTP 200. + That is because the main purpose of a form is helping the client to sort out validation errors. + + ### Meta object + + Form resources may have an additional `_meta` object that contains parameters to be sent together with the resource, + but that do not belong to the resource itself. For example, parameters on if and how to send notifications for the action + performed with the API request can be sent. + + Each individual endpoint will describe their meta properties, if available. + name: Forms + - description: |- + Some endpoints, especially those returning `Collection` resources, support signaling desired properties. By signaling, the client + can convey to the server the properties to include in a response. + + Currently only `select` is supported which allows to specify the subset of properties a client is interested in. The benefit of using `select` + is reduced response time. Other signaling, especially expanding the embedded resources to include as well over multiple layers of embedding + are in consideration to be implemented (probably named `embed`) but as of now, they are not supported. Please also see + [the specification for OData that inspired this feature](https://www.odata.org/documentation/odata-version-2-0/uri-conventions/). + + For example, a resource `/api/v3/bogus` that without signaling returns: + + ```json + { + "_type": "Collection" + "count": 20, + "total": 554, + "_embedded": { + "elements": [ + { + "id": 1, + "name": "Some name" + }, + { + "id": 9, + "name": "Another name" + } + ] + }, + "_links": { + "self": { + "href": "/api/v3/bogus", + "title": "A bogus collection" + }, + "bar": { + "href": "/api/v3/bar", + "title": "Foobar" + } + } + } + ``` + + can via signaling `/api/v3/bogus?select=total,elements/name,bar` be instructed to return: + + ```json + { + "total": 554, + "_embedded": { + "elements": [ + { + "name": "Some name" + }, + { + "name": "Another name" + } + ] + }, + "_links": { + "bar": { + "href": "/api/v3/bar", + "title": "Foobar" + } + } + } + ``` + + The `select` query property is a comma separated list of the properties to include, e.g. `select=total,elements/name,bar`. + The API also accepts alternative styles of writing like `select=["total","elements/name","bar"]`. Each individual item in the list + is the path inside the resource. So while `total` refers to the property on the top level, `elements/name` refers to the property `name` within + the collection of `elements`. The full path has to be provided for every property, e.g. `select=elements/name,elements/id`. + The order of the list has no impact on the selection. There is also a wildcard `*` which will result in every property on that level to be selected. + To select every property in the example above, the client would have to signal `select=*,elements/*`. + + Please note that the nesting into `_embedded` and `_links` is not included in the query prop `select` as + links in the context of HAL can be considered properties of the resource just the same as unnested properties and forcing + clients to write the full nesting would not increase clarity. + + Link properties are considered to be a single value that cannot be split up further. Every property within a link will be returned + if the link is signaled to be selected. + + The `select` signaling flag has been introduced for performance reasons. Not every end point supports it and those that do oftentimes only + allow a subset of their resource's properties to be selected. End points supporting the `select` query prop are documented accordingly. + name: Signaling + - description: |- + An action is a change one can trigger within the OpenProject instance. + This could be creating a work package, exporting work packages or updating a user. + An action can also be something where the user is able to be involved so where the user is in the passive role + e.g. when being assigned a work package. + + A capability combines an action with a context and a principal. It thus communicates, which principal can carry out + (or be passively involved) which action within a certain context. E.g. a user might have the capability of creating work packages + within a project. + + In other words, an action is independent of a principal and context while a capability is + a relation between an action, the context and the principal. + + The actions are most of the time derived from permissions which can be configured via the administrative UI where an administrator + selects from a set of permissions to be granted per role. But there are other cases, e.g. in order to become assignee or responsible of a work package, a user has + to have a role which allows having work packages assigned which is not a permission. + + Even though user might have a capability, it might still not be possible to carry out the action + because some other requirement is not met. + E.g. a user might have the capability to update work packages, but if a particular work package is + in a readonly state, that work package cannot be updated. + + *Only a small set of actions that actually already exist in the system are currently exposed via + the api. They will be added over time.* + + ## Action + + An action describes what can be carried out within the application. Until an action becomes assigned, + which turns it into a capability, it remains in the state of "could be". + + ### Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + |:-------------------:|----------------------------------------- | ------------- | -------------------------------------------------------------- | -------------------- | + | self | The action | Action | not null | READ | + + ### Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- | + | id | Identifier for the action | String | Not null | READ | + | name | A human readable name for the action *Not yet implemented* | String | Not null | READ | + | description | Describes what can be done by principals having that action *Not yet implemented* | String | Not null | READ | + | modules | Clusters the actions into groups into which they belong logically *Not yet implemented* | []String | Not null | READ | + + ## Capabilities + + Actions can be assigned to a principal by assigning roles to that principal. E.g. a user might receive the 'work_packages/show' + action by having a role called reader assigned within a project. + + Whenever a principal is assigned an action within a context, the principal has additional capabilities. + + Exactly which actions can be gained by having a role assigned depends on the configuration of that role. + The configuration is adaptable by admins within the administration of the OpenProject instance. + + ### Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + |-------------------- |----------------------------------------- | ------------- | --------------- | -------------------- | + | self | The capability | | | | + | action | The action the principal is granted | Action | not null | READ | + | context | The context the principal has this the action in. This is typically a project or the global context. | Project or null | | READ | + | principal | The principal being allowed the action. | Action | not null | READ | + + ### Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- | + | id | Identifier for the action | String | Not null | READ | + | name | A human readable name for the action | String | Not null | READ | + name: Actions & Capabilities + - description: |- + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :---------: | ------------- | ---- | ----------- | -------------------- | + | id | Activity id | Integer | x > 0 | READ | + | version | Activity version | Integer | x > 0 | READ | + | comment | | Formattable | | READ / WRITE | + | details | | Array of Formattable | | READ | + | createdAt | Time of creation | DateTime | | READ | + | updatedAt | Time of update | DateTime | | READ | + + Activity can be either _type `Activity` or _type `Activity::Comment`. + name: Activities + - description: |- + Attachments are files that were uploaded to OpenProject. Each attachment belongs to a single + container (e.g. a work package or a board message). + + ## Actions + + | Link | Description | Condition | + |:-------------------:|----------------------------------------------------------------------| -------------------------------------------- | + | delete | Deletes this attachment | **Permission**: edit on attachment container or being the author for attachments without container | + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + |:----------------:| --------------------------------------------------- | ------------- | ----------- | -------------------- | + | self | This attachment | Attachment | not null | READ | + | container | The object (e.g. WorkPackage) housing the attachment| Anything | not null | READ | + | author | The user who uploaded the attachment | User | not null | READ | + | downloadLocation | Direct download link to the attachment | - | not null | READ | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + |:------------:| ----------------------------------------------- | ----------- | ----------- | -------------------- | + | id | Attachment's id | Integer | x > 0 | READ | + | title | The name of the file | String | not null | READ | + | fileName | The name of the uploaded file | String | not null | READ | + | fileSize | The size of the uploaded file in Bytes | Integer | x >= 0 | READ | + | description | A user provided description of the file | Formattable | not null | READ | + | contentType | The files MIME-Type as determined by the server | String | not null | READ | + | digest | A checksum for the files content | Digest | not null | READ | + | createdAt | Time of creation | DateTime | not null | READ | + name: Attachments + - description: |- + *Note: Budgets are currently only implemented as a stub. Further properties of budgets might be added at a future date, however they will require the view budget permission to be displayed.* + + ## Linked Properties: + + | Link | Description | Type | Constraints | Supported operations | + |:---------:|-------------------------------------------- | ------------- | --------------------- | -------------------- | + | self | This budget | Budget | not null | READ | + + ## Properties + + | Property | Description | Type | Constraints | Supported operations | Condition | + | :---------: | ------------------------------------------- | ----------- | ----------- | -------------------- | --------------------------- | + | id | Budget id | Integer | x > 0 | READ | | + | subject | Budget name | String | not empty | READ | | + name: Budgets + - description: |- + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + |:---------------:| --------------------------------------------------- | ------------- | ----------- | -------------------- | + | self | This category | Category | not null | READ | + | project | The project of this category | Project | not null | READ | + | defaultAssignee | Default assignee for work packages of this category | User | | READ | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :--------: | ------------- | ------- | ----------- | -------------------- | + | id | Category id | Integer | x > 0 | READ | + | name | Category name | String | | READ | + name: Categories + - description: |- + The configuration endpoint allows to read certain configuration parameters of the OpenProject instance. + Note that there is no 1:1 relationship between this endpoint and the settings an administrator has at hand to modify the behaviour + of the application via configuration.yml or ENV variables. + + For now this endpoint will only allow access to settings deemed useful for a client to know in general. + + As clients might rely on the combination of both, the system settings as well as the current user's preferences, the resource + embeds the current user's preferences so client can fetch both with one request. + + | Link | Description | Type | Nullable | Supported operations | + |:-------------------:| ------------------------------------------------ | ------------- | -------- | -------------------- | + | self | The configuration | Configuration | | READ | + | userPreferences | The preferences of the current user | UserPreferences | | READ | + + ## Local Properties + + | Property | Description | Type | Condition | Supported operations | + | :-----------------------: | -------------------------------------------------- | ---------- | ----------------- | -------------------- | + | maximumAttachmentFileSize | The maximum allowed size of an attachment in Bytes | Integer | | READ | + | perPageOptions | Page size steps to be offered in paginated list UI | Integer[] | | READ | + | hostName | The host name configured for the system | String | | READ | + | activeFeatureFlags | The list of all feature flags that are active | String[] | | READ | + name: Configuration + - description: |- + Custom actions are a preconfigured set of changes that are applied to a work package. + + Currently, this resource is a stub. The conditions and changes defined for the custom action are not yet present in the resource. + + ## Actions + + | Link | Description | Condition | + |:-------------------:|----------------------------------------------------------------------| --------------------------------------- | + | executeImmediately | Apply the action to a work package | + + ## Linked Properties + + | Property | Description | Type | Constraints | Supported operations | + | :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- | + | self | This custom action | CustomAction | not null | READ | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :--------------: | ------------------------------------------------------ | ----------- | ------------ | -------------------- | + | id | Custom action id | Integer | x > 0 | READ | + | name | The user selected name of the custom action | String | | READ | + | description | A text describing the custom action | String | | READ | + name: Custom actions + - description: |- + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + |:-------------:|-------------------------- | ------------- | ----------- | -------------------- | + | self | This custom option | CustomOption | not null | READ | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + |:----------------:| ---------------------------------------------- | -------- | ----------- | -------------------- | + | id | The identifier | Integer | | READ | + | value | The value defined for this custom option | String | | READ | + + custom options are options of list custom fields. + name: Custom Options + - description: |- + A document is a file containing a list of attachments. + + *Please note, that the endpoint is only a stub for now.* + + ## Actions + + None yet + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | Condition | + | :-----------: | ------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- | + | self | This document | Document | not null | READ | | + | project | The project the document is in | Project | not null | READ / WRITE | | + | attachments | The attachments belonging to the document | []Attachment | not null | READ / WRITE | | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | Condition | + | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- | + | id | Document's id | Integer | x > 0 | READ | | + | title | The title chosen for the collection of documents | String | max 60 characters | READ | | + | description | A text describing the documents | String | | READ | | + | createdAt | The time the document was created at | DateTime | | READ |   | + name: Documents + - description: TBD + name: File links + - description: |- + A grid is a layout for a page or a part of the page of the OpenProject application. It defines the structure (number of rows and number of columns) as well as the contents of the page. + + The contents is defined by `GridWidget`s. While a `GridWidget` is it's own type, it is not a resource in it's own right as it is an intrinsic part of a `Grid`. + + Depending on what page a grid is defined for, different widgets may be eligible to be placed on the grid. The page might also define the permissions needed for accessing, creating or modifying the grid. + + Currently, the following pages employ grids: + + + /my/page: The my page every user has. Only a user can access or modify their "my page". + + *The delete action is not yet supported* + + ## Actions + + | Link | Description | Condition | + |:-------------------:| -------------------------------------------------------------------- | ---------------------------------------------------------------- | + | updateImmediately | Directly perform edits on this grid | **Permission**: depends on the page the grid is defined for | + | update | Validate edits on the grid via a form resource before committing | **Permission**: depends on the page the grid is defined for | + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | Condition | + | :-----------: | -------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- | + | self | This grid | Grid | not null | READ | | + | page | The url of the page the grid is defined for | url | not null | READ / WRITE | The page cannot be changed after the creation | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | Condition | + | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | -------------- | + | id | Grid's id | Integer | x > 0 | READ | | + | rowCount | The number of rows the grid has | Integer | x > 0 | READ/WRITE | | + | columnCount | The number of columns the grid has | Integer | x > 0 | READ/WRITE | | + | widgets | The set of `GridWidget`s selected for the grid | []GridWidget | | READ/WRITE | The widgets cannot overlap | + | createdAt | The time the grid was created | DateTime | | READ |   | + | updatedAt | The time the grid was last updated | DateTime | | READ |   | + + ## GridWidget Properties + + | Property | Description | Type | Constraints | Supported operations | Condition | + | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | -------------- | + | identifier | The kind of widget | String | not null | READ/WRITE | | + | startRow | The row the widget starts at (1 based) | Integer | x > 0, x < rowCount of the grid, x < endRow | READ/WRITE | | + | endRow | The row the widget ends. The widget's area does not include the row itself. | Integer | x > 0, x <= rowCount of the grid, x > startRow | READ/WRITE | | + | startColumn | The column the widget starts at (1 based) | Integer | x > 0, x < columnCount of the grid, x < endColumn | READ/WRITE | | + | endColumn | The column the widget ends. The widget's area does not include the column itself. | Integer | x > 0, x <= columnCount of the grid, x > startColumn | READ/WRITE | | + | options | An options hash of values customizable by the widget | JSON | | READ/WRITE | | + name: Grids + - description: |- + Groups are collections of users. They support assigning/unassigning multiple users to/from a project in one operation. + + This resource does not yet have the form and schema endpoints. But as all properties are static, clients should still be able + to work with this resource. + + ## Actions + + ## Actions + + | Link | Description | Condition | + |:-------------------:| -------------------------------------------------------------------- | ---------------------------------------------------------------- | + | delete | Deletes the group. | **Permission**: Administrator | + | updateImmediately | Updates the group's attributes. | **Permission**: Administrator | + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | Condition | + |:-----------: |-------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- | + | self | This group | Group | not null | READ | | + | memberships | Link to collection of all the group's memberships. The list will only include the memberships in projects in which the requesting user has the necessary permissions. | MemberCollection | | READ | **Permission**: view members or manage members in any project | + | members | The list all all the users that are members of the group | UserCollection | | READ/WRITE | **Permission**: manage members in any project to read & admin to write | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | Condition | + | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- | + | id | Group's id | Integer | x > 0 | READ | | + | name | Group's full name, formatting depends on instance settings | String | | READ/WRITE | Admin to write | + | createdAt | Time of creation | DateTime | | READ | Only visible by admins | + | updatedAt | Time of the most recent change to the user | DateTime | | READ | Only visible by admins | + name: Groups + - description: |- + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + |:-------------:|-------------------------- | ------------- | ----------- | -------------------- | + | self | This help text | HelpText | not null | READ | + | editText | Edit the help text entry | text/htm | Admin | READ | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :---------: | --------------------------- | -------------------- | ----------- | -------------------- | + | id | Help text id | Integer | x > 0 | READ | + | attribute | Attribute name | String | | READ | + | attributeCaption | Attribute caption | String | | READ | + | helpText | Help text content | Formattable | | READ | + name: Help texts + - description: |- + Users and groups can become members of a project. Such a membership will also have one or more roles assigned to it. By that, memberships control the permissions a user has within a project. + + There are also memberships that do not govern the permissions within a certain project but rather govern global permissions. Among the permissions that can be granted like this are the permissions to "Create project" and "Manage users". Those memberships do not have a project associated. + + When creating and updating memberships, a custom message can be sent to users of new and updated memberships. This message can be provided within the `_meta` group. + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + |:-------------------:|----------------------------------------- | ------------- | -------------------------------------------------------------- | -------------------- | + | self | This membership | Membership | not null | READ | + | project | The project for which the membership is granted | Project | | READ | + | roles | The list of roles the user or group is granted in the project | RoleCollection | not null | READ | + | principal | The user or group that was granted membership | User or Group | not null | READ | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- | + | id | Membership id | Integer | x > 0 | READ | + | createdAt | Time of creation | DateTime | not null | READ | + | updatedAt | Time of latest update | DateTime | not null | READ | + + ## Meta parameters + + | Meta property | Description | Type | Constraints | Supported operations |Condition | + | :------------------------: | --------------------------------------------------- | ---- | ----------- | -------------------- |----------| + | notificationMessage | The message included in the email(s) send to the users of new or updated memberships | Formattable | | READ/WRITE | | + name: Memberships + - description: |- + News are articles written by users in order to inform other users of important information. + + ## Actions + + None yet + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | Condition | + | :-----------: | -------------------------------------| ------------- | --------------------- | -------------------- | ----------------------------------------- | + | self | This news | News | not null | READ | | + | project | The project the news is situated in | Project | not null | READ / WRITE | | + | author | The user having created the news | User | not null | READ | | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | Condition | + | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- | + | id | News' id | Integer | x > 0 | READ | | + | title | The headline of the news | String | max 60 characters | READ | | + | summary | A short summary | String | max 255 characters | READ |   | + | description | The main body of the news with all the details | String | | READ | | + | createdAt | The time the news was created at | DateTime | | READ |   | + name: News + - description: |- + Notifications are created through notifiable actions in OpenProject. + Notifications are triggered by actions carried out in the system by users, e.g. editing a work package, but can also be send out because + of time passing e.g. when a user is notified of a work package that is overdue. + + This endpoint only returns in-app notifications. + + ## Actions + + | Link | Description | Condition | + |:-------------------:| -------------------------------------------------------------------- | --------------------------- | + | read_ian | Marks the notification as read | notification is unread | + | unread_ian | Marks the notification as unread | notification is read | + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | Condition | + | :-----------: | ---------------------------------------- | -------------- | --------------------- | -------------------- | ----------------------------------------- | + | self | This notification | Notification | not null | READ | | + | project | The project containing the resource | Project | not null | READ | | + | actor | The user that caused the notification | User | | READ | optional | + | resource | The resource the notification belongs to | Polymorphic | not null | READ | | + | activity | The journal the notification belongs to | Polymorphic | | READ | optional | + | details | A list of objects including detailed information | Polymorphic | | READ | optional | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | Condition | + | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- | + | id | Primary key | Integer | | READ | | + | subject | The subject of the notification | String | | READ | | + | reason | The reason causing the notification | String | | READ | | + | readIAN | Whether the notification is read | Boolean | | READ | | + name: Notifications + - description: TBD + name: OAuth 2 + - description: |- + Represents a post in a board. Posts are also referred to as messages in the application. + + *This resource is currently a stub* + + ## Actions + + | Link | Description | Condition | + |:-------------------:|--------------------------------| --------------------------------------- | + | addAttachment | Attach a file to the post | **Permission**: edit messages | + + ## Linked Properties + + | Property | Description | Type | Constraints | Supported operations | + | :--------------: | ------------------------------------------------------ | ----------- | -------------- | -------------------- | + | self | This post | Post | not null | READ | + | attachments | The files attached to this post | Collection | | READ | + | project | The project the post belongs to | Project | not null | READ | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :--------------: | ------------------------------------------- | ----------- | ------------------------------------ | -------------------- | + | id | Identifier of this post | Integer | x > 0 | READ | + | subject | The post's subject | String | not null | READ | + name: Posts + - description: |- + Principals are the superclass of users, groups and placeholder users. This end point returns all principals + within a joined collection but can be filtered to e.g. only return groups or users. + name: Principals + - description: |- + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + |:---------:|-------------------------------------------- | ------------- | --------------------- | -------------------- | + | self | This priority | Priority | not null | READ | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :---------: | ------------------------------------------- | ---------- | ----------- | -------------------- | + | id | Priority id | Integer | x > 0 | READ | + | name | Priority name | String | not empty | READ | + | position | Sort index of the priority | Integer | x > 0 | READ | + | isDefault | Indicates whether this is the default value | Boolean | | READ | + | isActive | Indicates whether the priority is available | Boolean | | READ | + name: Priorities + - description: |- + Projects are containers structuring the information (e.g. work packages, wikis) into smaller groups. They can be used in a classic project management approach but also when structuring work by departments. + + As containers, they also control behaviour of the elements within them. One of the most important aspects of this is that projects limit permissions by having members with a certain permission set (roles) assigned to them. + + ## Actions + + | Link | Description | Condition | + |:--------------------------: |----------------------------------------------------------------------| --------------------------------- | + | update | Form endpoint that aids in updating this project | **Permission**: edit project | + | updateImmediately | Directly update this project | **Permission**: edit project | + | delete | Delete this project | **Permission**: admin | + | createWorkPackage | Form endpoint that aids in preparing and creating a work package | **Permission**: add work packages | + | createWorkPackageImmediately | Directly creates a work package in the project | **Permission**: add work packages | + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations |Condition | + | :----------: | ------------- | ---- | ----------- | -------------------- |----------------------------------------- | + | self | This project | Project | not null | READ | | + | ancestors | Array of all ancestors of the project, down from the root node (first element) to the parent (last element). | Collection | not null | READ | **Permission** view project on the ancestor project. Non visible projects will be omitted | + | categories | Categories available in this project | Collection | not null | READ | | + | types | Types available in this project | Collection | not null | READ | **Permission**: view work packages or manage types | + | versions | Versions available in this project | Collection | not null | READ | **Permission**: view work packages or manage versions | + | memberships | Memberships in the project | Collection | not null | READ | **Permission**: view members | + | workPackages | Work Packages of this project | Collection | not null | READ | | + | parent | Parent project of the project | Project | | READ/WRITE | **Permission** edit project | + | status | Denotes the status of the project, so whether the project is on track, at risk or is having trouble. | ProjectStatus | | READ/WRITE | **Permission** edit project | + + Depending on custom fields defined for projects, additional links might exist. + + Note, that the parent and ancestor links may contain the "undisclosed uri" `urn:openproject-org:api:v3:undisclosed` in case an + ancestor project is defined but the client lacks permission to see it. See the + [general introduction into links' properties](https://www.openproject.org/docs/api/basic-objects/#local-properties) for more information. + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :---------------------:| ------------- | ---- | ----------- | -------------------- | + | id | Projects' id | Integer | x > 0 | READ/WRITE | + | identifier | | String | | READ/WRITE | + | name | | String | | READ/WRITE | + | active | Indicates whether the project is currently active or already archived | Boolean | | READ/WRITE | + | statusExplanation | A text detailing and explaining why the project has the reported status | Formattable | | READ/WRITE | + | public | Indicates whether the project is accessible for everybody | Boolean | | READ/WRITE | + | description | | Formattable | | READ/WRITE | + | createdAt | Time of creation | DateTime | | READ | + | updatedAt | Time of the most recent change to the project | DateTime | | READ | + + Depending on custom fields defined for projects, additional properties might exist. + name: Projects + - description: | + A query defines how work packages can be filtered and displayed. + Clients can define a query once, store it, and use it later on to load the same set of filters and display options. + + ## Actions + + | Link | Description | Condition | + |:-------------------:|----------------------------------------------------------------------| --------------------------------------- | + | star | Elevates the query to the status of 'starred' | **Permission**: save queries for own queries, manage public queries for public queries; Only present if query is not yet starred | + | unstar | Removes the 'starred' status | **Permission**: save queries for own queries, manage public queries for public queries; Only present if query is starred | + | update | Use the Form based process to verify the query before persisting | **Permission**: view work packages | + | updateImmediately | Persist the query without using a Form based process for guidance | **Permission**: save queries for own queries, manage public queries for public queries; | + + ## Linked Properties + + | Property | Description | Type | Constraints | Supported operations | + | :--------------------: | ------------------------------------------------------ | --------------------- | ------------------------------------------- | -------------------- | + | self | This query | Query | not null | READ | + | user | The user that owns this query | User | not null | READ | + | project | The project on which this query operates | Project | | READ | + | columns | Ordered list of QueryColumns. The columns, when mapped to WorkPackage properties determine which WorkPackage properties to display | []QueryColumn | | READ | + | highlightedAttributes | **Only with valid Enterprise Token available:** List of QueryColumns that should get highlighted when `highlightingMode` is set to `inline`. | []QueryColumn | | READ | + | sortBy | Ordered list of QuerySortBys. Indicates the WorkPackage property the results will be ordered by as well as the direction | []QuerySortBy | | READ | + | groupBy | The WorkPackage property results of this query are grouped by | String | | READ | + | results | The list of work packages returned by applying the filters, sorting and grouping defined in the query | WorkPackageCollection | | READ | + | schema | This query's schema | Schema | | READ | + + Please note, that all the properties listed above will also be embedded when individual queries are returned but will not be embedded when a list of queries is returned. Whether the properties are embedded or not may be subject to change in the future. + + The `columns` and `highlightedAttributes` properties will be moved into `Views::WorkPackagesTable` so it is deprecated to have it listed within the Query directly. + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :--------------: | -------------------------------------------------------------------------------------------------------- | --------------------- | ----------------------------------------------------------------------------------- | -------------------- | + | id | Query id | Integer | x > 0 | READ | + | name | Query name | String | | READ/WRITE | + | filters | A set of QueryFilters which will be applied to the work packages to determine the resulting work packages| []QueryFilterInstance | | READ/WRITE | + | sums | Should sums (of supported properties) be shown? | Boolean | | READ/WRITE | + | timelineVisible | Should the timeline mode be shown? | Boolean | | READ/WRITE | + | timelineLabels | Which labels are shown in the timeline, empty when default | QueryTimelineLabels | | READ/WRITE | + | timelineZoomLevel| Which zoom level should the timeline be rendered in? | String | days, weeks, months, quarters, years | READ/WRITE | + | timestamps | The timestamps to filter by when showing changed attributes on work packages.| []Timestamp | | **Values older than 1 day are accepted only with valid Enterprise Token available.**| READ/WRITE | + | highlightingMode | Which highlighting mode should the table have? | String | none, inline, status, priority, type | READ/WRITE | + | showHierarchies | Should the hierarchy mode be enabled? | Boolean | | READ/WRITE | + | hidden | Should the query be hidden from the query list? | Boolean | | READ/WRITE | + | public | Can users besides the owner see the query? | Boolean | | READ/WRITE | + | starred | Should the query be highlighted to the user? | Boolean | | READ | + | createdAt | Time of creation | DateTime | not null | READ | + | updatedAt | Time of the most recent change to the query | DateTime | not null | READ | + + A query that is not assigned to a project (`"project": null`) is called a global query. Global queries filter work packages regardless of the project they are assigned to. As such, a different set of filters exists for those queries. + + The `hidden` property is deprecated as it is replaced by the `Views` concept. A query that isn't hidden will have a `View` while a query that is hidden won't. + + The `timelineVisible`, `timelineLabels`, `timelineZoomLevel`, `highlightingMode` and `showHierarchies` properties will be moved into the more appropriate Views (probably `Views::WorkPackagesTable`) so it is deprecated to have them within the Query directly. + + ## Query Filter Instance + + A QueryFilterInstance defines a filtering applied to the list of work packages. As such it contains: + + * the filter type (`QueryFilter`) used + + * the operator (`QueryOperator`) used + + * the list of values + + The list of values can either consist of a list of links or of a list of strings. If the values are primitive (e.g. Integer, Boolean, Date) they will be displayed as strings and the QueryFilterInstance will have a `values` property. + + ```json + { + "_type": "DueDateQueryFilter", + "name": "Finish date", + "values": [ + "1" + ], + "_links": { + "filter": { + "href": "/api/v3/queries/filters/dueDate", + "title": "Finish date" + }, + "operator": { + "href": "/api/v3/queries/operators/ 0 | READ | + | name | The internationalized name of this kind of relation | String | | READ + | type | Which kind of relation (blocks, precedes, etc.) | String | in: relates, duplicates, duplicated, blocks, blocked, precedes, follows, includes, partof, requires, required | READ / WRITE | + | reverseType | The kind of relation from the other WP's perspective | String | in: relates, duplicates, duplicated, blocks, blocked, precedes, follows, includes, partof, requires, required | READ | + | description | Short text further describing the relation | String | | READ / WRITE | + | delay* | The delay in days between closing of `from` and start of `to` | Integer | x >= 0 | READ / WRITE | + + \* Only applicable for some relation types such as "follows". You can check using the relation by schema + endpoint at `/api/v3/relations/schema/{type}`. + name: Relations + - description: |- + Throughout OpenProject user input for many properties can be formatted using *Markdown*. + Using the appropriate rendering endpoint it is possible to render custom formatted inputs into HTML and thus + receive a preview of the rendered text. + + The request to a rendering endpoint must always have a MIME-Type of `text/plain`. + The request body is the actual string that shall be rendered as HTML string. + name: Previewing + - description: |- + Revisions are sets of updates to files in the context of repositories linked in OpenProject. + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + |:----------------:| --------------------------------------------------------------------------------------------------| ------------- | ----------- | -------------------- | + | self | This revision | Revision | not null | READ | + | project | The project to which the revision belongs | Project | not null | READ | + | author | The user that added this revision, if the authorName was mapped to a user in OpenProject | User | | READ | + | showRevision | A URL to the repository view (outside APIv3) showing this revision | - | not null | READ | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + |:-----------------------:| ------------------------------------------------------------------------------------------------------------------------------------------------------------| ----------- | ----------- | -------------------- | + | id | Revision's id, assigned by OpenProject | Integer | x > 0 | READ | + | identifier | The raw SCM identifier of the revision (e.g. full SHA hash) | String | not null | READ | + | formattedIdentifier | The SCM identifier of the revision, formatted (e.g. shortened unambiguous SHA hash). May be identical to identifier in many cases | String | not null | READ | + | authorName | The name of the author that committed this revision. Note that this name is retrieved from the repository and does not identify a user in OpenProject. | String | not null | READ | + | message | The commit message of the revision | Formattable | not null | READ | + | createdAt | The time this revision was committed to the repository | DateTime | not null | READ | + name: Revisions + - description: |- + When principals (groups or users) are assigned to a project, they are receive roles in that project. Roles regulate access to specific resources by having permissions configured for them. + + Currently, this is only a stub. + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + | :-------------------: | ----------------------------------------- | ------------- | -------------------------------| -------------------- | + | self | This role | Role | not null | READ | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- | + | id | Role id | Integer | x > 0 | READ | + | name | Role name | String | not null | READ | + name: Roles + - description: |- + The root resource contains links to available resources in the API. By following these links + a client should be able to discover further resources in the API. + + *Note: Currently there is no list action for projects available.* + *A client will therefore have to know links to projects and can't (yet) discover them.* + + | Link | Description | Type | Nullable | Supported operations | Condition | + | :-------------------: | ------------------------------------------------ | --------------- | -------- | -------------------- | --------- | + | configuration | The configuration of this OpenProject instance | Configuration | | READ | | + | user | The user currently logged-in | User | | READ | logged in | + | userPreferences | The preferences of the logged-in user | UserPreference | | READ | logged in | + | priorities | List of available priorities | Collection | | READ | **Permission** View work packages in any project | + | statuses | List of available work package statuses | Collection | | READ | **Permission** View work packages in any project | + | types | List of available work package types | Collection | | READ | **Permission** View work packages in any project | + | workPackages | List of all work packages | Collection | | READ | **Permission** View work packages in any project | + | users | List of all users | Collection | | READ | **Permission** Administrator | + + ## Local Properties + + | Property | Description | Type | Condition | Supported operations | + | :-----------------------: | ---------------------------------------------------- | ---------- | --------------------------------- | -------------------- | + | instanceName | The name of the OpenProject instance | String | | READ | + | coreVersion | The OpenProject core version number for the instance | String | **Permission** requires admin privileges | READ | + name: Root + - description: |- + The schema provides detailed information about the properties of a resource. + + The schema is represented by a dictionary where keys are names of resource properties and values are + objects describing the corresponding property. + + These objects are called **field schema** and form the core of the schema representation. + Each of them can contain its own `_links` and `_embedded` section. + + ## Linked Properties + + | Link | Description | Type | Nullable | Supported operations | + |:-------------------:| ---------------------------------------- | ------------- | -------- | -------------------- | + | self | This schema | Schema | | READ | + + ## Local Properties + + | Property | Description | Type | + | :-----------------: | ---------------------------------------------------------------------------------- | ---------------- | + | _dependencies | A list of dependencies between one property's value and another property | SchemaDependency | + + The `_dependencies` property contains the list of dependencies that exist between the value selected for one of the properties of the described resource and the resource's structure. Depending on the value, additional properties might exist or properties might have other values allowed to be assigned. See [SchemaDependency](https://www.openproject.org/docs/api/endpoints/schemas/#schema-dependencies) for more information. + + # Field schema + + ## Linked Properties + + | Property | Description | Conditions | + | :--------------: | -------------------------------------------------------------- | --------------------------------------------- | + | allowedValues | List of resources that are assignable by the current user. | Will not exist if `allowedValuesSchemas` is present. | + | allowedValuesSchemas | Link to schemas further describing the property. | Will not exist if `allowedValues` is present. | + + The `allowedValues` can either contain a list of canonical links or just a single link to a collection resource. + This is an optimization to allow efficient handling of both small resource lists (that can be enumerated inline) and large + resource lists (requiring one or more separate requests). + + The `allowedValuesSchemas` will on rare occasions (e.g. for a [Query](https://www.openproject.org/docs/api/endpoints/queries/)) replace `allowedValues`. This is done when there is no fixed set of allowed values. Instead, the allowed values will have to follow a schema, or one of a list of schemas, in its own right. + + Only one of the links (`allowedValues`, `allowedValuesSchemas`) will exist for any given property. + + ## Local Properties + + | Property | Description | Type | Default | + |:-----------------:| ---------------------------------------------------------------------------------- | ------------ | ------- | + | type | The data type of the property | MetaType | | + | name | Human readable name of the property as it could be displayed in a UI | String | | + | required | If true this property is not nullable | Boolean | true | + | hasDefault | If true this property will have a default value if none is provided | Boolean | false | + | writable | If false it is not allowed to **change** the property value | Boolean | true | + | minLength | The value of the property must at least contain the specified amount of characters | Integer | 0 | + | maxLength | The value of the property must at most contain the specified amount of characters | Integer | ∞ | + | regularExpression | The value of the property must match the given regular expression (if not null) | String | null | + | location | If present, contains a reference to the location of the property in the JSON | String | null | + | description | If present, contains a formattable, human readable description | Formattable | null | + | deprecated | If present, the client should consider the existence of the property deprecated | Boolean | false | + + All of the above properties that do not have a default value *must* be present in the schema. + For properties that have a default value, the client can assume the default value, if the property is missing. + + Note that regular expressions used in the API follow the rules of [Ruby Regular Expressions](https://ruby-doc.org/core-2.2.6/Regexp.html). + + ### Location property + + The location property gives a hint as to where to find the resource property: + + * when not set, it is in the resource top level attributes; + * when set to `_links`, it is under the path `_links.propertyName`; + * when set to `_meta`, it is under the path `_meta.propertyName`. + + For example, for a work package schema, the field schema of the `user` property has a location + property set to `_links`. This means that the `user` property will be found under the path + `_links.user` of the json payload of the work package resource. + + # Schema Dependencies + + A `SchemaDependency` describes the dependencies between a value chosen for a resource's property + and the resource's structure. By that, additional properties or changes in a property are + described. + + A `SchemaDependency` will never describe a property to disappear, only to appear. As such it + always provides additional information. For a property that is depending on another property's + value, this can result in not being listed in the resource's schema itself at all. This will be + the case if the existence of the property as a whole will be dependent. If only one of the aspects + (e.g. *writable*) of the property changes with the selected value, the property itself will + already be listed in the schema, but it will lack the dependent aspect. + + Given that SchemaDependencies will only add information, and the content type of JSON, a client should be able to join the two objects, the schema and the dependency, into one object easily. + + SchemaDependencies are always embedded inside a Schema's `_dependencies` attribute. As such, they are not independently existing resources. Consequently, they do not have a `self` reference. + + ## Linked Properties + + A SchemaDependency does not have any links. + + ## Local Properties + + | Property | Description | Type | + | :-----------------: | ---------------------------------------------------------------------------------- | ---------------- | + | on | The name of the property on which the dependency exists | string | + | dependencies | The additions to a schema grouped by the value of the depending property | object | + + The following excerpt exemplifies the objects that can be found as a value of the `dependencies` property: + + ```json + { + "_type": "SchemaDependency", + "on": "someProperty", + "dependencies": { + "1": { + "loremIpsum": { + "type": "User", + "name": "Lorem ipsum", + "required": true, + "hasDefault": false, + "writable": true, + "location": "_links", + "description": { + "format": "markdown", + "raw": "A description for field Lorem ipsum. This may contain [links](https://example.com).", + "html": "

A description for field Lorem ipsum. This may contain links.

" + }; + "_links": { + "allowedValues": { + "href": "/api/v3/some/path/to/users" + } + } + } + }, + "2": { + "loremIpsum": { + "type": "User", + "name": "Lorem ipsum", + "required": true, + "hasDefault": false, + "writable": true, + "location": "_links", + "_links": { + "allowedValues": { + "href": "/api/v3/a/totally/different/path/to/other/users" + } + } + } + }, + "3": { + "loremIpsum": { + "type": "User", + "name": "Lorem ipsum", + "required": true, + "hasDefault": false, + "writable": false, + "location": "_links", + } + }, + "4": {} + } + } + ``` + + Given the example above: + * If the depending property is `1`, `2` or `3`: + * The client must set the property `loremIpsum`, because of `"required": true` for all three field schemas + * When the depending property is `1` or `2`, the values allowed to be set for `loremIpsum` property differ + * When the depending property is `3`, the `loremIpsum` property will not be writable + * If the depending property is `4`, the `loremIpsum` property does not exist + + Because of the limitation of JSON objects, all keys will be strings, even when the depending value is actually something different (e.g. Integer, Date). + This is also true for resources where the resource url is used as the key. + name: Schemas + - description: |- + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + |:-------------:|-------------------------- | ------------- | ----------- | -------------------- | + | self | This status | Status | not null | READ | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :--------: | ------------- | ------- | ----------- | -------------------- | + | id | Status id | Integer | x > 0 | READ | + | name | Status name | String | | READ | + | position | Sort index of the status | Integer | | READ | + | isDefault | | Boolean | | READ | + | isClosed | are tickets of this status considered closed? | Boolean | | READ | + | isReadonly | are tickets of this status read only? | Boolean | | READ | + | defaultDoneRatio | The percentageDone being applied when changing to this status | Integer | 0 <= x <= 100 | READ | + name: Statuses + - description: |- + ## Actions + + | Link | Description | Condition | + |:-------------------:| -------------------------------------------------------------------------- | ---------------------------------------------------------------- | + | updateImmediately | Directly perform edits on this time entry | **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user, or 'log own time' if the time entry is ongoing | + | update | Form endpoint that aids in preparing and performing edits on a TimeEntry | **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user, or 'log own time' if the time entry is ongoing | + | delete | Delete this time entry | **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user, or 'log own time' if the time entry is ongoing | + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | Condition | + | :-----------: | -------------------------------------------------------------- | ------------- | --------------------- | -------------------- | --------------------------------------------------------- | + | self | This time entry | TimeEntry | not null | READ | | + | project | The project the time entry is bundled in. The project might be different from the work package's project once the workPackage is moved. | Project | not null | READ / WRITE | | + | workPackage | The work package the time entry is created on | WorkPackage | | READ / WRITE | | + | user | The user the time entry tracks expenditures for | User | not null | READ / WRITE | **Permission**: Log time for other users permission | + | activity | The time entry activity the time entry is categorized as | TimeEntriesActivity | | READ / WRITE | | + + Depending on custom fields defined for time entries, additional links might exist. + + Time entries are either linked to a work package or to a project. If they are linked to a project, the work package reference is empty. If they are linked to a work package, the project reference is filled up automatically to point to the work package's project. + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | Condition | + | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- | + | id | Time entries' id | Integer | x > 0 | READ | | + | comment | A text provided by the user detailing the time entry | String | | READ / WRITE | | + | spentOn | The date the expenditure is booked for | Date | | READ / WRITE | | + | hours | The time quantifying the expenditure | Time | | READ / WRITE | | + | ongoing | Whether the time entry is actively tracking | Boolean | | READ / WRITE | | + | createdAt | The time the time entry was created | DateTime | | READ | | + | updatedAt | The time the time entry was last updated | DateTime | | READ | | + + Depending on custom fields defined for time entries, additional properties might exist. + name: Time entries + - description: |- + Time entries are classified by an activity which is one item of a set of user defined activities (e.g. Design, Specification, Development). + + ## Actions + + None + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | Condition | + | :-----------: | -------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- | + | self | This time entry activity | TimeEntriesActivity | not null | READ | | + | projects | List of projects the time entry is active in | []Project | not null | READ / WRITE | | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | Condition | + | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- | + | id | Time entries' id | Integer | x > 0 | READ | | + | name | The human readable name chosen for this activity | String | max 30 characters | READ | | + | position | The rank the activity has in a list of activities | Date | | READ |   | + | default | Flag to signal whether this activity is the default activity | Boolean | | READ |   | + name: Time entry activities + - description: |- + Work package types represented in the system. + + Types exist globally and are then activated for projects. + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + |:-------------:|-------------------------- | ------------- | ----------- | -------------------- | + | self | This type | Type | not null | READ | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + |:----------------:| ---------------------------------------------------- | -------- | ----------- | -------------------- | + | id | Type id | Integer | x > 0 | READ | + | name | Type name | String | | READ | + | color | The color used to represent this type | Color | | READ | + | position | Sort index of the type | Integer | | READ | + | isDefault | Is this type active by default in new projects? | Boolean | | READ | + | isMilestone | Do work packages of this type represent a milestone? | Boolean | | READ | + | createdAt | Time of creation | DateTime | | READ | + | updatedAt | Time of the most recent change to the user | DateTime | | READ | + name: Types + - description: |- + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + |:---------:|----------------------------------------------------------| -------------- | --------------------- | -------------------- | + | self | This UserPreferences | UserPreferences| not null | READ | + | user | The user that this preference belongs to | User | not null | READ | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + |:----------------------:| ----------------------------------------------------------- | ---------- | ----------- | -------------------- | + | autoHidePopups | Whether to hide popups (e.g. success messages) after 5 seconds | Boolean | | READ / WRITE | + | hideMail | Hide mail address from other users | Boolean | | READ / WRITE | + | notifications | The settings for the notifications to be received by the user | NotificationSetting | | READ / WRITE | + | timeZone | Current selected time zone | String | | READ / WRITE | + | commentSortDescending | Sort comments in descending order | Boolean | | READ / WRITE | + | warnOnLeavingUnsaved | Issue warning when leaving a page with unsaved text | Boolean | | READ / WRITE | + name: UserPreferences + - description: |- + ## Actions + + | Link | Description | Condition | + |:-------------------:| -------------------------------------------------------------------- | ---------------------------------------------------------------- | + | lock | Restrict the user from logging in and performing any actions | not locked; **Permission**: Administrator | + | show | Link to the OpenProject user page (HTML) | | + | unlock | Allow a locked user to login and act again | locked; **Permission**: Administrator | + | updateImmediately | Updates the user's attributes. | **Permission**: Administrator, manage_user global permission | + | delete | Permanently remove a user from the instance | **Permission**: Administrator, self-delete | + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | Condition | + |:-----------:|-------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- | + | self | This user | User | not null | READ | | + | auth_source | Link to the user's auth source (endpoint not yet implemented) | LdapAuthSource | | READ / WRITE | **Permission**: Administrator | + | members | Link to collection of all the user's memberships. The list will only include the memberships in projects in which the requesting user has the necessary permissions. | MemberCollection | | READ | **Permission**: view members or manage members in any project | + + Depending on custom fields defined for users, additional links might exist. + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | Condition | + | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- | + | id | User's id | Integer | x > 0 | READ | | + | login | User's login name | String | unique, 256 max length | READ / WRITE | **Permission**: Administrator, manage_user global permission | + | firstName | User's first name | String | 30 max length | READ / WRITE | **Permission**: Administrator, manage_user global permission | + | lastName | User's last name | String | 30 max length | READ / WRITE | **Permission**: Administrator, manage_user global permission | + | name | User's full name, formatting depends on instance settings | String | | READ | | + | email | User's email address | String | unique, 60 max length | READ / WRITE | E-Mail address not hidden, **Permission**: Administrator, manage_user global permission | + | admin | Flag indicating whether or not the user is an admin | Boolean | in: [true, false] | READ / WRITE | **Permission**: Administrator | + | avatar | URL to user's avatar | Url | | READ | | + | status | The current activation status of the user (see below) | String | in: ["active", "registered", "locked", "invited"] | READ | | + | language | User's language | String | ISO 639-1 | READ / WRITE | **Permission**: Administrator, manage_user global permission | + | password | User's password for the default password authentication | String | | WRITE | **Permission**: Administrator | + | identity_url | User's identity_url for OmniAuth authentication | String | | READ / WRITE | **Permission**: Administrator | + | createdAt | Time of creation | DateTime | | READ | | + | updatedAt | Time of the most recent change to the user | DateTime | | READ | | + + Depending on custom fields defined for users, additional properties might exist. + + The `status` of a user can be one of: + + * `active` - the user can log in with the account right away + + * `invited` - the user is invited and is pending registration + + If the user's `status` is set to `active` during creation a means of authentication + has to be provided which is one of the following: + + * `password` - The password with which the user logs in. + + * `auth_source` - Link to an LDAP auth source. + + * `identity_url` - The identity URL of an OmniAuth authentication provider. + + If all of these are missing the creation will fail with an "missing password" error. + + The `language` is limited to those activated in the system. + + Due to data privacy, the user's properties are limited to reveal as little about the user as possible. + Thus `login`, `firstName`, `lastName`, `language`, `createdAt` and `updatedAt` are hidden for all + users except for admins or the user themselves. + + Please note that custom fields are not yet supported by the api although the backend supports them. + name: Users + - description: |- + `Values::Property` represents a single key - value pair. That pair typically is an + excerpt of the properties of a resource. `Values::Property` itself is not an independent resource. It will always be nested and as such + will only exist as part of another resource. + + It is currently used e.g. in the Notification resource. + + ## Linked Properties + + | Property | Description | Type | Constraints | Supported operations | Condition | + | :--------------: | ----------------------------| ----------- | --------------------- | -------------------- | ------------------------- | + | self | This value | Values::Property | not null | READ | | + | schema | This value's schema | Schema | not null | READ | | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | Condition | + | :--------------: | ------------------------------------------------------ | ----------- | -------------- | -------------------- | ---------------------------- | + | property | The pairs' key name | String | not null | READ | | + | value | The pairs' value | Polymorphic | | READ | | + name: Values::Property + - description: |- + Work Packages can be assigned to a version. As such, versions serve to group Work Packages into logical units where each group comprises all the work packages that needs to be finished in order for the version to be finished. + + ## Actions + + | Link | Description | Condition | + |:-------------------:|--------------------------------------------------------------------------| ---------------------------------------| + | update | Form endpoint that aids in preparing and performing edits on the version | **Permission**: manage versions | + | updateImmediately | Directly perform edits on the version | **Permission**: manage versions | + + ## Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + |:-------------------:|----------------------------------------- | ------------- | -------------------------------------------------------------- | -------------------- | + | self | This version | Version | not null | READ | + | definingProject | The project to which the version belongs | Project | only present if the project is visible for the current user | READ | + | availableInProjects | Projects where this version can be used | Projects | not null | READ | + + Depending on custom fields defined for versions, additional linked properties might exist. + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- | + | id | Version id | Integer | x > 0 | READ | + | name | Version name | String | not null, may not exceed 60 characters | READ / WRITE | + | description | | Formattable | | READ / WRITE | + | startDate | | Date | | READ / WRITE | + | endDate | | Date | | READ / WRITE | + | status | The current status of the version | String | not null, only 'open', 'finished', 'closed' | READ / WRITE | + | sharing | The current status of the version | String | not null, limited to fixed set as defined by form | READ / WRITE | + | createdAt | Time of creation | DateTime | not null | READ | + | updatedAt | Time of the most recent change to the version | DateTime | not null | READ | + + Depending on custom fields defined for versions, additional properties might exist. + name: Versions + - description: + "A View is a representation of some information. That information might + be a query (currently it always is).\nThe view will store the configuration on + how to display the information but not the information itself.\n\nA View might + then be a graph, a table, a gantt chart or something completely different.\nThe + client will have to choose how to represenent in the view. \n\nA View instance + will always be of a subtype of `Views`, e.g. `Views::WorkPackageslist`. The properties + between each `Views` type might differ a lot.\n\n**The View is a new concept so + it is prone to change.**\n\nCurrently a lot of restrictions still apply:\n * + There will always be a query associated to the view when in the complete concept, + this limitation should not be necessary.\n * A query can only have one view associated.\n + \ * There is neither an update nor a delete endpoint and the schema and form endpoints + are also missing. \n To delete a view, simply delete the query.\n * Most of + the properties are deduced from the associated query and can thus only be updated + via updating the query.\n * The properties are not different between `Views` + subtypes.\n\n## Linked Properties\n\n| Link | Description | + Type | Constraints | Supported operations |\n| + :-------------------: | ---------------------------------------- | + ------------- | -------- | -------------------- |\n| + self | This view | + View (a subtype of it) | not null | READ |\n| + query | This query from which to fetch the data | + Query | not null | READ/WRITE |\n| + project | This project the view is defined in (deduces from the + query). If no project is specified, the View is considered global. | Project + \ | Deduced from the query | READ |\n\n## Local + Properties\n\n| Property | Description | + Type | Constraints | Supported + operations|\n| :--------------: | ------------------------------------------------------| + ----------- | ------------------------------------ | --------------------|\n| + _type | The subtype chosen | String + \ | | READ |\n| + id | View id | Integer + \ | x > 0 | READ |\n| + name | View name | String + \ | Deduced from the query | READ |\n| + public | Can users besides the owner see the view? | Boolean + \ | Deduced from the query | READ |\n| + starred | Should the view be highlighted to the user? | Boolean + \ | Deduced from the query | READ |\n| + createdAt | Time of creation | DateTime + \ | not null | READ |\n| + updatedAt | Time of the most recent change to the view | DateTime + \ | not null | READ |" + name: Views + - description: |- + Represents an individual page in a project's wiki. + + *This resource is currently a stub* + + ## Actions + + | Link | Description | Condition | + |:-------------------:|----------------------------------------------------------------------| --------------------------------------- | + | addAttachment | Attach a file to the wiki page | **Permission**: edit wiki page | + + ## Linked Properties + + | Property | Description | Type | Constraints | Supported operations | + | :--------------: | ------------------------------------------------------ | ----------- | -------------- | -------------------- | + | self | This wiki page | WikiPage | not null | READ | + | attachments | The files attached to this wiki page | Collection | | READ | + | project | The project the wiki page belongs to | Project | not null | READ | + + ## Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :--------------: | ------------------------------------------- | ----------- | ------------------------------------ | -------------------- | + | id | Identifier of this wiki page | Integer | x > 0 | READ | + | title | The wiki page's title | String | not null | READ | + name: Wiki Pages + - description: + "## Actions\n\n| Link | Description | + Condition |\n|:-------------------:|--------------------------------------------------------------------------| + ---------------------------------------|\n| addAttachment | Attach a file + to the WP | **Permission**: edit + work package |\n| addComment | Post comment to WP | + **Permission**: add work package notes |\n| addRelation | Adds a relation + to this work package. | **Permission**: manage + wp relations |\n| addWatcher | Add any user to WP watchers | + **Permission**: add watcher |\n| customActions | Collection of + predefined changes that can be applied to the work package | |\n| + logTime | Log time on the work package | + **Permission**: Log time, Log own time |\n| previewMarkup | Post markup + (in markdown) here to receive an HTML-rendered response | |\n| + removeWatcher | Remove any user from WP watchers | + **Permission**: delete watcher |\n| unwatch | Remove current + user from WP watchers | logged in; watching + \ |\n| update | Form endpoint that aids in preparing + and performing edits on a WP | **Permission**: edit work package |\n| + updateImmediately | Directly perform edits on a work package | + **Permission**: edit work package |\n| watch | Add current + user to WP watchers | logged in; not + watching |\n\n## Linked Properties\n\n| Link | Description + \ | + Type | Constraints | Supported operations + \ | Condition |\n| :----------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------- + | ------------ | ------------ | --------------------- + | ----------------------------------------- |\n| self | This work + package | + WorkPackage | not null | READ | + \ |\n| schema | The schema + of this work package | + Schema | not null | READ | + \ |\n| ancestors | Array of + all visible ancestors of the work package, with the root node being the first + element | Collection | + not null | READ | **Permission** + view work packages |\n| attachments | The files attached to this + work package | + Collection | not null | READ / WRITE | + \ |\n| author | The person + that created the work package | + User | not null | READ | + \ |\n| assignee | The person + that is intended to work on the work package | + User | | READ / WRITE | + \ |\n| availableWatchers | All users + that can be added to the work package as watchers. | + User | | READ | + **Permission** add work package watchers |\n| budget | The budget + this work package is associated to | + Budget | | READ / WRITE | + **Permission** view cost objects |\n| category | The category + of the work package | + Category | | READ / WRITE | + \ |\n| children | Array of + all visible children of the work package | + Collection | not null | READ | + **Permission** view work packages |\n| parent | Parent work + package | + WorkPackage | Needs to be visible (to the current user) | READ / WRITE | + \ |\n| priority | The priority + of the work package | + Priority | not null | READ / WRITE | + \ |\n| project | The project + to which the work package belongs | + Project | not null | READ / WRITE | + \ |\n| responsible | The person + that is responsible for the overall outcome | + User | | READ / WRITE | + \ |\n| relations | Relations + this work package is involved in | + Relation | | READ | + **Permission** view work packages |\n| revisions | Revisions + that are referencing the work package | + Revision | | READ | + **Permission** view changesets |\n| status | The current + status of the work package | + Status | not null | READ / WRITE | + \ |\n| timeEntries | All time + entries logged on the work package. Please note that this is a link to an HTML + resource for now and as such, the link is subject to change. | N/A | + \ | READ | **Permission** + view time entries |\n| type | The type of the work package + \ | + Type | not null | READ / WRITE | + \ |\n| version | The version + associated to the work package | + Version | | READ / WRITE | + \ |\n| watchers | All users + that are currently watching this work package | + Collection | | READ | + **Permission** view work package watchers |\n\n## Local Properties\n\n| Property + \ | Description | + Type | Constraints | + Supported operations | Condition |\n| :--------------: + \ | ------------------------------------------------------ | + ----------- | ------------------------------------------------------------------------------------------------------ + \ | + -------------------- | -------------------------------- |\n| id | + Work package id | + Integer | x > 0 | + READ | |\n| lockVersion | + The version of the item as used for optimistic locking | + Integer | | + READ | |\n| subject | + Work package subject | + String | not null; 1 <= length <= 255 | + READ / WRITE | |\n| type | + Name of the work package's type | + String | not null | + READ | |\n| description | + The work package description | + Formattable | | + READ / WRITE | |\n| scheduleManually + \ | If false (default) schedule automatically. | + Boolean | | + READ / WRITE | |\n| startDate | + Scheduled beginning of a work package | + Date | Cannot be set for parent work packages unless it is scheduled manually; + must be equal or greater than the earliest possible start date; Exists only on + work packages of a non milestone type | READ / WRITE | |\n| + dueDate | Scheduled end of a work package | + Date | Cannot be set for parent work packages unless it is scheduled manually; + must be greater than or equal to the start date; Exists only on work packages + of a non milestone type | READ / WRITE | |\n| + date | Date on which a milestone is achieved | + Date | Exists only on work packages of a milestone type | + READ / WRITE | |\n| derivedStartDate + \ | Similar to start date but is not set by a client but rather deduced + by the work packages' descendants. If manual scheduleManually is active, the two + dates can deviate. | Date | | + READ | |\n| derivedDueDate | + Similar to due date but is not set by a client but rather deduced by the work + packages' descendants. If manual scheduleManually is active, the two dates can + deviate. | Date | | + READ | |\n| duration | + The amount of time in hours the work package needs to be completed. | + Duration | Not available for milestone type of work packages. | + READ / WRITE | |\n| estimatedTime | + Time a work package likely needs to be completed excluding its descendants | + Duration | | + READ / WRITE | |\n| derivedEstimatedTime + \ | Time a work package likely needs to be completed including its descendants + \ | + Duration | | + READ | |\n| ignoreNonWorkingDays + \ | When scheduling, whether or not to ignore the non working days being defined. + A work package with the flag set to true will be allowed to be scheduled to a + non working day. | Boolean | Cannot be set for parent work packages unless + it is scheduled manually | + READ | |\n| spentTime | + The time booked for this work package by users working on it | + Duration | | + READ | **Permission** view time entries |\n| percentageDone | + Amount of total completion for a work package | + Integer | 0 <= x <= 100; Cannot be set for parent work packages | + READ / WRITE | |\n| readonly | + If true, the work package is in a readonly status so with the exception of the + status, no other property can be altered. | + Boolean | | + READ | Enterprise edition only |\n| createdAt | + Time of creation | + DateTime | | + READ | |\n| updatedAt | + Time of the most recent change to the work package | + DateTime | | + READ | |\n\nNote that the properties + listed here only cover the built-in properties of the OpenProject Core.\nUsing + plug-ins and custom fields a work package might contain various additional properties.\nA + client can consult the schema information to which the work package links. The + schema will contain information about\nall properties of the linking work package, + including properties added by plug-ins and custom fields.\n\nCustom fields are + identified by a key in the form of `customFieldN`, where `N` is an integer. Depending + on their type,\nthey can occur as properties or as linked properties. A client + has to consult the schema to resolve\nthe human readable name of custom fields.\n\nProperties + that cannot be set directly on parent work packages are inferred from their children + instead:\n\n* `startDate` is the earliest start date from its children if manual + scheduling is activated.\n\n* `dueDate` is the latest finish date from its children + if manual scheduling is activated.\n\n* `estimatedTime` is the sum of estimated + times from its children\n\n* `percentageDone` is the weighted average of the sum + of its children percentages done. The weight is given by the average of its children + estimatedHours. However, if the percentage done is given by a work package's status, + then only the status matters and no value is inferred.\n\n`startDate` can also + not be earlier than a finish date of any predecessor.\n\nWhile attachments are + returned as a link which's content is to be fetched separately, clients can choose + to\nreplace the work package's attachments by providing an array of already uploaded + [Attachment resources](https://www.openproject.org/docs/api/endpoints/attachments/) + \non [create](https://www.openproject.org/docs/api/endpoints/work-packages/#create-work-package)\nand + [update](https://www.openproject.org/docs/api/endpoints/work-packages/#update-a-work-package). + The attachments the work package has had prior to the request will be removed." + name: Work Packages + - name: Work Schedule + description: |- + The work schedule defines if days are working days or non-working days. + + A day can be a non-working day if any of these two conditions are met: + + - the day is a recurring non-working week day: a weekend day. For instance + Sunday is not worked in most countries; + - the day has been defined as a non-working day: national bank holidays or + other days deemed special. For instance the 1st of January is New Year's + day and is a bank holiday in most countries. + + Endpoints can define which week days are working/non-working days, and which + dates are non-working days. + + To represent the work schedule, `Day`, `WeekDay`, and `NonWorkingDay` models are used. + + ## Day Actions + + None + + ## Day Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + | :---------------: | ---------------------------------------------------------------- | ------------------------- | ----------- | -------------------- | + | self | This day | Day | not null | READ | + | nonWorkingReasons | A list of resources describing why this day is a non-working day | (WeekDay/NonWorkingDay)[] | | READ | + | weekDay | The week day for this day | WeekDay | not null | READ | + + ## Day Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :--------: | ------------------------------------------- | ------- | -------------- | -------------------- | + | date | The date in ISO8601 format (YYYY-MM-DD) | Date | not null | READ | + | name | The name of the day | String | not null | READ | + | working | `true` for a working day, `false` otherwise | Boolean | not null | READ | + + + ## WeekDay Actions + + | Link | Description | Condition | + | :----: | -------------------- | ---------------------------------- | + | update | Update this week day | **Permission**: edit work schedule | + + ## WeekDay Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + | :--: | ------------- | ------- | ----------- | -------------------- | + | self | This week day | WeekDay | not null | READ | + + ## WeekDay Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :------: | --------------------------------------------------- | ------- | -------------- | -------------------- | + | day | The week day from 1 to 7. 1 is Monday. 7 is Sunday. | Integer | x >= 1, x <= 7 | READ | + | name | The name of the week day | String | not null | READ | + | working | `true` for a working week day, `false` otherwise | Boolean | not null | READ/WRITE | + + + ## NonWorkingDay Actions + + | Link | Description | Condition | + | :----: | --------------------------- | ---------------------------------- | + | update | Update this non-working day | **Permission**: edit work schedule | + + ## NonWorkingDay Linked Properties + + | Link | Description | Type | Constraints | Supported operations | + | :--: | -------------------- | ------------- | ----------- | -------------------- | + | self | This non-working day | NonWorkingDay | not null | READ | + + ## NonWorkingDay Local Properties + + | Property | Description | Type | Constraints | Supported operations | + | :------: | --------------------------------------- | ------ | ----------- | -------------------- | + | date | The date in ISO8601 format (YYYY-MM-DD) | Date | not null | READ | + | name | The name of the non-working day day | String | not null | READ/WRITE | +security: + - BasicAuth: [] diff --git a/test/actions_capabilities_api_test.dart b/test/actions_capabilities_api_test.dart new file mode 100644 index 0000000..a119a6b --- /dev/null +++ b/test/actions_capabilities_api_test.dart @@ -0,0 +1,66 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for ActionsCapabilitiesApi +void main() { + // final instance = ActionsCapabilitiesApi(); + + group('tests for ActionsCapabilitiesApi', () { + // List actions + // + // Returns a collection of actions. The client can choose to filter the actions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain actions, for which the requesting client has sufficient permissions. + // + //Future listActions({ String filters, String sortBy }) async + test('test listActions', () async { + // TODO + }); + + // List capabilities + // + // Returns a collection of actions assigned to a principal in a context. The client can choose to filter the actions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain actions, for which the requesting client has sufficient permissions + // + //Future listCapabilities({ String filters, String sortBy }) async + test('test listCapabilities', () async { + // TODO + }); + + // View action + // + // Returns an individual action. + // + //Future viewAction(String id) async + test('test viewAction', () async { + // TODO + }); + + // View capabilities + // + // + // + //Future viewCapabilities(String id) async + test('test viewCapabilities', () async { + // TODO + }); + + // View global context + // + // Returns the global capability context. This context is necessary to consistently link to a context even if the context is not a project. + // + //Future viewGlobalContext() async + test('test viewGlobalContext', () async { + // TODO + }); + + }); +} diff --git a/test/activities_api_test.dart b/test/activities_api_test.dart new file mode 100644 index 0000000..8468b2d --- /dev/null +++ b/test/activities_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for ActivitiesApi +void main() { + // final instance = ActivitiesApi(); + + group('tests for ActivitiesApi', () { + // Update activity + // + // Updates an activity's comment and, on success, returns the updated activity. + // + //Future updateActivity(int id, { UpdateActivityRequest updateActivityRequest }) async + test('test updateActivity', () async { + // TODO + }); + + // View activity + // + // + // + //Future viewActivity(int id) async + test('test viewActivity', () async { + // TODO + }); + + }); +} diff --git a/test/activity_model_comment_test.dart b/test/activity_model_comment_test.dart new file mode 100644 index 0000000..85af8bf --- /dev/null +++ b/test/activity_model_comment_test.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ActivityModelComment +void main() { + // final instance = ActivityModelComment(); + + group('test ActivityModelComment', () { + // Indicates the formatting language of the raw text + // String format + test('to test the property `format`', () async { + // TODO + }); + + // The raw text, as entered by the user + // String raw + test('to test the property `raw`', () async { + // TODO + }); + + // The text converted to HTML according to the format + // String html + test('to test the property `html`', () async { + // TODO + }); + + + }); + +} diff --git a/test/activity_model_test.dart b/test/activity_model_test.dart new file mode 100644 index 0000000..0a34c25 --- /dev/null +++ b/test/activity_model_test.dart @@ -0,0 +1,56 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ActivityModel +void main() { + // final instance = ActivityModel(); + + group('test ActivityModel', () { + // Activity id + // int id + test('to test the property `id`', () async { + // TODO + }); + + // Activity version + // int version + test('to test the property `version`', () async { + // TODO + }); + + // ActivityModelComment comment + test('to test the property `comment`', () async { + // TODO + }); + + // List details (default value: const []) + test('to test the property `details`', () async { + // TODO + }); + + // Time of creation + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Time of update + // DateTime updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + + }); + +} diff --git a/test/add_watcher_request_test.dart b/test/add_watcher_request_test.dart new file mode 100644 index 0000000..0ab05b7 --- /dev/null +++ b/test/add_watcher_request_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AddWatcherRequest +void main() { + // final instance = AddWatcherRequest(); + + group('test AddWatcherRequest', () { + // ExecuteCustomActionRequestLinksWorkPackage user + test('to test the property `user`', () async { + // TODO + }); + + + }); + +} diff --git a/test/attachment_model_description_test.dart b/test/attachment_model_description_test.dart new file mode 100644 index 0000000..97f11eb --- /dev/null +++ b/test/attachment_model_description_test.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AttachmentModelDescription +void main() { + // final instance = AttachmentModelDescription(); + + group('test AttachmentModelDescription', () { + // Indicates the formatting language of the raw text + // String format + test('to test the property `format`', () async { + // TODO + }); + + // The raw text, as entered by the user + // String raw + test('to test the property `raw`', () async { + // TODO + }); + + // The text converted to HTML according to the format + // String html + test('to test the property `html`', () async { + // TODO + }); + + + }); + +} diff --git a/test/attachment_model_links_author_test.dart b/test/attachment_model_links_author_test.dart new file mode 100644 index 0000000..f1509f2 --- /dev/null +++ b/test/attachment_model_links_author_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AttachmentModelLinksAuthor +void main() { + // final instance = AttachmentModelLinksAuthor(); + + group('test AttachmentModelLinksAuthor', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/attachment_model_links_container_test.dart b/test/attachment_model_links_container_test.dart new file mode 100644 index 0000000..d7e80fd --- /dev/null +++ b/test/attachment_model_links_container_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AttachmentModelLinksContainer +void main() { + // final instance = AttachmentModelLinksContainer(); + + group('test AttachmentModelLinksContainer', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/attachment_model_links_delete_test.dart b/test/attachment_model_links_delete_test.dart new file mode 100644 index 0000000..0a872d3 --- /dev/null +++ b/test/attachment_model_links_delete_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AttachmentModelLinksDelete +void main() { + // final instance = AttachmentModelLinksDelete(); + + group('test AttachmentModelLinksDelete', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/attachment_model_links_download_location_test.dart b/test/attachment_model_links_download_location_test.dart new file mode 100644 index 0000000..1eb6728 --- /dev/null +++ b/test/attachment_model_links_download_location_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AttachmentModelLinksDownloadLocation +void main() { + // final instance = AttachmentModelLinksDownloadLocation(); + + group('test AttachmentModelLinksDownloadLocation', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/attachment_model_links_self_test.dart b/test/attachment_model_links_self_test.dart new file mode 100644 index 0000000..f8a141a --- /dev/null +++ b/test/attachment_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AttachmentModelLinksSelf +void main() { + // final instance = AttachmentModelLinksSelf(); + + group('test AttachmentModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/attachment_model_links_test.dart b/test/attachment_model_links_test.dart new file mode 100644 index 0000000..d6903ed --- /dev/null +++ b/test/attachment_model_links_test.dart @@ -0,0 +1,47 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AttachmentModelLinks +void main() { + // final instance = AttachmentModelLinks(); + + group('test AttachmentModelLinks', () { + // AttachmentModelLinksDelete delete + test('to test the property `delete`', () async { + // TODO + }); + + // AttachmentModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // AttachmentModelLinksContainer container + test('to test the property `container`', () async { + // TODO + }); + + // AttachmentModelLinksAuthor author + test('to test the property `author`', () async { + // TODO + }); + + // AttachmentModelLinksDownloadLocation downloadLocation + test('to test the property `downloadLocation`', () async { + // TODO + }); + + + }); + +} diff --git a/test/attachment_model_test.dart b/test/attachment_model_test.dart new file mode 100644 index 0000000..bdaeb1d --- /dev/null +++ b/test/attachment_model_test.dart @@ -0,0 +1,74 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AttachmentModel +void main() { + // final instance = AttachmentModel(); + + group('test AttachmentModel', () { + // Attachment's id + // int id + test('to test the property `id`', () async { + // TODO + }); + + // The name of the file + // String title + test('to test the property `title`', () async { + // TODO + }); + + // The name of the uploaded file + // String fileName + test('to test the property `fileName`', () async { + // TODO + }); + + // The size of the uploaded file in Bytes + // int fileSize + test('to test the property `fileSize`', () async { + // TODO + }); + + // AttachmentModelDescription description + test('to test the property `description`', () async { + // TODO + }); + + // The files MIME-Type as determined by the server + // String contentType + test('to test the property `contentType`', () async { + // TODO + }); + + // A checksum for the files content + // String digest + test('to test the property `digest`', () async { + // TODO + }); + + // Time of creation + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // AttachmentModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/attachments_api_test.dart b/test/attachments_api_test.dart new file mode 100644 index 0000000..1899fa9 --- /dev/null +++ b/test/attachments_api_test.dart @@ -0,0 +1,102 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for AttachmentsApi +void main() { + // final instance = AttachmentsApi(); + + group('tests for AttachmentsApi', () { + // Add attachment to post + // + // Adds an attachment with the post as it's container. + // + //Future addAttachmentToPost(int id) async + test('test addAttachmentToPost', () async { + // TODO + }); + + // Add attachment to wiki page + // + // Adds an attachment with the wiki page as it's container. + // + //Future addAttachmentToWikiPage(int id) async + test('test addAttachmentToWikiPage', () async { + // TODO + }); + + // Create Attachment + // + // Clients can create attachments without a container first and attach them later on. This is useful if the container does not exist at the time the attachment is uploaded. After the upload, the client can then claim such containerless attachments for any resource eligible (e.g. WorkPackage) on subsequent requests. The upload and the claiming *must* be done for the same user account. Attachments uploaded by another user cannot be claimed and once claimed for a resource, they cannot be claimed by another. The upload request must be of type `multipart/form-data` with exactly two parts. The first part *must* be called `metadata`. Its content type is expected to be `application/json`, the body *must* be a single JSON object, containing at least the `fileName` and optionally the attachments `description`. The second part *must* be called `file`, its content type *should* match the mime type of the file. The body *must* be the raw content of the file. Note that a `filename` *must* be indicated in the `Content-Disposition` of this part, although it will be ignored. Instead the `fileName` inside the JSON of the metadata part will be used. + // + //Future createAttachment() async + test('test createAttachment', () async { + // TODO + }); + + // Create work package attachment + // + // To add an attachment to a work package, a client needs to issue a request of type `multipart/form-data` with exactly two parts. The first part *must* be called `metadata`. Its content type is expected to be `application/json`, the body *must* be a single JSON object, containing at least the `fileName` and optionally the attachments `description`. The second part *must* be called `file`, its content type *should* match the mime type of the file. The body *must* be the raw content of the file. Note that a `filename` must be indicated in the `Content-Disposition` of this part, however it will be ignored. Instead the `fileName` inside the JSON of the metadata part will be used. + // + //Future createWorkPackageAttachment(int id) async + test('test createWorkPackageAttachment', () async { + // TODO + }); + + // Delete attachment + // + // Permanently deletes the specified attachment. + // + //Future deleteAttachment(int id) async + test('test deleteAttachment', () async { + // TODO + }); + + // List attachments by post + // + // + // + //Future listAttachmentsByPost(int id) async + test('test listAttachmentsByPost', () async { + // TODO + }); + + // List attachments by wiki page + // + // + // + //Future listAttachmentsByWikiPage(int id) async + test('test listAttachmentsByWikiPage', () async { + // TODO + }); + + // List attachments by work package + // + // + // + //Future listWorkPackageAttachments(int id) async + test('test listWorkPackageAttachments', () async { + // TODO + }); + + // View attachment + // + // + // + //Future viewAttachment(int id) async + test('test viewAttachment', () async { + // TODO + }); + + }); +} diff --git a/test/attachments_model_all_of_embedded_elements_inner_test.dart b/test/attachments_model_all_of_embedded_elements_inner_test.dart new file mode 100644 index 0000000..3479c65 --- /dev/null +++ b/test/attachments_model_all_of_embedded_elements_inner_test.dart @@ -0,0 +1,74 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AttachmentsModelAllOfEmbeddedElementsInner +void main() { + // final instance = AttachmentsModelAllOfEmbeddedElementsInner(); + + group('test AttachmentsModelAllOfEmbeddedElementsInner', () { + // Attachment's id + // int id + test('to test the property `id`', () async { + // TODO + }); + + // The name of the file + // String title + test('to test the property `title`', () async { + // TODO + }); + + // The name of the uploaded file + // String fileName + test('to test the property `fileName`', () async { + // TODO + }); + + // The size of the uploaded file in Bytes + // int fileSize + test('to test the property `fileSize`', () async { + // TODO + }); + + // AttachmentModelDescription description + test('to test the property `description`', () async { + // TODO + }); + + // The files MIME-Type as determined by the server + // String contentType + test('to test the property `contentType`', () async { + // TODO + }); + + // A checksum for the files content + // String digest + test('to test the property `digest`', () async { + // TODO + }); + + // Time of creation + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // AttachmentModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/attachments_model_all_of_embedded_test.dart b/test/attachments_model_all_of_embedded_test.dart new file mode 100644 index 0000000..fe4335e --- /dev/null +++ b/test/attachments_model_all_of_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AttachmentsModelAllOfEmbedded +void main() { + // final instance = AttachmentsModelAllOfEmbedded(); + + group('test AttachmentsModelAllOfEmbedded', () { + // List elements (default value: const []) + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/attachments_model_all_of_links_self_test.dart b/test/attachments_model_all_of_links_self_test.dart new file mode 100644 index 0000000..3277e74 --- /dev/null +++ b/test/attachments_model_all_of_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AttachmentsModelAllOfLinksSelf +void main() { + // final instance = AttachmentsModelAllOfLinksSelf(); + + group('test AttachmentsModelAllOfLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/attachments_model_all_of_links_test.dart b/test/attachments_model_all_of_links_test.dart new file mode 100644 index 0000000..4e983dc --- /dev/null +++ b/test/attachments_model_all_of_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AttachmentsModelAllOfLinks +void main() { + // final instance = AttachmentsModelAllOfLinks(); + + group('test AttachmentsModelAllOfLinks', () { + // AttachmentsModelAllOfLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/attachments_model_test.dart b/test/attachments_model_test.dart new file mode 100644 index 0000000..bef2bf7 --- /dev/null +++ b/test/attachments_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AttachmentsModel +void main() { + // final instance = AttachmentsModel(); + + group('test AttachmentsModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // AttachmentsModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // AttachmentsModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/budget_model_links_self_test.dart b/test/budget_model_links_self_test.dart new file mode 100644 index 0000000..4d6cb51 --- /dev/null +++ b/test/budget_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for BudgetModelLinksSelf +void main() { + // final instance = BudgetModelLinksSelf(); + + group('test BudgetModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/budget_model_links_test.dart b/test/budget_model_links_test.dart new file mode 100644 index 0000000..3714710 --- /dev/null +++ b/test/budget_model_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for BudgetModelLinks +void main() { + // final instance = BudgetModelLinks(); + + group('test BudgetModelLinks', () { + // BudgetModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/budget_model_test.dart b/test/budget_model_test.dart new file mode 100644 index 0000000..5deb8f5 --- /dev/null +++ b/test/budget_model_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for BudgetModel +void main() { + // final instance = BudgetModel(); + + group('test BudgetModel', () { + // BudgetModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/budgets_api_test.dart b/test/budgets_api_test.dart new file mode 100644 index 0000000..db83908 --- /dev/null +++ b/test/budgets_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for BudgetsApi +void main() { + // final instance = BudgetsApi(); + + group('tests for BudgetsApi', () { + // view Budget + // + // + // + //Future viewBudget(int id) async + test('test viewBudget', () async { + // TODO + }); + + // view Budgets of a Project + // + // + // + //Future viewBudgetsOfAProject(int id) async + test('test viewBudgetsOfAProject', () async { + // TODO + }); + + }); +} diff --git a/test/categories_api_test.dart b/test/categories_api_test.dart new file mode 100644 index 0000000..78c1d70 --- /dev/null +++ b/test/categories_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for CategoriesApi +void main() { + // final instance = CategoriesApi(); + + group('tests for CategoriesApi', () { + // List categories of a project + // + // + // + //Future listCategoriesOfAProject(int id) async + test('test listCategoriesOfAProject', () async { + // TODO + }); + + // View Category + // + // + // + //Future viewCategory(int id) async + test('test viewCategory', () async { + // TODO + }); + + }); +} diff --git a/test/category_model_links_default_assignee_test.dart b/test/category_model_links_default_assignee_test.dart new file mode 100644 index 0000000..0797442 --- /dev/null +++ b/test/category_model_links_default_assignee_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CategoryModelLinksDefaultAssignee +void main() { + // final instance = CategoryModelLinksDefaultAssignee(); + + group('test CategoryModelLinksDefaultAssignee', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/category_model_links_project_test.dart b/test/category_model_links_project_test.dart new file mode 100644 index 0000000..505c5da --- /dev/null +++ b/test/category_model_links_project_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CategoryModelLinksProject +void main() { + // final instance = CategoryModelLinksProject(); + + group('test CategoryModelLinksProject', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/category_model_links_self_test.dart b/test/category_model_links_self_test.dart new file mode 100644 index 0000000..ef5714b --- /dev/null +++ b/test/category_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CategoryModelLinksSelf +void main() { + // final instance = CategoryModelLinksSelf(); + + group('test CategoryModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/category_model_links_test.dart b/test/category_model_links_test.dart new file mode 100644 index 0000000..2accd58 --- /dev/null +++ b/test/category_model_links_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CategoryModelLinks +void main() { + // final instance = CategoryModelLinks(); + + group('test CategoryModelLinks', () { + // CategoryModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // CategoryModelLinksProject project + test('to test the property `project`', () async { + // TODO + }); + + // CategoryModelLinksDefaultAssignee defaultAssignee + test('to test the property `defaultAssignee`', () async { + // TODO + }); + + + }); + +} diff --git a/test/category_model_test.dart b/test/category_model_test.dart new file mode 100644 index 0000000..1bde1e2 --- /dev/null +++ b/test/category_model_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CategoryModel +void main() { + // final instance = CategoryModel(); + + group('test CategoryModel', () { + // Category id + // int id + test('to test the property `id`', () async { + // TODO + }); + + // Category name + // String name + test('to test the property `name`', () async { + // TODO + }); + + // CategoryModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/collection_model_links_self_test.dart b/test/collection_model_links_self_test.dart new file mode 100644 index 0000000..c46a196 --- /dev/null +++ b/test/collection_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CollectionModelLinksSelf +void main() { + // final instance = CollectionModelLinksSelf(); + + group('test CollectionModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/collection_model_links_test.dart b/test/collection_model_links_test.dart new file mode 100644 index 0000000..0e078b3 --- /dev/null +++ b/test/collection_model_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CollectionModelLinks +void main() { + // final instance = CollectionModelLinks(); + + group('test CollectionModelLinks', () { + // CollectionModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/collection_model_test.dart b/test/collection_model_test.dart new file mode 100644 index 0000000..498dd5a --- /dev/null +++ b/test/collection_model_test.dart @@ -0,0 +1,44 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CollectionModel +void main() { + // final instance = CollectionModel(); + + group('test CollectionModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // CollectionModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/collections_api_test.dart b/test/collections_api_test.dart new file mode 100644 index 0000000..bc9bc47 --- /dev/null +++ b/test/collections_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for CollectionsApi +void main() { + // final instance = CollectionsApi(); + + group('tests for CollectionsApi', () { + // view aggregated result + // + // + // + //Future viewAggregatedResult({ String groupBy, bool showSums }) async + test('test viewAggregatedResult', () async { + // TODO + }); + + }); +} diff --git a/test/comment_work_package_request_test.dart b/test/comment_work_package_request_test.dart new file mode 100644 index 0000000..088acdf --- /dev/null +++ b/test/comment_work_package_request_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CommentWorkPackageRequest +void main() { + // final instance = CommentWorkPackageRequest(); + + group('test CommentWorkPackageRequest', () { + // UpdateActivityRequestComment comment + test('to test the property `comment`', () async { + // TODO + }); + + + }); + +} diff --git a/test/configuration_api_test.dart b/test/configuration_api_test.dart new file mode 100644 index 0000000..f00dc30 --- /dev/null +++ b/test/configuration_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for ConfigurationApi +void main() { + // final instance = ConfigurationApi(); + + group('tests for ConfigurationApi', () { + // View configuration + // + // + // + //Future viewConfiguration() async + test('test viewConfiguration', () async { + // TODO + }); + + }); +} diff --git a/test/configuration_model_test.dart b/test/configuration_model_test.dart new file mode 100644 index 0000000..897067a --- /dev/null +++ b/test/configuration_model_test.dart @@ -0,0 +1,44 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ConfigurationModel +void main() { + // final instance = ConfigurationModel(); + + group('test ConfigurationModel', () { + // The maximum allowed size of an attachment in Bytes + // int maximumAttachmentFileSize + test('to test the property `maximumAttachmentFileSize`', () async { + // TODO + }); + + // The host name configured for the system + // String hostName + test('to test the property `hostName`', () async { + // TODO + }); + + // List perPageOptions (default value: const []) + test('to test the property `perPageOptions`', () async { + // TODO + }); + + // List activeFeatureFlags (default value: const []) + test('to test the property `activeFeatureFlags`', () async { + // TODO + }); + + + }); + +} diff --git a/test/create_views_request_links_query_test.dart b/test/create_views_request_links_query_test.dart new file mode 100644 index 0000000..28f17a2 --- /dev/null +++ b/test/create_views_request_links_query_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CreateViewsRequestLinksQuery +void main() { + // final instance = CreateViewsRequestLinksQuery(); + + group('test CreateViewsRequestLinksQuery', () { + // String href + test('to test the property `href`', () async { + // TODO + }); + + + }); + +} diff --git a/test/create_views_request_links_test.dart b/test/create_views_request_links_test.dart new file mode 100644 index 0000000..bf11cbf --- /dev/null +++ b/test/create_views_request_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CreateViewsRequestLinks +void main() { + // final instance = CreateViewsRequestLinks(); + + group('test CreateViewsRequestLinks', () { + // CreateViewsRequestLinksQuery query + test('to test the property `query`', () async { + // TODO + }); + + + }); + +} diff --git a/test/create_views_request_test.dart b/test/create_views_request_test.dart new file mode 100644 index 0000000..e13dd6b --- /dev/null +++ b/test/create_views_request_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CreateViewsRequest +void main() { + // final instance = CreateViewsRequest(); + + group('test CreateViewsRequest', () { + // CreateViewsRequestLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/custom_action_model_links_execute_immediately_test.dart b/test/custom_action_model_links_execute_immediately_test.dart new file mode 100644 index 0000000..c4932f4 --- /dev/null +++ b/test/custom_action_model_links_execute_immediately_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CustomActionModelLinksExecuteImmediately +void main() { + // final instance = CustomActionModelLinksExecuteImmediately(); + + group('test CustomActionModelLinksExecuteImmediately', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/custom_action_model_links_self_test.dart b/test/custom_action_model_links_self_test.dart new file mode 100644 index 0000000..46d5b0f --- /dev/null +++ b/test/custom_action_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CustomActionModelLinksSelf +void main() { + // final instance = CustomActionModelLinksSelf(); + + group('test CustomActionModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/custom_action_model_links_test.dart b/test/custom_action_model_links_test.dart new file mode 100644 index 0000000..0f69dc3 --- /dev/null +++ b/test/custom_action_model_links_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CustomActionModelLinks +void main() { + // final instance = CustomActionModelLinks(); + + group('test CustomActionModelLinks', () { + // CustomActionModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // CustomActionModelLinksExecuteImmediately executeImmediately + test('to test the property `executeImmediately`', () async { + // TODO + }); + + + }); + +} diff --git a/test/custom_action_model_test.dart b/test/custom_action_model_test.dart new file mode 100644 index 0000000..472c440 --- /dev/null +++ b/test/custom_action_model_test.dart @@ -0,0 +1,44 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CustomActionModel +void main() { + // final instance = CustomActionModel(); + + group('test CustomActionModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The name of the custom action + // String name + test('to test the property `name`', () async { + // TODO + }); + + // The description for the custom action + // String description + test('to test the property `description`', () async { + // TODO + }); + + // CustomActionModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/custom_actions_api_test.dart b/test/custom_actions_api_test.dart new file mode 100644 index 0000000..2a71878 --- /dev/null +++ b/test/custom_actions_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for CustomActionsApi +void main() { + // final instance = CustomActionsApi(); + + group('tests for CustomActionsApi', () { + // Execute custom action + // + // A POST to this end point executes the custom action on the work package provided in the payload. The altered work package will be returned. In order to avoid executing the custom action unbeknown to a change that has already taken place, the client has to provide the work package's current lockVersion. + // + //Future executeCustomAction(int id, { ExecuteCustomActionRequest executeCustomActionRequest }) async + test('test executeCustomAction', () async { + // TODO + }); + + // Get a custom action + // + // Retrieves a custom action by id. + // + //Future getCustomAction(int id) async + test('test getCustomAction', () async { + // TODO + }); + + }); +} diff --git a/test/custom_option_model_links_self_test.dart b/test/custom_option_model_links_self_test.dart new file mode 100644 index 0000000..d0e3dae --- /dev/null +++ b/test/custom_option_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CustomOptionModelLinksSelf +void main() { + // final instance = CustomOptionModelLinksSelf(); + + group('test CustomOptionModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/custom_option_model_links_test.dart b/test/custom_option_model_links_test.dart new file mode 100644 index 0000000..1fb40d5 --- /dev/null +++ b/test/custom_option_model_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CustomOptionModelLinks +void main() { + // final instance = CustomOptionModelLinks(); + + group('test CustomOptionModelLinks', () { + // CustomOptionModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/custom_option_model_test.dart b/test/custom_option_model_test.dart new file mode 100644 index 0000000..55f7ad5 --- /dev/null +++ b/test/custom_option_model_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for CustomOptionModel +void main() { + // final instance = CustomOptionModel(); + + group('test CustomOptionModel', () { + // The identifier + // int id + test('to test the property `id`', () async { + // TODO + }); + + // The value defined for this custom option + // String value + test('to test the property `value`', () async { + // TODO + }); + + // CustomOptionModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/custom_options_api_test.dart b/test/custom_options_api_test.dart new file mode 100644 index 0000000..fb75217 --- /dev/null +++ b/test/custom_options_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for CustomOptionsApi +void main() { + // final instance = CustomOptionsApi(); + + group('tests for CustomOptionsApi', () { + // View Custom Option + // + // + // + //Future viewCustomOption(int id) async + test('test viewCustomOption', () async { + // TODO + }); + + }); +} diff --git a/test/day_collection_model_all_of_embedded_test.dart b/test/day_collection_model_all_of_embedded_test.dart new file mode 100644 index 0000000..ec76bb6 --- /dev/null +++ b/test/day_collection_model_all_of_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for DayCollectionModelAllOfEmbedded +void main() { + // final instance = DayCollectionModelAllOfEmbedded(); + + group('test DayCollectionModelAllOfEmbedded', () { + // List elements (default value: const []) + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/day_collection_model_all_of_links_self_test.dart b/test/day_collection_model_all_of_links_self_test.dart new file mode 100644 index 0000000..7f1747d --- /dev/null +++ b/test/day_collection_model_all_of_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for DayCollectionModelAllOfLinksSelf +void main() { + // final instance = DayCollectionModelAllOfLinksSelf(); + + group('test DayCollectionModelAllOfLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/day_collection_model_all_of_links_test.dart b/test/day_collection_model_all_of_links_test.dart new file mode 100644 index 0000000..c179c03 --- /dev/null +++ b/test/day_collection_model_all_of_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for DayCollectionModelAllOfLinks +void main() { + // final instance = DayCollectionModelAllOfLinks(); + + group('test DayCollectionModelAllOfLinks', () { + // DayCollectionModelAllOfLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/day_collection_model_test.dart b/test/day_collection_model_test.dart new file mode 100644 index 0000000..e8e4576 --- /dev/null +++ b/test/day_collection_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for DayCollectionModel +void main() { + // final instance = DayCollectionModel(); + + group('test DayCollectionModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // DayCollectionModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // DayCollectionModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/day_model_links_test.dart b/test/day_model_links_test.dart new file mode 100644 index 0000000..5bb97ca --- /dev/null +++ b/test/day_model_links_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for DayModelLinks +void main() { + // final instance = DayModelLinks(); + + group('test DayModelLinks', () { + // Link self + test('to test the property `self`', () async { + // TODO + }); + + // List nonWorkingReasons (default value: const []) + test('to test the property `nonWorkingReasons`', () async { + // TODO + }); + + // DayModelLinksWeekDay weekDay + test('to test the property `weekDay`', () async { + // TODO + }); + + + }); + +} diff --git a/test/day_model_links_week_day_test.dart b/test/day_model_links_week_day_test.dart new file mode 100644 index 0000000..3a58968 --- /dev/null +++ b/test/day_model_links_week_day_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for DayModelLinksWeekDay +void main() { + // final instance = DayModelLinksWeekDay(); + + group('test DayModelLinksWeekDay', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/day_model_test.dart b/test/day_model_test.dart new file mode 100644 index 0000000..8850cbe --- /dev/null +++ b/test/day_model_test.dart @@ -0,0 +1,50 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for DayModel +void main() { + // final instance = DayModel(); + + group('test DayModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // Date of the day. + // DateTime date + test('to test the property `date`', () async { + // TODO + }); + + // Descriptive name for the day. + // String name + test('to test the property `name`', () async { + // TODO + }); + + // `true` for a working day, `false` otherwise. + // bool working + test('to test the property `working`', () async { + // TODO + }); + + // DayModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/document_model_links_attachments_test.dart b/test/document_model_links_attachments_test.dart new file mode 100644 index 0000000..e923a11 --- /dev/null +++ b/test/document_model_links_attachments_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for DocumentModelLinksAttachments +void main() { + // final instance = DocumentModelLinksAttachments(); + + group('test DocumentModelLinksAttachments', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/document_model_links_project_test.dart b/test/document_model_links_project_test.dart new file mode 100644 index 0000000..82b80fb --- /dev/null +++ b/test/document_model_links_project_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for DocumentModelLinksProject +void main() { + // final instance = DocumentModelLinksProject(); + + group('test DocumentModelLinksProject', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/document_model_links_self_test.dart b/test/document_model_links_self_test.dart new file mode 100644 index 0000000..a44168a --- /dev/null +++ b/test/document_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for DocumentModelLinksSelf +void main() { + // final instance = DocumentModelLinksSelf(); + + group('test DocumentModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/document_model_links_test.dart b/test/document_model_links_test.dart new file mode 100644 index 0000000..925dfae --- /dev/null +++ b/test/document_model_links_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for DocumentModelLinks +void main() { + // final instance = DocumentModelLinks(); + + group('test DocumentModelLinks', () { + // DocumentModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // DocumentModelLinksProject project + test('to test the property `project`', () async { + // TODO + }); + + // DocumentModelLinksAttachments attachments + test('to test the property `attachments`', () async { + // TODO + }); + + + }); + +} diff --git a/test/document_model_test.dart b/test/document_model_test.dart new file mode 100644 index 0000000..a3220e0 --- /dev/null +++ b/test/document_model_test.dart @@ -0,0 +1,51 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for DocumentModel +void main() { + // final instance = DocumentModel(); + + group('test DocumentModel', () { + // Document's id + // int id + test('to test the property `id`', () async { + // TODO + }); + + // The title chosen for the collection of documents + // String title + test('to test the property `title`', () async { + // TODO + }); + + // A text describing the documents + // String description + test('to test the property `description`', () async { + // TODO + }); + + // The time the document was created at + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // DocumentModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/documents_api_test.dart b/test/documents_api_test.dart new file mode 100644 index 0000000..c784265 --- /dev/null +++ b/test/documents_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for DocumentsApi +void main() { + // final instance = DocumentsApi(); + + group('tests for DocumentsApi', () { + // List Documents + // + // The documents returned depend on the provided parameters and also on the requesting user's permissions. + // + //Future listDocuments({ int offset, int pageSize, String sortBy }) async + test('test listDocuments', () async { + // TODO + }); + + // View document + // + // + // + //Future viewDocument(int id) async + test('test viewDocument', () async { + // TODO + }); + + }); +} diff --git a/test/error_response_embedded_details_test.dart b/test/error_response_embedded_details_test.dart new file mode 100644 index 0000000..617db24 --- /dev/null +++ b/test/error_response_embedded_details_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ErrorResponseEmbeddedDetails +void main() { + // final instance = ErrorResponseEmbeddedDetails(); + + group('test ErrorResponseEmbeddedDetails', () { + // String attribute + test('to test the property `attribute`', () async { + // TODO + }); + + + }); + +} diff --git a/test/error_response_embedded_test.dart b/test/error_response_embedded_test.dart new file mode 100644 index 0000000..b6b8aba --- /dev/null +++ b/test/error_response_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ErrorResponseEmbedded +void main() { + // final instance = ErrorResponseEmbedded(); + + group('test ErrorResponseEmbedded', () { + // ErrorResponseEmbeddedDetails details + test('to test the property `details`', () async { + // TODO + }); + + + }); + +} diff --git a/test/error_response_test.dart b/test/error_response_test.dart new file mode 100644 index 0000000..af41632 --- /dev/null +++ b/test/error_response_test.dart @@ -0,0 +1,42 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ErrorResponse +void main() { + // final instance = ErrorResponse(); + + group('test ErrorResponse', () { + // ErrorResponseEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + // String type + test('to test the property `type`', () async { + // TODO + }); + + // String errorIdentifier + test('to test the property `errorIdentifier`', () async { + // TODO + }); + + // String message + test('to test the property `message`', () async { + // TODO + }); + + + }); + +} diff --git a/test/execute_custom_action_request_links_test.dart b/test/execute_custom_action_request_links_test.dart new file mode 100644 index 0000000..172120f --- /dev/null +++ b/test/execute_custom_action_request_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ExecuteCustomActionRequestLinks +void main() { + // final instance = ExecuteCustomActionRequestLinks(); + + group('test ExecuteCustomActionRequestLinks', () { + // ExecuteCustomActionRequestLinksWorkPackage workPackage + test('to test the property `workPackage`', () async { + // TODO + }); + + + }); + +} diff --git a/test/execute_custom_action_request_links_work_package_test.dart b/test/execute_custom_action_request_links_work_package_test.dart new file mode 100644 index 0000000..3a4378b --- /dev/null +++ b/test/execute_custom_action_request_links_work_package_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ExecuteCustomActionRequestLinksWorkPackage +void main() { + // final instance = ExecuteCustomActionRequestLinksWorkPackage(); + + group('test ExecuteCustomActionRequestLinksWorkPackage', () { + // String href + test('to test the property `href`', () async { + // TODO + }); + + + }); + +} diff --git a/test/execute_custom_action_request_test.dart b/test/execute_custom_action_request_test.dart new file mode 100644 index 0000000..b7cda46 --- /dev/null +++ b/test/execute_custom_action_request_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ExecuteCustomActionRequest +void main() { + // final instance = ExecuteCustomActionRequest(); + + group('test ExecuteCustomActionRequest', () { + // ExecuteCustomActionRequestLinks links + test('to test the property `links`', () async { + // TODO + }); + + // String lockVersion + test('to test the property `lockVersion`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_collection_read_model_all_of_embedded_test.dart b/test/file_link_collection_read_model_all_of_embedded_test.dart new file mode 100644 index 0000000..39fe75f --- /dev/null +++ b/test/file_link_collection_read_model_all_of_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkCollectionReadModelAllOfEmbedded +void main() { + // final instance = FileLinkCollectionReadModelAllOfEmbedded(); + + group('test FileLinkCollectionReadModelAllOfEmbedded', () { + // List elements (default value: const []) + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_collection_read_model_all_of_links_self_test.dart b/test/file_link_collection_read_model_all_of_links_self_test.dart new file mode 100644 index 0000000..dbf9713 --- /dev/null +++ b/test/file_link_collection_read_model_all_of_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkCollectionReadModelAllOfLinksSelf +void main() { + // final instance = FileLinkCollectionReadModelAllOfLinksSelf(); + + group('test FileLinkCollectionReadModelAllOfLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_collection_read_model_all_of_links_test.dart b/test/file_link_collection_read_model_all_of_links_test.dart new file mode 100644 index 0000000..5cfadcd --- /dev/null +++ b/test/file_link_collection_read_model_all_of_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkCollectionReadModelAllOfLinks +void main() { + // final instance = FileLinkCollectionReadModelAllOfLinks(); + + group('test FileLinkCollectionReadModelAllOfLinks', () { + // FileLinkCollectionReadModelAllOfLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_collection_read_model_test.dart b/test/file_link_collection_read_model_test.dart new file mode 100644 index 0000000..b739052 --- /dev/null +++ b/test/file_link_collection_read_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkCollectionReadModel +void main() { + // final instance = FileLinkCollectionReadModel(); + + group('test FileLinkCollectionReadModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // FileLinkCollectionReadModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // FileLinkCollectionReadModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_collection_write_model_all_of_embedded_test.dart b/test/file_link_collection_write_model_all_of_embedded_test.dart new file mode 100644 index 0000000..f6c33e0 --- /dev/null +++ b/test/file_link_collection_write_model_all_of_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkCollectionWriteModelAllOfEmbedded +void main() { + // final instance = FileLinkCollectionWriteModelAllOfEmbedded(); + + group('test FileLinkCollectionWriteModelAllOfEmbedded', () { + // List elements (default value: const []) + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_collection_write_model_test.dart b/test/file_link_collection_write_model_test.dart new file mode 100644 index 0000000..59c70c2 --- /dev/null +++ b/test/file_link_collection_write_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkCollectionWriteModel +void main() { + // final instance = FileLinkCollectionWriteModel(); + + group('test FileLinkCollectionWriteModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // CollectionModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + // FileLinkCollectionWriteModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_origin_data_model_test.dart b/test/file_link_origin_data_model_test.dart new file mode 100644 index 0000000..7aabc05 --- /dev/null +++ b/test/file_link_origin_data_model_test.dart @@ -0,0 +1,70 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkOriginDataModel +void main() { + // final instance = FileLinkOriginDataModel(); + + group('test FileLinkOriginDataModel', () { + // Linked file's id on the origin + // String id + test('to test the property `id`', () async { + // TODO + }); + + // Linked file's name on the origin + // String name + test('to test the property `name`', () async { + // TODO + }); + + // MIME type of the linked file. To link a folder entity, the custom MIME type `application/x-op-directory` MUST be provided. Otherwise it defaults back to an unknown MIME type. + // String mimeType + test('to test the property `mimeType`', () async { + // TODO + }); + + // file size on origin in bytes + // int size + test('to test the property `size`', () async { + // TODO + }); + + // Timestamp of the creation datetime of the file on the origin + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Timestamp of the datetime of the last modification of the file on the origin + // DateTime lastModifiedAt + test('to test the property `lastModifiedAt`', () async { + // TODO + }); + + // Display name of the author that created the file on the origin + // String createdByName + test('to test the property `createdByName`', () async { + // TODO + }); + + // Display name of the author that modified the file on the origin last + // String lastModifiedByName + test('to test the property `lastModifiedByName`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_read_model_embedded_test.dart b/test/file_link_read_model_embedded_test.dart new file mode 100644 index 0000000..0c1ab21 --- /dev/null +++ b/test/file_link_read_model_embedded_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkReadModelEmbedded +void main() { + // final instance = FileLinkReadModelEmbedded(); + + group('test FileLinkReadModelEmbedded', () { + // StorageReadModel storage + test('to test the property `storage`', () async { + // TODO + }); + + // WorkPackageModel container + test('to test the property `container`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_read_model_links_container_test.dart b/test/file_link_read_model_links_container_test.dart new file mode 100644 index 0000000..21e4543 --- /dev/null +++ b/test/file_link_read_model_links_container_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkReadModelLinksContainer +void main() { + // final instance = FileLinkReadModelLinksContainer(); + + group('test FileLinkReadModelLinksContainer', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_read_model_links_creator_test.dart b/test/file_link_read_model_links_creator_test.dart new file mode 100644 index 0000000..e5b00ec --- /dev/null +++ b/test/file_link_read_model_links_creator_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkReadModelLinksCreator +void main() { + // final instance = FileLinkReadModelLinksCreator(); + + group('test FileLinkReadModelLinksCreator', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_read_model_links_delete_test.dart b/test/file_link_read_model_links_delete_test.dart new file mode 100644 index 0000000..bf85b13 --- /dev/null +++ b/test/file_link_read_model_links_delete_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkReadModelLinksDelete +void main() { + // final instance = FileLinkReadModelLinksDelete(); + + group('test FileLinkReadModelLinksDelete', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_read_model_links_origin_open_location_test.dart b/test/file_link_read_model_links_origin_open_location_test.dart new file mode 100644 index 0000000..85ce412 --- /dev/null +++ b/test/file_link_read_model_links_origin_open_location_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkReadModelLinksOriginOpenLocation +void main() { + // final instance = FileLinkReadModelLinksOriginOpenLocation(); + + group('test FileLinkReadModelLinksOriginOpenLocation', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_read_model_links_origin_open_test.dart b/test/file_link_read_model_links_origin_open_test.dart new file mode 100644 index 0000000..78ba2e8 --- /dev/null +++ b/test/file_link_read_model_links_origin_open_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkReadModelLinksOriginOpen +void main() { + // final instance = FileLinkReadModelLinksOriginOpen(); + + group('test FileLinkReadModelLinksOriginOpen', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_read_model_links_permission_test.dart b/test/file_link_read_model_links_permission_test.dart new file mode 100644 index 0000000..497ee57 --- /dev/null +++ b/test/file_link_read_model_links_permission_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkReadModelLinksPermission +void main() { + // final instance = FileLinkReadModelLinksPermission(); + + group('test FileLinkReadModelLinksPermission', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_read_model_links_self_test.dart b/test/file_link_read_model_links_self_test.dart new file mode 100644 index 0000000..f386988 --- /dev/null +++ b/test/file_link_read_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkReadModelLinksSelf +void main() { + // final instance = FileLinkReadModelLinksSelf(); + + group('test FileLinkReadModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_read_model_links_static_origin_download_test.dart b/test/file_link_read_model_links_static_origin_download_test.dart new file mode 100644 index 0000000..45c772f --- /dev/null +++ b/test/file_link_read_model_links_static_origin_download_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkReadModelLinksStaticOriginDownload +void main() { + // final instance = FileLinkReadModelLinksStaticOriginDownload(); + + group('test FileLinkReadModelLinksStaticOriginDownload', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_read_model_links_static_origin_open_location_test.dart b/test/file_link_read_model_links_static_origin_open_location_test.dart new file mode 100644 index 0000000..287c06d --- /dev/null +++ b/test/file_link_read_model_links_static_origin_open_location_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkReadModelLinksStaticOriginOpenLocation +void main() { + // final instance = FileLinkReadModelLinksStaticOriginOpenLocation(); + + group('test FileLinkReadModelLinksStaticOriginOpenLocation', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_read_model_links_static_origin_open_test.dart b/test/file_link_read_model_links_static_origin_open_test.dart new file mode 100644 index 0000000..7941293 --- /dev/null +++ b/test/file_link_read_model_links_static_origin_open_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkReadModelLinksStaticOriginOpen +void main() { + // final instance = FileLinkReadModelLinksStaticOriginOpen(); + + group('test FileLinkReadModelLinksStaticOriginOpen', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_read_model_links_storage_test.dart b/test/file_link_read_model_links_storage_test.dart new file mode 100644 index 0000000..45a698f --- /dev/null +++ b/test/file_link_read_model_links_storage_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkReadModelLinksStorage +void main() { + // final instance = FileLinkReadModelLinksStorage(); + + group('test FileLinkReadModelLinksStorage', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_read_model_links_test.dart b/test/file_link_read_model_links_test.dart new file mode 100644 index 0000000..38c38fa --- /dev/null +++ b/test/file_link_read_model_links_test.dart @@ -0,0 +1,77 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkReadModelLinks +void main() { + // final instance = FileLinkReadModelLinks(); + + group('test FileLinkReadModelLinks', () { + // FileLinkReadModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // FileLinkReadModelLinksStorage storage + test('to test the property `storage`', () async { + // TODO + }); + + // FileLinkReadModelLinksContainer container + test('to test the property `container`', () async { + // TODO + }); + + // FileLinkReadModelLinksCreator creator + test('to test the property `creator`', () async { + // TODO + }); + + // FileLinkReadModelLinksDelete delete + test('to test the property `delete`', () async { + // TODO + }); + + // FileLinkReadModelLinksPermission permission + test('to test the property `permission`', () async { + // TODO + }); + + // FileLinkReadModelLinksOriginOpen originOpen + test('to test the property `originOpen`', () async { + // TODO + }); + + // FileLinkReadModelLinksStaticOriginOpen staticOriginOpen + test('to test the property `staticOriginOpen`', () async { + // TODO + }); + + // FileLinkReadModelLinksOriginOpenLocation originOpenLocation + test('to test the property `originOpenLocation`', () async { + // TODO + }); + + // FileLinkReadModelLinksStaticOriginOpenLocation staticOriginOpenLocation + test('to test the property `staticOriginOpenLocation`', () async { + // TODO + }); + + // FileLinkReadModelLinksStaticOriginDownload staticOriginDownload + test('to test the property `staticOriginDownload`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_read_model_test.dart b/test/file_link_read_model_test.dart new file mode 100644 index 0000000..ca81fad --- /dev/null +++ b/test/file_link_read_model_test.dart @@ -0,0 +1,60 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkReadModel +void main() { + // final instance = FileLinkReadModel(); + + group('test FileLinkReadModel', () { + // File link id + // int id + test('to test the property `id`', () async { + // TODO + }); + + // String type + test('to test the property `type`', () async { + // TODO + }); + + // Time of creation + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Time of the most recent change to the file link + // DateTime updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // FileLinkOriginDataModel originData + test('to test the property `originData`', () async { + // TODO + }); + + // FileLinkReadModelEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + // FileLinkReadModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_link_write_model_test.dart b/test/file_link_write_model_test.dart new file mode 100644 index 0000000..bbd510a --- /dev/null +++ b/test/file_link_write_model_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileLinkWriteModel +void main() { + // final instance = FileLinkWriteModel(); + + group('test FileLinkWriteModel', () { + // FileLinkOriginDataModel originData + test('to test the property `originData`', () async { + // TODO + }); + + + }); + +} diff --git a/test/file_links_api_test.dart b/test/file_links_api_test.dart new file mode 100644 index 0000000..18e1532 --- /dev/null +++ b/test/file_links_api_test.dart @@ -0,0 +1,156 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for FileLinksApi +void main() { + // final instance = FileLinksApi(); + + group('tests for FileLinksApi', () { + // Creates a storage. + // + // Creates a storage resource. When creating a storage, a confidential OAuth 2 provider application is created automatically. The oauth client id and secret of the created OAuth application are returned in the response. **IMPORTANT:** This is the only time, the oauth client secret is visible to the consumer. After that, the secret is hidden. To update the storage with OAuth client credentials, which enable the storage resource to behave as an OAuth 2 client against an external OAuth 2 provider application, another request must be made to create those, see `POST /api/v3/storages/{id}/oauth_client_credentials`. + // + //Future createStorage({ StorageWriteModel storageWriteModel }) async + test('test createStorage', () async { + // TODO + }); + + // Creates an oauth client credentials object for a storage. + // + // Inserts the OAuth 2 credentials into the storage, to allow the storage to act as an OAuth 2 client. Calling this endpoint on a storage that already contains OAuth 2 client credentials will replace them. + // + //Future createStorageOauthCredentials(int id, { OAuthClientCredentialsWriteModel oAuthClientCredentialsWriteModel }) async + test('test createStorageOauthCredentials', () async { + // TODO + }); + + // Creates file links. + // + // Creates file links on a work package. The request is interpreted as a bulk insert, where every element of the collection is validated separately. Each element contains the origin meta data and a link to the storage, the file link is about to point to. The storage link can be provided as a resource link with id or as the host url. The file's id and name are considered mandatory information. The rest of the origin meta data SHOULD be provided by the client. The _mimeType_ SHOULD be a standard mime type. An empty mime type will be handled as unknown. To link a folder, the custom mime type `application/x-op-directory` MUST be used. Up to 20 file links can be submitted at once. If any element data is invalid, no file links will be created. If a file link with matching origin id, work package, and storage already exists, then it will not create an additional file link or update the meta data. Instead the information from the existing file link will be returned. + // + //Future createWorkPackageFileLink(int id, { FileLinkCollectionWriteModel fileLinkCollectionWriteModel }) async + test('test createWorkPackageFileLink', () async { + // TODO + }); + + // Removes a file link. + // + // Removes a file link on a work package. The request contains only the file link identifier as a path parameter. No request body is needed. + // + //Future deleteFileLink(int id) async + test('test deleteFileLink', () async { + // TODO + }); + + // Delete a storage + // + // Deletes a storage resource. This also deletes all related records, like the created oauth application, client, and any file links created within this storage. + // + //Future deleteStorage(int id) async + test('test deleteStorage', () async { + // TODO + }); + + // Creates a download uri of the linked file. + // + // Creates a uri to download the origin file linked by the given file link. This uri depends on the storage type and is always located on the origin storage itself. + // + //Future downloadFileLink(int id) async + test('test downloadFileLink', () async { + // TODO + }); + + // Gets a project storage + // + // Gets a project storage resource. This resource contains all data that is applicable on the relation between a storage and a project. + // + //Future getProjectStorage(int id) async + test('test getProjectStorage', () async { + // TODO + }); + + // Get a storage + // + // Gets a storage resource. As a side effect, a live connection to the storages origin is established to retrieve connection state data. + // + //Future getStorage(int id) async + test('test getStorage', () async { + // TODO + }); + + // Gets files of a storage. + // + // Gets a collection of files from a storage. If no `parent` context is given, the result is the content of the document root. With `parent` context given, the result contains the collections of files/directories from within the given parent file id. If given `parent` context is no directory, `400 Bad Request` is returned. + // + //Future getStorageFiles(int id, { String parent }) async + test('test getStorageFiles', () async { + // TODO + }); + + // Gets a list of project storages + // + // Gets a collection of all project storages that meet the provided filters and the user has permission to see them. + // + //Future listProjectStorages({ String filters }) async + test('test listProjectStorages', () async { + // TODO + }); + + // Gets all file links of a work package + // + // Gets all file links of a work package. As a side effect, for every file link a request is sent to the storage's origin to fetch live data and patch the file link's data before returning, as well as retrieving permissions of the user on this origin file. + // + //Future listWorkPackageFileLinks(int id, { String filters }) async + test('test listWorkPackageFileLinks', () async { + // TODO + }); + + // Creates an opening uri of the linked file. + // + // Creates a uri to open the origin file linked by the given file link. This uri depends on the storage type and is always located on the origin storage itself. + // + //Future openFileLink(int id, { bool location }) async + test('test openFileLink', () async { + // TODO + }); + + // Preparation of a direct upload of a file to the given storage. + // + // Executes a request that prepares a link for a direct upload to the storage. The background here is, that the client needs to make a direct request to the storage instance for file uploading, but should not get access to the credentials, which are stored in the backend. The response contains a link object, that enables the client to execute a file upload without the real credentials. + // + //Future prepareStorageFileUpload(int id, { StorageFileUploadPreparationModel storageFileUploadPreparationModel }) async + test('test prepareStorageFileUpload', () async { + // TODO + }); + + // Update a storage + // + // Updates a storage resource. Only data that is not generated by the server can be updated. This excludes the OAuth 2 application data. + // + //Future updateStorage(int id, { StorageWriteModel storageWriteModel }) async + test('test updateStorage', () async { + // TODO + }); + + // Gets a file link. + // + // Gets a single file link resource of a work package. + // + //Future viewFileLink(int id) async + test('test viewFileLink', () async { + // TODO + }); + + }); +} diff --git a/test/formattable_test.dart b/test/formattable_test.dart new file mode 100644 index 0000000..6869cc3 --- /dev/null +++ b/test/formattable_test.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for Formattable +void main() { + // final instance = Formattable(); + + group('test Formattable', () { + // Indicates the formatting language of the raw text + // String format + test('to test the property `format`', () async { + // TODO + }); + + // The raw text, as entered by the user + // String raw + test('to test the property `raw`', () async { + // TODO + }); + + // The text converted to HTML according to the format + // String html + test('to test the property `html`', () async { + // TODO + }); + + + }); + +} diff --git a/test/forms_api_test.dart b/test/forms_api_test.dart new file mode 100644 index 0000000..142cb16 --- /dev/null +++ b/test/forms_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for FormsApi +void main() { + // final instance = FormsApi(); + + group('tests for FormsApi', () { + // show or validate form + // + // This is an example of how a form might look like. Note that this endpoint does not exist in the actual implementation. + // + //Future showOrValidateForm({ ShowOrValidateFormRequest showOrValidateFormRequest }) async + test('test showOrValidateForm', () async { + // TODO + }); + + }); +} diff --git a/test/grid_collection_model_all_of_embedded_test.dart b/test/grid_collection_model_all_of_embedded_test.dart new file mode 100644 index 0000000..dbde528 --- /dev/null +++ b/test/grid_collection_model_all_of_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GridCollectionModelAllOfEmbedded +void main() { + // final instance = GridCollectionModelAllOfEmbedded(); + + group('test GridCollectionModelAllOfEmbedded', () { + // List elements (default value: const []) + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/grid_collection_model_test.dart b/test/grid_collection_model_test.dart new file mode 100644 index 0000000..3058b22 --- /dev/null +++ b/test/grid_collection_model_test.dart @@ -0,0 +1,61 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GridCollectionModel +void main() { + // final instance = GridCollectionModel(); + + group('test GridCollectionModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // PaginatedCollectionModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // Amount of elements that a response will hold. + // int pageSize + test('to test the property `pageSize`', () async { + // TODO + }); + + // The page number that is requested from paginated collection. + // int offset + test('to test the property `offset`', () async { + // TODO + }); + + // GridCollectionModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/grid_read_model_links_add_attachment_test.dart b/test/grid_read_model_links_add_attachment_test.dart new file mode 100644 index 0000000..46acaba --- /dev/null +++ b/test/grid_read_model_links_add_attachment_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GridReadModelLinksAddAttachment +void main() { + // final instance = GridReadModelLinksAddAttachment(); + + group('test GridReadModelLinksAddAttachment', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/grid_read_model_links_attachments_test.dart b/test/grid_read_model_links_attachments_test.dart new file mode 100644 index 0000000..71ee041 --- /dev/null +++ b/test/grid_read_model_links_attachments_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GridReadModelLinksAttachments +void main() { + // final instance = GridReadModelLinksAttachments(); + + group('test GridReadModelLinksAttachments', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/grid_read_model_links_delete_test.dart b/test/grid_read_model_links_delete_test.dart new file mode 100644 index 0000000..8c2dba8 --- /dev/null +++ b/test/grid_read_model_links_delete_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GridReadModelLinksDelete +void main() { + // final instance = GridReadModelLinksDelete(); + + group('test GridReadModelLinksDelete', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/grid_read_model_links_scope_test.dart b/test/grid_read_model_links_scope_test.dart new file mode 100644 index 0000000..3797cb4 --- /dev/null +++ b/test/grid_read_model_links_scope_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GridReadModelLinksScope +void main() { + // final instance = GridReadModelLinksScope(); + + group('test GridReadModelLinksScope', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/grid_read_model_links_self_test.dart b/test/grid_read_model_links_self_test.dart new file mode 100644 index 0000000..4e5eac6 --- /dev/null +++ b/test/grid_read_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GridReadModelLinksSelf +void main() { + // final instance = GridReadModelLinksSelf(); + + group('test GridReadModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/grid_read_model_links_test.dart b/test/grid_read_model_links_test.dart new file mode 100644 index 0000000..4256e4d --- /dev/null +++ b/test/grid_read_model_links_test.dart @@ -0,0 +1,57 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GridReadModelLinks +void main() { + // final instance = GridReadModelLinks(); + + group('test GridReadModelLinks', () { + // GridReadModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // GridReadModelLinksAttachments attachments + test('to test the property `attachments`', () async { + // TODO + }); + + // GridReadModelLinksAddAttachment addAttachment + test('to test the property `addAttachment`', () async { + // TODO + }); + + // GridReadModelLinksScope scope + test('to test the property `scope`', () async { + // TODO + }); + + // GridReadModelLinksUpdateImmediately updateImmediately + test('to test the property `updateImmediately`', () async { + // TODO + }); + + // GridReadModelLinksUpdate update + test('to test the property `update`', () async { + // TODO + }); + + // GridReadModelLinksDelete delete + test('to test the property `delete`', () async { + // TODO + }); + + + }); + +} diff --git a/test/grid_read_model_links_update_immediately_test.dart b/test/grid_read_model_links_update_immediately_test.dart new file mode 100644 index 0000000..69a62cf --- /dev/null +++ b/test/grid_read_model_links_update_immediately_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GridReadModelLinksUpdateImmediately +void main() { + // final instance = GridReadModelLinksUpdateImmediately(); + + group('test GridReadModelLinksUpdateImmediately', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/grid_read_model_links_update_test.dart b/test/grid_read_model_links_update_test.dart new file mode 100644 index 0000000..6460a6a --- /dev/null +++ b/test/grid_read_model_links_update_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GridReadModelLinksUpdate +void main() { + // final instance = GridReadModelLinksUpdate(); + + group('test GridReadModelLinksUpdate', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/grid_read_model_test.dart b/test/grid_read_model_test.dart new file mode 100644 index 0000000..5a980eb --- /dev/null +++ b/test/grid_read_model_test.dart @@ -0,0 +1,67 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GridReadModel +void main() { + // final instance = GridReadModel(); + + group('test GridReadModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // Grid's id + // int id + test('to test the property `id`', () async { + // TODO + }); + + // The number of rows the grid has + // int rowCount + test('to test the property `rowCount`', () async { + // TODO + }); + + // The number of columns the grid has + // int columnCount + test('to test the property `columnCount`', () async { + // TODO + }); + + // List widgets (default value: const []) + test('to test the property `widgets`', () async { + // TODO + }); + + // The time the grid was created. + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // The time the grid was last updated. + // DateTime updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // GridReadModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/grid_widget_model_test.dart b/test/grid_widget_model_test.dart new file mode 100644 index 0000000..3148606 --- /dev/null +++ b/test/grid_widget_model_test.dart @@ -0,0 +1,68 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GridWidgetModel +void main() { + // final instance = GridWidgetModel(); + + group('test GridWidgetModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The grid widget's unique identifier. Can be null, if a new widget is created within a grid. + // int id + test('to test the property `id`', () async { + // TODO + }); + + // An alternative, human legible, and unique identifier. + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + // The index of the starting row of the widget. The row is inclusive. + // int startRow + test('to test the property `startRow`', () async { + // TODO + }); + + // The index of the ending row of the widget. The row is exclusive. + // int endRow + test('to test the property `endRow`', () async { + // TODO + }); + + // The index of the starting column of the widget. The column is inclusive. + // int startColumn + test('to test the property `startColumn`', () async { + // TODO + }); + + // The index of the ending column of the widget. The column is exclusive. + // int endColumn + test('to test the property `endColumn`', () async { + // TODO + }); + + // Object options + test('to test the property `options`', () async { + // TODO + }); + + + }); + +} diff --git a/test/grid_write_model_links_test.dart b/test/grid_write_model_links_test.dart new file mode 100644 index 0000000..0658b2c --- /dev/null +++ b/test/grid_write_model_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GridWriteModelLinks +void main() { + // final instance = GridWriteModelLinks(); + + group('test GridWriteModelLinks', () { + // GridReadModelLinksScope scope + test('to test the property `scope`', () async { + // TODO + }); + + + }); + +} diff --git a/test/grid_write_model_test.dart b/test/grid_write_model_test.dart new file mode 100644 index 0000000..905a1c5 --- /dev/null +++ b/test/grid_write_model_test.dart @@ -0,0 +1,44 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GridWriteModel +void main() { + // final instance = GridWriteModel(); + + group('test GridWriteModel', () { + // The number of rows the grid has + // int rowCount + test('to test the property `rowCount`', () async { + // TODO + }); + + // The number of columns the grid has + // int columnCount + test('to test the property `columnCount`', () async { + // TODO + }); + + // List widgets (default value: const []) + test('to test the property `widgets`', () async { + // TODO + }); + + // GridWriteModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/grids_api_test.dart b/test/grids_api_test.dart new file mode 100644 index 0000000..fe01e41 --- /dev/null +++ b/test/grids_api_test.dart @@ -0,0 +1,75 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for GridsApi +void main() { + // final instance = GridsApi(); + + group('tests for GridsApi', () { + // Create a grid + // + // Creates a new grid applying the attributes provided in the body. The constraints applied to the grid depend on the page the grid is placed in which is why the create form end point should be used to be guided when wanting to create a grid. + // + //Future createGrid({ GridWriteModel gridWriteModel }) async + test('test createGrid', () async { + // TODO + }); + + // Get a grid + // + // Fetches a single grid identified by its id. + // + //Future getGrid(int id) async + test('test getGrid', () async { + // TODO + }); + + // Grid Create Form + // + // + // + //Future gridCreateForm() async + test('test gridCreateForm', () async { + // TODO + }); + + // Grid Update Form + // + // + // + //Future gridUpdateForm(int id) async + test('test gridUpdateForm', () async { + // TODO + }); + + // List grids + // + // Lists all grids matching the provided filters and being part of the selected query page. The grids returned will also depend on the permissions of the requesting user. + // + //Future listGrids({ int offset, int pageSize, String filters }) async + test('test listGrids', () async { + // TODO + }); + + // Update a grid + // + // Updates the given grid by applying the attributes provided in the body. The constraints applied to the grid depend on the page the grid is placed in which is why the create form end point should be used to be guided when wanting to update a grid. + // + //Future updateGrid(int id, { GridWriteModel gridWriteModel }) async + test('test updateGrid', () async { + // TODO + }); + + }); +} diff --git a/test/group_collection_model_all_of_embedded_test.dart b/test/group_collection_model_all_of_embedded_test.dart new file mode 100644 index 0000000..75059b5 --- /dev/null +++ b/test/group_collection_model_all_of_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GroupCollectionModelAllOfEmbedded +void main() { + // final instance = GroupCollectionModelAllOfEmbedded(); + + group('test GroupCollectionModelAllOfEmbedded', () { + // List elements (default value: const []) + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/group_collection_model_all_of_links_self_test.dart b/test/group_collection_model_all_of_links_self_test.dart new file mode 100644 index 0000000..9f7f094 --- /dev/null +++ b/test/group_collection_model_all_of_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GroupCollectionModelAllOfLinksSelf +void main() { + // final instance = GroupCollectionModelAllOfLinksSelf(); + + group('test GroupCollectionModelAllOfLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/group_collection_model_all_of_links_test.dart b/test/group_collection_model_all_of_links_test.dart new file mode 100644 index 0000000..203bdff --- /dev/null +++ b/test/group_collection_model_all_of_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GroupCollectionModelAllOfLinks +void main() { + // final instance = GroupCollectionModelAllOfLinks(); + + group('test GroupCollectionModelAllOfLinks', () { + // GroupCollectionModelAllOfLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/group_collection_model_test.dart b/test/group_collection_model_test.dart new file mode 100644 index 0000000..692eee3 --- /dev/null +++ b/test/group_collection_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GroupCollectionModel +void main() { + // final instance = GroupCollectionModel(); + + group('test GroupCollectionModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // GroupCollectionModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // GroupCollectionModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/group_model_links_delete_test.dart b/test/group_model_links_delete_test.dart new file mode 100644 index 0000000..d8c4203 --- /dev/null +++ b/test/group_model_links_delete_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GroupModelLinksDelete +void main() { + // final instance = GroupModelLinksDelete(); + + group('test GroupModelLinksDelete', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/group_model_links_members_inner_test.dart b/test/group_model_links_members_inner_test.dart new file mode 100644 index 0000000..fb0566e --- /dev/null +++ b/test/group_model_links_members_inner_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GroupModelLinksMembersInner +void main() { + // final instance = GroupModelLinksMembersInner(); + + group('test GroupModelLinksMembersInner', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/group_model_links_memberships_test.dart b/test/group_model_links_memberships_test.dart new file mode 100644 index 0000000..f597925 --- /dev/null +++ b/test/group_model_links_memberships_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GroupModelLinksMemberships +void main() { + // final instance = GroupModelLinksMemberships(); + + group('test GroupModelLinksMemberships', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/group_model_links_self_test.dart b/test/group_model_links_self_test.dart new file mode 100644 index 0000000..037437b --- /dev/null +++ b/test/group_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GroupModelLinksSelf +void main() { + // final instance = GroupModelLinksSelf(); + + group('test GroupModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/group_model_links_test.dart b/test/group_model_links_test.dart new file mode 100644 index 0000000..0951c90 --- /dev/null +++ b/test/group_model_links_test.dart @@ -0,0 +1,47 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GroupModelLinks +void main() { + // final instance = GroupModelLinks(); + + group('test GroupModelLinks', () { + // GroupModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // GroupModelLinksDelete delete + test('to test the property `delete`', () async { + // TODO + }); + + // GroupModelLinksUpdateImmediately updateImmediately + test('to test the property `updateImmediately`', () async { + // TODO + }); + + // GroupModelLinksMemberships memberships + test('to test the property `memberships`', () async { + // TODO + }); + + // List members (default value: const []) + test('to test the property `members`', () async { + // TODO + }); + + + }); + +} diff --git a/test/group_model_links_update_immediately_test.dart b/test/group_model_links_update_immediately_test.dart new file mode 100644 index 0000000..aa51f77 --- /dev/null +++ b/test/group_model_links_update_immediately_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GroupModelLinksUpdateImmediately +void main() { + // final instance = GroupModelLinksUpdateImmediately(); + + group('test GroupModelLinksUpdateImmediately', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/group_model_test.dart b/test/group_model_test.dart new file mode 100644 index 0000000..a812df0 --- /dev/null +++ b/test/group_model_test.dart @@ -0,0 +1,51 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GroupModel +void main() { + // final instance = GroupModel(); + + group('test GroupModel', () { + // The group id + // int id + test('to test the property `id`', () async { + // TODO + }); + + // Group's full name, formatting depends on instance settings # Conditions - admin + // String name + test('to test the property `name`', () async { + // TODO + }); + + // Time of creation # Conditions - admin + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Time of the most recent change to the user + // DateTime updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // GroupModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/group_write_model_links_members_inner_test.dart b/test/group_write_model_links_members_inner_test.dart new file mode 100644 index 0000000..bac3443 --- /dev/null +++ b/test/group_write_model_links_members_inner_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GroupWriteModelLinksMembersInner +void main() { + // final instance = GroupWriteModelLinksMembersInner(); + + group('test GroupWriteModelLinksMembersInner', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/group_write_model_links_test.dart b/test/group_write_model_links_test.dart new file mode 100644 index 0000000..5c37825 --- /dev/null +++ b/test/group_write_model_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GroupWriteModelLinks +void main() { + // final instance = GroupWriteModelLinks(); + + group('test GroupWriteModelLinks', () { + // List members (default value: const []) + test('to test the property `members`', () async { + // TODO + }); + + + }); + +} diff --git a/test/group_write_model_test.dart b/test/group_write_model_test.dart new file mode 100644 index 0000000..078ad7c --- /dev/null +++ b/test/group_write_model_test.dart @@ -0,0 +1,33 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for GroupWriteModel +void main() { + // final instance = GroupWriteModel(); + + group('test GroupWriteModel', () { + // The new group name. + // String name + test('to test the property `name`', () async { + // TODO + }); + + // GroupWriteModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/groups_api_test.dart b/test/groups_api_test.dart new file mode 100644 index 0000000..48de171 --- /dev/null +++ b/test/groups_api_test.dart @@ -0,0 +1,66 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for GroupsApi +void main() { + // final instance = GroupsApi(); + + group('tests for GroupsApi', () { + // Create group + // + // Creates a new group applying the attributes provided in the body. + // + //Future createGroup({ GroupWriteModel groupWriteModel }) async + test('test createGroup', () async { + // TODO + }); + + // Delete group + // + // Deletes the group. + // + //Future deleteGroup(int id) async + test('test deleteGroup', () async { + // TODO + }); + + // Get group + // + // Fetches a group resource. + // + //Future getGroup(int id) async + test('test getGroup', () async { + // TODO + }); + + // List groups + // + // Returns a collection of groups. The client can choose to filter the groups similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain groups, for which the requesting client has sufficient permissions (*view_members*, *manage_members*). + // + //Future listGroups({ String sortBy, String select }) async + test('test listGroups', () async { + // TODO + }); + + // Update group + // + // Updates the given group by applying the attributes provided in the body. Please note that the `members` array provided will override the existing set of members (similar to a PUT). A client thus has to provide the complete list of members the group is to have after the PATCH even if only one member is to be added. + // + //Future updateGroup(int id, { GroupWriteModel groupWriteModel }) async + test('test updateGroup', () async { + // TODO + }); + + }); +} diff --git a/test/help_text_collection_model_all_of_embedded_test.dart b/test/help_text_collection_model_all_of_embedded_test.dart new file mode 100644 index 0000000..a7934f4 --- /dev/null +++ b/test/help_text_collection_model_all_of_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for HelpTextCollectionModelAllOfEmbedded +void main() { + // final instance = HelpTextCollectionModelAllOfEmbedded(); + + group('test HelpTextCollectionModelAllOfEmbedded', () { + // List elements (default value: const []) + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/help_text_collection_model_all_of_links_self_test.dart b/test/help_text_collection_model_all_of_links_self_test.dart new file mode 100644 index 0000000..612077a --- /dev/null +++ b/test/help_text_collection_model_all_of_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for HelpTextCollectionModelAllOfLinksSelf +void main() { + // final instance = HelpTextCollectionModelAllOfLinksSelf(); + + group('test HelpTextCollectionModelAllOfLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/help_text_collection_model_all_of_links_test.dart b/test/help_text_collection_model_all_of_links_test.dart new file mode 100644 index 0000000..4b51792 --- /dev/null +++ b/test/help_text_collection_model_all_of_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for HelpTextCollectionModelAllOfLinks +void main() { + // final instance = HelpTextCollectionModelAllOfLinks(); + + group('test HelpTextCollectionModelAllOfLinks', () { + // HelpTextCollectionModelAllOfLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/help_text_collection_model_test.dart b/test/help_text_collection_model_test.dart new file mode 100644 index 0000000..daa2666 --- /dev/null +++ b/test/help_text_collection_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for HelpTextCollectionModel +void main() { + // final instance = HelpTextCollectionModel(); + + group('test HelpTextCollectionModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // HelpTextCollectionModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // HelpTextCollectionModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/help_text_model_links_add_attachment_test.dart b/test/help_text_model_links_add_attachment_test.dart new file mode 100644 index 0000000..ef192e2 --- /dev/null +++ b/test/help_text_model_links_add_attachment_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for HelpTextModelLinksAddAttachment +void main() { + // final instance = HelpTextModelLinksAddAttachment(); + + group('test HelpTextModelLinksAddAttachment', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/help_text_model_links_attachments_test.dart b/test/help_text_model_links_attachments_test.dart new file mode 100644 index 0000000..b1cd0a4 --- /dev/null +++ b/test/help_text_model_links_attachments_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for HelpTextModelLinksAttachments +void main() { + // final instance = HelpTextModelLinksAttachments(); + + group('test HelpTextModelLinksAttachments', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/help_text_model_links_edit_text_test.dart b/test/help_text_model_links_edit_text_test.dart new file mode 100644 index 0000000..0610dac --- /dev/null +++ b/test/help_text_model_links_edit_text_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for HelpTextModelLinksEditText +void main() { + // final instance = HelpTextModelLinksEditText(); + + group('test HelpTextModelLinksEditText', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/help_text_model_links_self_test.dart b/test/help_text_model_links_self_test.dart new file mode 100644 index 0000000..a014746 --- /dev/null +++ b/test/help_text_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for HelpTextModelLinksSelf +void main() { + // final instance = HelpTextModelLinksSelf(); + + group('test HelpTextModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/help_text_model_links_test.dart b/test/help_text_model_links_test.dart new file mode 100644 index 0000000..febd93f --- /dev/null +++ b/test/help_text_model_links_test.dart @@ -0,0 +1,42 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for HelpTextModelLinks +void main() { + // final instance = HelpTextModelLinks(); + + group('test HelpTextModelLinks', () { + // HelpTextModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // HelpTextModelLinksEditText editText + test('to test the property `editText`', () async { + // TODO + }); + + // HelpTextModelLinksAttachments attachments + test('to test the property `attachments`', () async { + // TODO + }); + + // HelpTextModelLinksAddAttachment addAttachment + test('to test the property `addAttachment`', () async { + // TODO + }); + + + }); + +} diff --git a/test/help_text_model_test.dart b/test/help_text_model_test.dart new file mode 100644 index 0000000..cce14f3 --- /dev/null +++ b/test/help_text_model_test.dart @@ -0,0 +1,53 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for HelpTextModel +void main() { + // final instance = HelpTextModel(); + + group('test HelpTextModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // int id + test('to test the property `id`', () async { + // TODO + }); + + // The attribute the help text is assigned to. + // String attribute + test('to test the property `attribute`', () async { + // TODO + }); + + // String scope + test('to test the property `scope`', () async { + // TODO + }); + + // Formattable helpText + test('to test the property `helpText`', () async { + // TODO + }); + + // HelpTextModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/help_texts_api_test.dart b/test/help_texts_api_test.dart new file mode 100644 index 0000000..d17b736 --- /dev/null +++ b/test/help_texts_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for HelpTextsApi +void main() { + // final instance = HelpTextsApi(); + + group('tests for HelpTextsApi', () { + // Get help text + // + // Fetches the help text from the given id. + // + //Future getHelpText(int id) async + test('test getHelpText', () async { + // TODO + }); + + // List help texts + // + // List the complete collection of help texts. + // + //Future listHelpTexts() async + test('test listHelpTexts', () async { + // TODO + }); + + }); +} diff --git a/test/link_test.dart b/test/link_test.dart new file mode 100644 index 0000000..a53861b --- /dev/null +++ b/test/link_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for Link +void main() { + // final instance = Link(); + + group('test Link', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/memberships_api_test.dart b/test/memberships_api_test.dart new file mode 100644 index 0000000..2555e98 --- /dev/null +++ b/test/memberships_api_test.dart @@ -0,0 +1,102 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for MembershipsApi +void main() { + // final instance = MembershipsApi(); + + group('tests for MembershipsApi', () { + // Available projects for memberships + // + // Gets a list of projects in which a membership can be created in. The list contains all projects in which the user issuing the request has the manage members permissions. + // + //Future availableProjectsForMemberships() async + test('test availableProjectsForMemberships', () async { + // TODO + }); + + // Create membership + // + // Creates a new membership applying the attributes provided in the body. You can use the form and schema to retrieve the valid attribute values and by that be guided towards successful creation. By providing a `notificationMessage` within the `_meta` block of the payload, the client can include a customized message to the user of the newly created membership. In case of a group, the message will be sent to every user belonging to the group. By including `{ \"sendNotifications\": false }` within the `_meta` block of the payload, no notifications is send out at all. + // + //Future createMembership() async + test('test createMembership', () async { + // TODO + }); + + // Delete membership + // + // Deletes the membership. + // + //Future deleteMembership(int id) async + test('test deleteMembership', () async { + // TODO + }); + + // List memberships + // + // Returns a collection of memberships. The client can choose to filter the memberships similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain memberships, for which the requesting client has sufficient permissions (*view_members*, *manage_members*). + // + //Future listMemberships({ String filters, String sortBy }) async + test('test listMemberships', () async { + // TODO + }); + + // Membership create form + // + // + // + //Future membershipCreateForm() async + test('test membershipCreateForm', () async { + // TODO + }); + + // Membership update form + // + // + // + //Future membershipUpdateForm(int id) async + test('test membershipUpdateForm', () async { + // TODO + }); + + // Update membership + // + // Updates the given membership by applying the attributes provided in the body. By providing a `notificationMessage` within the `_meta` block of the payload, the client can include a customized message to the user of the updated membership. In case of a group, the message will be sent to every user belonging to the group. By including `{ \"sendNotifications\": false }` within the `_meta` block of the payload, no notifications is send out at all. + // + //Future updateMembership(int id) async + test('test updateMembership', () async { + // TODO + }); + + // View membership + // + // + // + //Future viewMembership(int id) async + test('test viewMembership', () async { + // TODO + }); + + // View membership schema + // + // + // + //Future viewMembershipSchema() async + test('test viewMembershipSchema', () async { + // TODO + }); + + }); +} diff --git a/test/news_api_test.dart b/test/news_api_test.dart new file mode 100644 index 0000000..52ec6cd --- /dev/null +++ b/test/news_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for NewsApi +void main() { + // final instance = NewsApi(); + + group('tests for NewsApi', () { + // List News + // + // Lists news. The news returned depend on the provided parameters and also on the requesting user's permissions. + // + //Future listNews({ int offset, int pageSize, String sortBy, String filters }) async + test('test listNews', () async { + // TODO + }); + + // View news + // + // + // + //Future viewNews(int id) async + test('test viewNews', () async { + // TODO + }); + + }); +} diff --git a/test/news_model_links_author_test.dart b/test/news_model_links_author_test.dart new file mode 100644 index 0000000..7132567 --- /dev/null +++ b/test/news_model_links_author_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NewsModelLinksAuthor +void main() { + // final instance = NewsModelLinksAuthor(); + + group('test NewsModelLinksAuthor', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/news_model_links_project_test.dart b/test/news_model_links_project_test.dart new file mode 100644 index 0000000..fc387be --- /dev/null +++ b/test/news_model_links_project_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NewsModelLinksProject +void main() { + // final instance = NewsModelLinksProject(); + + group('test NewsModelLinksProject', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/news_model_links_self_test.dart b/test/news_model_links_self_test.dart new file mode 100644 index 0000000..e9962d9 --- /dev/null +++ b/test/news_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NewsModelLinksSelf +void main() { + // final instance = NewsModelLinksSelf(); + + group('test NewsModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/news_model_links_test.dart b/test/news_model_links_test.dart new file mode 100644 index 0000000..732e667 --- /dev/null +++ b/test/news_model_links_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NewsModelLinks +void main() { + // final instance = NewsModelLinks(); + + group('test NewsModelLinks', () { + // NewsModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // NewsModelLinksProject project + test('to test the property `project`', () async { + // TODO + }); + + // NewsModelLinksAuthor author + test('to test the property `author`', () async { + // TODO + }); + + + }); + +} diff --git a/test/news_model_test.dart b/test/news_model_test.dart new file mode 100644 index 0000000..cee907b --- /dev/null +++ b/test/news_model_test.dart @@ -0,0 +1,57 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NewsModel +void main() { + // final instance = NewsModel(); + + group('test NewsModel', () { + // News' id + // int id + test('to test the property `id`', () async { + // TODO + }); + + // The headline of the news + // String title + test('to test the property `title`', () async { + // TODO + }); + + // A short summary + // String summary + test('to test the property `summary`', () async { + // TODO + }); + + // The main body of the news with all the details + // String description + test('to test the property `description`', () async { + // TODO + }); + + // The time the news was created at + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // NewsModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/non_working_day_collection_model_all_of_embedded_test.dart b/test/non_working_day_collection_model_all_of_embedded_test.dart new file mode 100644 index 0000000..e7f0fab --- /dev/null +++ b/test/non_working_day_collection_model_all_of_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NonWorkingDayCollectionModelAllOfEmbedded +void main() { + // final instance = NonWorkingDayCollectionModelAllOfEmbedded(); + + group('test NonWorkingDayCollectionModelAllOfEmbedded', () { + // List elements (default value: const []) + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/non_working_day_collection_model_all_of_links_self_test.dart b/test/non_working_day_collection_model_all_of_links_self_test.dart new file mode 100644 index 0000000..ac49d50 --- /dev/null +++ b/test/non_working_day_collection_model_all_of_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NonWorkingDayCollectionModelAllOfLinksSelf +void main() { + // final instance = NonWorkingDayCollectionModelAllOfLinksSelf(); + + group('test NonWorkingDayCollectionModelAllOfLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/non_working_day_collection_model_all_of_links_test.dart b/test/non_working_day_collection_model_all_of_links_test.dart new file mode 100644 index 0000000..dab4f49 --- /dev/null +++ b/test/non_working_day_collection_model_all_of_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NonWorkingDayCollectionModelAllOfLinks +void main() { + // final instance = NonWorkingDayCollectionModelAllOfLinks(); + + group('test NonWorkingDayCollectionModelAllOfLinks', () { + // NonWorkingDayCollectionModelAllOfLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/non_working_day_collection_model_test.dart b/test/non_working_day_collection_model_test.dart new file mode 100644 index 0000000..359de48 --- /dev/null +++ b/test/non_working_day_collection_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NonWorkingDayCollectionModel +void main() { + // final instance = NonWorkingDayCollectionModel(); + + group('test NonWorkingDayCollectionModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // NonWorkingDayCollectionModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // NonWorkingDayCollectionModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/non_working_day_model_links_self_test.dart b/test/non_working_day_model_links_self_test.dart new file mode 100644 index 0000000..7abf5c4 --- /dev/null +++ b/test/non_working_day_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NonWorkingDayModelLinksSelf +void main() { + // final instance = NonWorkingDayModelLinksSelf(); + + group('test NonWorkingDayModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/non_working_day_model_links_test.dart b/test/non_working_day_model_links_test.dart new file mode 100644 index 0000000..df9fc24 --- /dev/null +++ b/test/non_working_day_model_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NonWorkingDayModelLinks +void main() { + // final instance = NonWorkingDayModelLinks(); + + group('test NonWorkingDayModelLinks', () { + // NonWorkingDayModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/non_working_day_model_test.dart b/test/non_working_day_model_test.dart new file mode 100644 index 0000000..512f730 --- /dev/null +++ b/test/non_working_day_model_test.dart @@ -0,0 +1,44 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NonWorkingDayModel +void main() { + // final instance = NonWorkingDayModel(); + + group('test NonWorkingDayModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // Date of the non-working day. + // DateTime date + test('to test the property `date`', () async { + // TODO + }); + + // Descriptive name for the non-working day. + // String name + test('to test the property `name`', () async { + // TODO + }); + + // NonWorkingDayModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_collection_model_all_of_embedded_test.dart b/test/notification_collection_model_all_of_embedded_test.dart new file mode 100644 index 0000000..44db501 --- /dev/null +++ b/test/notification_collection_model_all_of_embedded_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationCollectionModelAllOfEmbedded +void main() { + // final instance = NotificationCollectionModelAllOfEmbedded(); + + group('test NotificationCollectionModelAllOfEmbedded', () { + // List elements (default value: const []) + test('to test the property `elements`', () async { + // TODO + }); + + // List detailsSchemas (default value: const []) + test('to test the property `detailsSchemas`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_collection_model_all_of_links_change_size_test.dart b/test/notification_collection_model_all_of_links_change_size_test.dart new file mode 100644 index 0000000..e2d325d --- /dev/null +++ b/test/notification_collection_model_all_of_links_change_size_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationCollectionModelAllOfLinksChangeSize +void main() { + // final instance = NotificationCollectionModelAllOfLinksChangeSize(); + + group('test NotificationCollectionModelAllOfLinksChangeSize', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_collection_model_all_of_links_jump_to_test.dart b/test/notification_collection_model_all_of_links_jump_to_test.dart new file mode 100644 index 0000000..bbf1c4b --- /dev/null +++ b/test/notification_collection_model_all_of_links_jump_to_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationCollectionModelAllOfLinksJumpTo +void main() { + // final instance = NotificationCollectionModelAllOfLinksJumpTo(); + + group('test NotificationCollectionModelAllOfLinksJumpTo', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_collection_model_all_of_links_self_test.dart b/test/notification_collection_model_all_of_links_self_test.dart new file mode 100644 index 0000000..09f28da --- /dev/null +++ b/test/notification_collection_model_all_of_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationCollectionModelAllOfLinksSelf +void main() { + // final instance = NotificationCollectionModelAllOfLinksSelf(); + + group('test NotificationCollectionModelAllOfLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_collection_model_all_of_links_test.dart b/test/notification_collection_model_all_of_links_test.dart new file mode 100644 index 0000000..42e2749 --- /dev/null +++ b/test/notification_collection_model_all_of_links_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationCollectionModelAllOfLinks +void main() { + // final instance = NotificationCollectionModelAllOfLinks(); + + group('test NotificationCollectionModelAllOfLinks', () { + // NotificationCollectionModelAllOfLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // NotificationCollectionModelAllOfLinksJumpTo jumpTo + test('to test the property `jumpTo`', () async { + // TODO + }); + + // NotificationCollectionModelAllOfLinksChangeSize changeSize + test('to test the property `changeSize`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_collection_model_test.dart b/test/notification_collection_model_test.dart new file mode 100644 index 0000000..c578802 --- /dev/null +++ b/test/notification_collection_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationCollectionModel +void main() { + // final instance = NotificationCollectionModel(); + + group('test NotificationCollectionModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // NotificationCollectionModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // NotificationCollectionModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_model_details_inner_test.dart b/test/notification_model_details_inner_test.dart new file mode 100644 index 0000000..771e425 --- /dev/null +++ b/test/notification_model_details_inner_test.dart @@ -0,0 +1,44 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationModelDetailsInner +void main() { + // final instance = NotificationModelDetailsInner(); + + group('test NotificationModelDetailsInner', () { + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // The key of the key - value pair represented by the Values::Property + // Object property + test('to test the property `property`', () async { + // TODO + }); + + // The value of the key - value pair represented by the Values::Property + // Object value + test('to test the property `value`', () async { + // TODO + }); + + // ValuesPropertyModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_model_embedded_resource_test.dart b/test/notification_model_embedded_resource_test.dart new file mode 100644 index 0000000..cc028ac --- /dev/null +++ b/test/notification_model_embedded_resource_test.dart @@ -0,0 +1,145 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationModelEmbeddedResource +void main() { + // final instance = NotificationModelEmbeddedResource(); + + group('test NotificationModelEmbeddedResource', () { + // Work package id + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // The version of the item as used for optimistic locking + // Object lockVersion + test('to test the property `lockVersion`', () async { + // TODO + }); + + // Work package subject + // Object subject + test('to test the property `subject`', () async { + // TODO + }); + + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // WorkPackageModelDescription description + test('to test the property `description`', () async { + // TODO + }); + + // If false (default) schedule automatically. + // Object scheduleManually + test('to test the property `scheduleManually`', () async { + // TODO + }); + + // If true, the work package is in a readonly status so with the exception of the status, no other property can be altered. + // Object readonly + test('to test the property `readonly`', () async { + // TODO + }); + + // Scheduled beginning of a work package + // Object startDate + test('to test the property `startDate`', () async { + // TODO + }); + + // Scheduled end of a work package + // Object dueDate + test('to test the property `dueDate`', () async { + // TODO + }); + + // Date on which a milestone is achieved + // Object date + test('to test the property `date`', () async { + // TODO + }); + + // Similar to start date but is not set by a client but rather deduced by the work packages' descendants. If manual scheduleManually is active, the two dates can deviate. + // Object derivedStartDate + test('to test the property `derivedStartDate`', () async { + // TODO + }); + + // Similar to due date but is not set by a client but rather deduced by the work packages' descendants. If manual scheduleManually is active, the two dates can deviate. + // Object derivedDueDate + test('to test the property `derivedDueDate`', () async { + // TODO + }); + + // **(NOT IMPLEMENTED)** The amount of time in hours the work package needs to be completed. Not available for milestone type of work packages. + // Object duration + test('to test the property `duration`', () async { + // TODO + }); + + // Time a work package likely needs to be completed excluding its descendants + // Object estimatedTime + test('to test the property `estimatedTime`', () async { + // TODO + }); + + // Time a work package likely needs to be completed including its descendants + // Object derivedEstimatedTime + test('to test the property `derivedEstimatedTime`', () async { + // TODO + }); + + // **(NOT IMPLEMENTED)** When scheduling, whether or not to ignore the non working days being defined. A work package with the flag set to true will be allowed to be scheduled to a non working day. + // Object ignoreNonWorkingDays + test('to test the property `ignoreNonWorkingDays`', () async { + // TODO + }); + + // The time booked for this work package by users working on it # Conditions **Permission** view time entries + // Object spentTime + test('to test the property `spentTime`', () async { + // TODO + }); + + // Amount of total completion for a work package + // Object percentageDone + test('to test the property `percentageDone`', () async { + // TODO + }); + + // Time of creation + // Object createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Time of the most recent change to the work package + // Object updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // WorkPackageModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_model_embedded_test.dart b/test/notification_model_embedded_test.dart new file mode 100644 index 0000000..f414412 --- /dev/null +++ b/test/notification_model_embedded_test.dart @@ -0,0 +1,42 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationModelEmbedded +void main() { + // final instance = NotificationModelEmbedded(); + + group('test NotificationModelEmbedded', () { + // UserModel actor + test('to test the property `actor`', () async { + // TODO + }); + + // ProjectModel project + test('to test the property `project`', () async { + // TODO + }); + + // ActivityModel activity + test('to test the property `activity`', () async { + // TODO + }); + + // NotificationModelEmbeddedResource resource + test('to test the property `resource`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_model_links_activity_test.dart b/test/notification_model_links_activity_test.dart new file mode 100644 index 0000000..473b24f --- /dev/null +++ b/test/notification_model_links_activity_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationModelLinksActivity +void main() { + // final instance = NotificationModelLinksActivity(); + + group('test NotificationModelLinksActivity', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_model_links_actor_test.dart b/test/notification_model_links_actor_test.dart new file mode 100644 index 0000000..9adeaed --- /dev/null +++ b/test/notification_model_links_actor_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationModelLinksActor +void main() { + // final instance = NotificationModelLinksActor(); + + group('test NotificationModelLinksActor', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_model_links_details_inner_test.dart b/test/notification_model_links_details_inner_test.dart new file mode 100644 index 0000000..8eb597e --- /dev/null +++ b/test/notification_model_links_details_inner_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationModelLinksDetailsInner +void main() { + // final instance = NotificationModelLinksDetailsInner(); + + group('test NotificationModelLinksDetailsInner', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_model_links_project_test.dart b/test/notification_model_links_project_test.dart new file mode 100644 index 0000000..2a96e51 --- /dev/null +++ b/test/notification_model_links_project_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationModelLinksProject +void main() { + // final instance = NotificationModelLinksProject(); + + group('test NotificationModelLinksProject', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_model_links_read_ian_test.dart b/test/notification_model_links_read_ian_test.dart new file mode 100644 index 0000000..eb06b6f --- /dev/null +++ b/test/notification_model_links_read_ian_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationModelLinksReadIAN +void main() { + // final instance = NotificationModelLinksReadIAN(); + + group('test NotificationModelLinksReadIAN', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_model_links_resource_test.dart b/test/notification_model_links_resource_test.dart new file mode 100644 index 0000000..44a354f --- /dev/null +++ b/test/notification_model_links_resource_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationModelLinksResource +void main() { + // final instance = NotificationModelLinksResource(); + + group('test NotificationModelLinksResource', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_model_links_self_test.dart b/test/notification_model_links_self_test.dart new file mode 100644 index 0000000..9bc9aa6 --- /dev/null +++ b/test/notification_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationModelLinksSelf +void main() { + // final instance = NotificationModelLinksSelf(); + + group('test NotificationModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_model_links_test.dart b/test/notification_model_links_test.dart new file mode 100644 index 0000000..3c9b287 --- /dev/null +++ b/test/notification_model_links_test.dart @@ -0,0 +1,62 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationModelLinks +void main() { + // final instance = NotificationModelLinks(); + + group('test NotificationModelLinks', () { + // NotificationModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // NotificationModelLinksReadIAN readIAN + test('to test the property `readIAN`', () async { + // TODO + }); + + // NotificationModelLinksUnreadIAN unreadIAN + test('to test the property `unreadIAN`', () async { + // TODO + }); + + // NotificationModelLinksProject project + test('to test the property `project`', () async { + // TODO + }); + + // NotificationModelLinksActor actor + test('to test the property `actor`', () async { + // TODO + }); + + // NotificationModelLinksResource resource + test('to test the property `resource`', () async { + // TODO + }); + + // NotificationModelLinksActivity activity + test('to test the property `activity`', () async { + // TODO + }); + + // List details (default value: const []) + test('to test the property `details`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_model_links_unread_ian_test.dart b/test/notification_model_links_unread_ian_test.dart new file mode 100644 index 0000000..a7028c7 --- /dev/null +++ b/test/notification_model_links_unread_ian_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationModelLinksUnreadIAN +void main() { + // final instance = NotificationModelLinksUnreadIAN(); + + group('test NotificationModelLinksUnreadIAN', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notification_model_test.dart b/test/notification_model_test.dart new file mode 100644 index 0000000..4a3657f --- /dev/null +++ b/test/notification_model_test.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NotificationModel +void main() { + // final instance = NotificationModel(); + + group('test NotificationModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // Notification id + // int id + test('to test the property `id`', () async { + // TODO + }); + + // The reason for the notification + // String reason + test('to test the property `reason`', () async { + // TODO + }); + + // Whether the notification is marked as read + // bool readIAN + test('to test the property `readIAN`', () async { + // TODO + }); + + // List details (default value: const []) + test('to test the property `details`', () async { + // TODO + }); + + // The time the notification was created at + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // The time the notification was last updated + // DateTime updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // NotificationModelEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + // NotificationModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/notifications_api_test.dart b/test/notifications_api_test.dart new file mode 100644 index 0000000..d00c712 --- /dev/null +++ b/test/notifications_api_test.dart @@ -0,0 +1,84 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for NotificationsApi +void main() { + // final instance = NotificationsApi(); + + group('tests for NotificationsApi', () { + // Get notification collection + // + // Returns the collection of available in-app notifications. The notifications returned depend on the provided parameters and also on the requesting user's permissions. Contrary to most collections, this one also links to and embeds schemas for the `details` properties of the notifications returned. This is an optimization. Clients will receive the information necessary to display the various types of details that a notification can carry. + // + //Future listNotifications({ int offset, int pageSize, String sortBy, String groupBy, String filters }) async + test('test listNotifications', () async { + // TODO + }); + + // Read notification + // + // Marks the given notification as read. + // + //Future readNotification(int id) async + test('test readNotification', () async { + // TODO + }); + + // Read all notifications + // + // Marks the whole notification collection as read. The collection contains only elements the authenticated user can see, and can be further reduced with filters. + // + //Future readNotifications({ String filters }) async + test('test readNotifications', () async { + // TODO + }); + + // Unread notification + // + // Marks the given notification as unread. + // + //Future unreadNotification(int id) async + test('test unreadNotification', () async { + // TODO + }); + + // Unread all notifications + // + // Marks the whole notification collection as unread. The collection contains only elements the authenticated user can see, and can be further reduced with filters. + // + //Future unreadNotifications({ String filters }) async + test('test unreadNotifications', () async { + // TODO + }); + + // Get the notification + // + // Returns the notification identified by the notification id. + // + //Future viewNotification(int id) async + test('test viewNotification', () async { + // TODO + }); + + // Get a notification detail + // + // Returns an individual detail of a notification identified by the notification id and the id of the detail. + // + //Future viewNotificationDetail(int notificationId, int id) async + test('test viewNotificationDetail', () async { + // TODO + }); + + }); +} diff --git a/test/o_auth2_api_test.dart b/test/o_auth2_api_test.dart new file mode 100644 index 0000000..a3c2f46 --- /dev/null +++ b/test/o_auth2_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for OAuth2Api +void main() { + // final instance = OAuth2Api(); + + group('tests for OAuth2Api', () { + // Get the oauth application. + // + // Retrieves the OAuth 2 provider application for the given identifier. The secret will not be part of the response, instead a `confidential` flag is indicating, whether there is a secret or not. + // + //Future getOauthApplication(int id) async + test('test getOauthApplication', () async { + // TODO + }); + + // Get the oauth client credentials object. + // + // Retrieves the OAuth 2 client credentials for the given identifier. The secret will not be part of the response, instead a `confidential` flag is indicating, whether there is a secret or not. + // + //Future getOauthClientCredentials(int id) async + test('test getOauthClientCredentials', () async { + // TODO + }); + + }); +} diff --git a/test/o_auth_application_read_model_links_integration_test.dart b/test/o_auth_application_read_model_links_integration_test.dart new file mode 100644 index 0000000..d295d82 --- /dev/null +++ b/test/o_auth_application_read_model_links_integration_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OAuthApplicationReadModelLinksIntegration +void main() { + // final instance = OAuthApplicationReadModelLinksIntegration(); + + group('test OAuthApplicationReadModelLinksIntegration', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/o_auth_application_read_model_links_owner_test.dart b/test/o_auth_application_read_model_links_owner_test.dart new file mode 100644 index 0000000..82e0ea3 --- /dev/null +++ b/test/o_auth_application_read_model_links_owner_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OAuthApplicationReadModelLinksOwner +void main() { + // final instance = OAuthApplicationReadModelLinksOwner(); + + group('test OAuthApplicationReadModelLinksOwner', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/o_auth_application_read_model_links_redirect_uri_test.dart b/test/o_auth_application_read_model_links_redirect_uri_test.dart new file mode 100644 index 0000000..8876a4d --- /dev/null +++ b/test/o_auth_application_read_model_links_redirect_uri_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OAuthApplicationReadModelLinksRedirectUri +void main() { + // final instance = OAuthApplicationReadModelLinksRedirectUri(); + + group('test OAuthApplicationReadModelLinksRedirectUri', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/o_auth_application_read_model_links_self_test.dart b/test/o_auth_application_read_model_links_self_test.dart new file mode 100644 index 0000000..d97e11f --- /dev/null +++ b/test/o_auth_application_read_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OAuthApplicationReadModelLinksSelf +void main() { + // final instance = OAuthApplicationReadModelLinksSelf(); + + group('test OAuthApplicationReadModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/o_auth_application_read_model_links_test.dart b/test/o_auth_application_read_model_links_test.dart new file mode 100644 index 0000000..c326b65 --- /dev/null +++ b/test/o_auth_application_read_model_links_test.dart @@ -0,0 +1,42 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OAuthApplicationReadModelLinks +void main() { + // final instance = OAuthApplicationReadModelLinks(); + + group('test OAuthApplicationReadModelLinks', () { + // OAuthApplicationReadModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // OAuthApplicationReadModelLinksOwner owner + test('to test the property `owner`', () async { + // TODO + }); + + // OAuthApplicationReadModelLinksIntegration integration + test('to test the property `integration`', () async { + // TODO + }); + + // OAuthApplicationReadModelLinksRedirectUri redirectUri + test('to test the property `redirectUri`', () async { + // TODO + }); + + + }); + +} diff --git a/test/o_auth_application_read_model_test.dart b/test/o_auth_application_read_model_test.dart new file mode 100644 index 0000000..9a0b57b --- /dev/null +++ b/test/o_auth_application_read_model_test.dart @@ -0,0 +1,78 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OAuthApplicationReadModel +void main() { + // final instance = OAuthApplicationReadModel(); + + group('test OAuthApplicationReadModel', () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The name of the OAuth 2 application + // String name + test('to test the property `name`', () async { + // TODO + }); + + // OAuth 2 client id + // String clientId + test('to test the property `clientId`', () async { + // TODO + }); + + // OAuth 2 client secret. This is only returned when creating a new OAuth application. + // String clientSecret + test('to test the property `clientSecret`', () async { + // TODO + }); + + // true, if OAuth 2 credentials are confidential, false, if no secret is stored + // bool confidential + test('to test the property `confidential`', () async { + // TODO + }); + + // The time the OAuth 2 Application was created at + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // The time the OAuth 2 Application was last updated + // DateTime updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // List scopes (default value: const []) + test('to test the property `scopes`', () async { + // TODO + }); + + // OAuthApplicationReadModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/o_auth_client_credentials_read_model_links_integration_test.dart b/test/o_auth_client_credentials_read_model_links_integration_test.dart new file mode 100644 index 0000000..a368521 --- /dev/null +++ b/test/o_auth_client_credentials_read_model_links_integration_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OAuthClientCredentialsReadModelLinksIntegration +void main() { + // final instance = OAuthClientCredentialsReadModelLinksIntegration(); + + group('test OAuthClientCredentialsReadModelLinksIntegration', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/o_auth_client_credentials_read_model_links_self_test.dart b/test/o_auth_client_credentials_read_model_links_self_test.dart new file mode 100644 index 0000000..25acfe1 --- /dev/null +++ b/test/o_auth_client_credentials_read_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OAuthClientCredentialsReadModelLinksSelf +void main() { + // final instance = OAuthClientCredentialsReadModelLinksSelf(); + + group('test OAuthClientCredentialsReadModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/o_auth_client_credentials_read_model_links_test.dart b/test/o_auth_client_credentials_read_model_links_test.dart new file mode 100644 index 0000000..4fcf197 --- /dev/null +++ b/test/o_auth_client_credentials_read_model_links_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OAuthClientCredentialsReadModelLinks +void main() { + // final instance = OAuthClientCredentialsReadModelLinks(); + + group('test OAuthClientCredentialsReadModelLinks', () { + // OAuthClientCredentialsReadModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // OAuthClientCredentialsReadModelLinksIntegration integration + test('to test the property `integration`', () async { + // TODO + }); + + + }); + +} diff --git a/test/o_auth_client_credentials_read_model_test.dart b/test/o_auth_client_credentials_read_model_test.dart new file mode 100644 index 0000000..bdf17e0 --- /dev/null +++ b/test/o_auth_client_credentials_read_model_test.dart @@ -0,0 +1,61 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OAuthClientCredentialsReadModel +void main() { + // final instance = OAuthClientCredentialsReadModel(); + + group('test OAuthClientCredentialsReadModel', () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // String type + test('to test the property `type`', () async { + // TODO + }); + + // OAuth 2 client id + // String clientId + test('to test the property `clientId`', () async { + // TODO + }); + + // true, if OAuth 2 credentials are confidential, false, if no secret is stored + // bool confidential + test('to test the property `confidential`', () async { + // TODO + }); + + // The time the OAuth client credentials were created at + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // The time the OAuth client credentials were last updated + // DateTime updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // OAuthClientCredentialsReadModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/o_auth_client_credentials_write_model_test.dart b/test/o_auth_client_credentials_write_model_test.dart new file mode 100644 index 0000000..c367525 --- /dev/null +++ b/test/o_auth_client_credentials_write_model_test.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OAuthClientCredentialsWriteModel +void main() { + // final instance = OAuthClientCredentialsWriteModel(); + + group('test OAuthClientCredentialsWriteModel', () { + // OAuth 2 client id + // String clientId + test('to test the property `clientId`', () async { + // TODO + }); + + // OAuth 2 client secret + // String clientSecret + test('to test the property `clientSecret`', () async { + // TODO + }); + + + }); + +} diff --git a/test/paginated_collection_model_all_of_links_change_size_test.dart b/test/paginated_collection_model_all_of_links_change_size_test.dart new file mode 100644 index 0000000..686d42b --- /dev/null +++ b/test/paginated_collection_model_all_of_links_change_size_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for PaginatedCollectionModelAllOfLinksChangeSize +void main() { + // final instance = PaginatedCollectionModelAllOfLinksChangeSize(); + + group('test PaginatedCollectionModelAllOfLinksChangeSize', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/paginated_collection_model_all_of_links_jump_to_test.dart b/test/paginated_collection_model_all_of_links_jump_to_test.dart new file mode 100644 index 0000000..e330fe3 --- /dev/null +++ b/test/paginated_collection_model_all_of_links_jump_to_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for PaginatedCollectionModelAllOfLinksJumpTo +void main() { + // final instance = PaginatedCollectionModelAllOfLinksJumpTo(); + + group('test PaginatedCollectionModelAllOfLinksJumpTo', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/paginated_collection_model_all_of_links_test.dart b/test/paginated_collection_model_all_of_links_test.dart new file mode 100644 index 0000000..953ed28 --- /dev/null +++ b/test/paginated_collection_model_all_of_links_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for PaginatedCollectionModelAllOfLinks +void main() { + // final instance = PaginatedCollectionModelAllOfLinks(); + + group('test PaginatedCollectionModelAllOfLinks', () { + // PaginatedCollectionModelAllOfLinksJumpTo jumpTo + test('to test the property `jumpTo`', () async { + // TODO + }); + + // PaginatedCollectionModelAllOfLinksChangeSize changeSize + test('to test the property `changeSize`', () async { + // TODO + }); + + + }); + +} diff --git a/test/paginated_collection_model_test.dart b/test/paginated_collection_model_test.dart new file mode 100644 index 0000000..8dd8cff --- /dev/null +++ b/test/paginated_collection_model_test.dart @@ -0,0 +1,56 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for PaginatedCollectionModel +void main() { + // final instance = PaginatedCollectionModel(); + + group('test PaginatedCollectionModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // PaginatedCollectionModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // Amount of elements that a response will hold. + // int pageSize + test('to test the property `pageSize`', () async { + // TODO + }); + + // The page number that is requested from paginated collection. + // int offset + test('to test the property `offset`', () async { + // TODO + }); + + + }); + +} diff --git a/test/post_model_links_add_attachment_test.dart b/test/post_model_links_add_attachment_test.dart new file mode 100644 index 0000000..f44484f --- /dev/null +++ b/test/post_model_links_add_attachment_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for PostModelLinksAddAttachment +void main() { + // final instance = PostModelLinksAddAttachment(); + + group('test PostModelLinksAddAttachment', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/post_model_links_test.dart b/test/post_model_links_test.dart new file mode 100644 index 0000000..06d2104 --- /dev/null +++ b/test/post_model_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for PostModelLinks +void main() { + // final instance = PostModelLinks(); + + group('test PostModelLinks', () { + // PostModelLinksAddAttachment addAttachment + test('to test the property `addAttachment`', () async { + // TODO + }); + + + }); + +} diff --git a/test/post_model_test.dart b/test/post_model_test.dart new file mode 100644 index 0000000..bbfbb96 --- /dev/null +++ b/test/post_model_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for PostModel +void main() { + // final instance = PostModel(); + + group('test PostModel', () { + // Identifier of this post + // int id + test('to test the property `id`', () async { + // TODO + }); + + // The post's subject + // String subject + test('to test the property `subject`', () async { + // TODO + }); + + // PostModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/posts_api_test.dart b/test/posts_api_test.dart new file mode 100644 index 0000000..7905eca --- /dev/null +++ b/test/posts_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for PostsApi +void main() { + // final instance = PostsApi(); + + group('tests for PostsApi', () { + // View Post + // + // Retrieve an individual post as identified by the id parameter + // + //Future viewPost(int id) async + test('test viewPost', () async { + // TODO + }); + + }); +} diff --git a/test/previewing_api_test.dart b/test/previewing_api_test.dart new file mode 100644 index 0000000..4926ddb --- /dev/null +++ b/test/previewing_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for PreviewingApi +void main() { + // final instance = PreviewingApi(); + + group('tests for PreviewingApi', () { + // Preview Markdown document + // + // + // + //Future previewMarkdownDocument({ String context }) async + test('test previewMarkdownDocument', () async { + // TODO + }); + + // Preview plain document + // + // + // + //Future previewPlainDocument() async + test('test previewPlainDocument', () async { + // TODO + }); + + }); +} diff --git a/test/principals_api_test.dart b/test/principals_api_test.dart new file mode 100644 index 0000000..db2f8f5 --- /dev/null +++ b/test/principals_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for PrincipalsApi +void main() { + // final instance = PrincipalsApi(); + + group('tests for PrincipalsApi', () { + // List principals + // + // List all principals. The client can choose to filter the principals similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain principals who are members in projects the client is allowed to see. + // + //Future listPrincipals({ String filters, String select }) async + test('test listPrincipals', () async { + // TODO + }); + + }); +} diff --git a/test/priorities_api_test.dart b/test/priorities_api_test.dart new file mode 100644 index 0000000..3820577 --- /dev/null +++ b/test/priorities_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for PrioritiesApi +void main() { + // final instance = PrioritiesApi(); + + group('tests for PrioritiesApi', () { + // List all Priorities + // + // + // + //Future listAllPriorities() async + test('test listAllPriorities', () async { + // TODO + }); + + // View Priority + // + // + // + //Future viewPriority(int id) async + test('test viewPriority', () async { + // TODO + }); + + }); +} diff --git a/test/priority_model_links_self_test.dart b/test/priority_model_links_self_test.dart new file mode 100644 index 0000000..a8febd2 --- /dev/null +++ b/test/priority_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for PriorityModelLinksSelf +void main() { + // final instance = PriorityModelLinksSelf(); + + group('test PriorityModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/priority_model_links_test.dart b/test/priority_model_links_test.dart new file mode 100644 index 0000000..9d59dc7 --- /dev/null +++ b/test/priority_model_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for PriorityModelLinks +void main() { + // final instance = PriorityModelLinks(); + + group('test PriorityModelLinks', () { + // PriorityModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/priority_model_test.dart b/test/priority_model_test.dart new file mode 100644 index 0000000..58ad04c --- /dev/null +++ b/test/priority_model_test.dart @@ -0,0 +1,57 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for PriorityModel +void main() { + // final instance = PriorityModel(); + + group('test PriorityModel', () { + // Priority id + // int id + test('to test the property `id`', () async { + // TODO + }); + + // Priority name + // String name + test('to test the property `name`', () async { + // TODO + }); + + // Sort index of the priority + // int position + test('to test the property `position`', () async { + // TODO + }); + + // Indicates whether this is the default value + // bool isDefault + test('to test the property `isDefault`', () async { + // TODO + }); + + // Indicates whether the priority is available + // bool isActive + test('to test the property `isActive`', () async { + // TODO + }); + + // PriorityModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_categories_test.dart b/test/project_model_links_categories_test.dart new file mode 100644 index 0000000..413f9f7 --- /dev/null +++ b/test/project_model_links_categories_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinksCategories +void main() { + // final instance = ProjectModelLinksCategories(); + + group('test ProjectModelLinksCategories', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_create_work_package_immediately_test.dart b/test/project_model_links_create_work_package_immediately_test.dart new file mode 100644 index 0000000..65c0f6a --- /dev/null +++ b/test/project_model_links_create_work_package_immediately_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinksCreateWorkPackageImmediately +void main() { + // final instance = ProjectModelLinksCreateWorkPackageImmediately(); + + group('test ProjectModelLinksCreateWorkPackageImmediately', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_create_work_package_test.dart b/test/project_model_links_create_work_package_test.dart new file mode 100644 index 0000000..0a98e69 --- /dev/null +++ b/test/project_model_links_create_work_package_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinksCreateWorkPackage +void main() { + // final instance = ProjectModelLinksCreateWorkPackage(); + + group('test ProjectModelLinksCreateWorkPackage', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_delete_test.dart b/test/project_model_links_delete_test.dart new file mode 100644 index 0000000..a12a845 --- /dev/null +++ b/test/project_model_links_delete_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinksDelete +void main() { + // final instance = ProjectModelLinksDelete(); + + group('test ProjectModelLinksDelete', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_memberships_test.dart b/test/project_model_links_memberships_test.dart new file mode 100644 index 0000000..f22cd72 --- /dev/null +++ b/test/project_model_links_memberships_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinksMemberships +void main() { + // final instance = ProjectModelLinksMemberships(); + + group('test ProjectModelLinksMemberships', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_parent_test.dart b/test/project_model_links_parent_test.dart new file mode 100644 index 0000000..d92d661 --- /dev/null +++ b/test/project_model_links_parent_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinksParent +void main() { + // final instance = ProjectModelLinksParent(); + + group('test ProjectModelLinksParent', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_self_test.dart b/test/project_model_links_self_test.dart new file mode 100644 index 0000000..f20aa5b --- /dev/null +++ b/test/project_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinksSelf +void main() { + // final instance = ProjectModelLinksSelf(); + + group('test ProjectModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_status_test.dart b/test/project_model_links_status_test.dart new file mode 100644 index 0000000..9dac2d4 --- /dev/null +++ b/test/project_model_links_status_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinksStatus +void main() { + // final instance = ProjectModelLinksStatus(); + + group('test ProjectModelLinksStatus', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_storages_inner_test.dart b/test/project_model_links_storages_inner_test.dart new file mode 100644 index 0000000..c2507d0 --- /dev/null +++ b/test/project_model_links_storages_inner_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinksStoragesInner +void main() { + // final instance = ProjectModelLinksStoragesInner(); + + group('test ProjectModelLinksStoragesInner', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_test.dart b/test/project_model_links_test.dart new file mode 100644 index 0000000..581de88 --- /dev/null +++ b/test/project_model_links_test.dart @@ -0,0 +1,92 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinks +void main() { + // final instance = ProjectModelLinks(); + + group('test ProjectModelLinks', () { + // ProjectModelLinksUpdate update + test('to test the property `update`', () async { + // TODO + }); + + // ProjectModelLinksUpdateImmediately updateImmediately + test('to test the property `updateImmediately`', () async { + // TODO + }); + + // ProjectModelLinksDelete delete + test('to test the property `delete`', () async { + // TODO + }); + + // ProjectModelLinksCreateWorkPackage createWorkPackage + test('to test the property `createWorkPackage`', () async { + // TODO + }); + + // ProjectModelLinksCreateWorkPackageImmediately createWorkPackageImmediately + test('to test the property `createWorkPackageImmediately`', () async { + // TODO + }); + + // ProjectModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // ProjectModelLinksCategories categories + test('to test the property `categories`', () async { + // TODO + }); + + // ProjectModelLinksTypes types + test('to test the property `types`', () async { + // TODO + }); + + // ProjectModelLinksVersions versions + test('to test the property `versions`', () async { + // TODO + }); + + // ProjectModelLinksMemberships memberships + test('to test the property `memberships`', () async { + // TODO + }); + + // ProjectModelLinksWorkPackages workPackages + test('to test the property `workPackages`', () async { + // TODO + }); + + // ProjectModelLinksParent parent + test('to test the property `parent`', () async { + // TODO + }); + + // ProjectModelLinksStatus status + test('to test the property `status`', () async { + // TODO + }); + + // List storages (default value: const []) + test('to test the property `storages`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_types_test.dart b/test/project_model_links_types_test.dart new file mode 100644 index 0000000..bb04b3f --- /dev/null +++ b/test/project_model_links_types_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinksTypes +void main() { + // final instance = ProjectModelLinksTypes(); + + group('test ProjectModelLinksTypes', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_update_immediately_test.dart b/test/project_model_links_update_immediately_test.dart new file mode 100644 index 0000000..24b4363 --- /dev/null +++ b/test/project_model_links_update_immediately_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinksUpdateImmediately +void main() { + // final instance = ProjectModelLinksUpdateImmediately(); + + group('test ProjectModelLinksUpdateImmediately', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_update_test.dart b/test/project_model_links_update_test.dart new file mode 100644 index 0000000..ce2477e --- /dev/null +++ b/test/project_model_links_update_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinksUpdate +void main() { + // final instance = ProjectModelLinksUpdate(); + + group('test ProjectModelLinksUpdate', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_versions_test.dart b/test/project_model_links_versions_test.dart new file mode 100644 index 0000000..7f9b37c --- /dev/null +++ b/test/project_model_links_versions_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinksVersions +void main() { + // final instance = ProjectModelLinksVersions(); + + group('test ProjectModelLinksVersions', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_links_work_packages_test.dart b/test/project_model_links_work_packages_test.dart new file mode 100644 index 0000000..3abe587 --- /dev/null +++ b/test/project_model_links_work_packages_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelLinksWorkPackages +void main() { + // final instance = ProjectModelLinksWorkPackages(); + + group('test ProjectModelLinksWorkPackages', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_status_explanation_test.dart b/test/project_model_status_explanation_test.dart new file mode 100644 index 0000000..c57c892 --- /dev/null +++ b/test/project_model_status_explanation_test.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModelStatusExplanation +void main() { + // final instance = ProjectModelStatusExplanation(); + + group('test ProjectModelStatusExplanation', () { + // Indicates the formatting language of the raw text + // String format + test('to test the property `format`', () async { + // TODO + }); + + // The raw text, as entered by the user + // String raw + test('to test the property `raw`', () async { + // TODO + }); + + // The text converted to HTML according to the format + // String html + test('to test the property `html`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_model_test.dart b/test/project_model_test.dart new file mode 100644 index 0000000..eed6c95 --- /dev/null +++ b/test/project_model_test.dart @@ -0,0 +1,82 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectModel +void main() { + // final instance = ProjectModel(); + + group('test ProjectModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // Projects' id + // int id + test('to test the property `id`', () async { + // TODO + }); + + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + // String name + test('to test the property `name`', () async { + // TODO + }); + + // Indicates whether the project is currently active or already archived + // bool active + test('to test the property `active`', () async { + // TODO + }); + + // ProjectModelStatusExplanation statusExplanation + test('to test the property `statusExplanation`', () async { + // TODO + }); + + // Indicates whether the project is accessible for everybody + // bool public + test('to test the property `public`', () async { + // TODO + }); + + // Formattable description + test('to test the property `description`', () async { + // TODO + }); + + // Time of creation + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Time of the most recent change to the project + // DateTime updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // ProjectModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_storage_collection_model_all_of_embedded_test.dart b/test/project_storage_collection_model_all_of_embedded_test.dart new file mode 100644 index 0000000..e71acd6 --- /dev/null +++ b/test/project_storage_collection_model_all_of_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectStorageCollectionModelAllOfEmbedded +void main() { + // final instance = ProjectStorageCollectionModelAllOfEmbedded(); + + group('test ProjectStorageCollectionModelAllOfEmbedded', () { + // List elements (default value: const []) + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_storage_collection_model_all_of_links_self_test.dart b/test/project_storage_collection_model_all_of_links_self_test.dart new file mode 100644 index 0000000..51798ac --- /dev/null +++ b/test/project_storage_collection_model_all_of_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectStorageCollectionModelAllOfLinksSelf +void main() { + // final instance = ProjectStorageCollectionModelAllOfLinksSelf(); + + group('test ProjectStorageCollectionModelAllOfLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_storage_collection_model_all_of_links_test.dart b/test/project_storage_collection_model_all_of_links_test.dart new file mode 100644 index 0000000..2d3858e --- /dev/null +++ b/test/project_storage_collection_model_all_of_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectStorageCollectionModelAllOfLinks +void main() { + // final instance = ProjectStorageCollectionModelAllOfLinks(); + + group('test ProjectStorageCollectionModelAllOfLinks', () { + // ProjectStorageCollectionModelAllOfLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_storage_collection_model_test.dart b/test/project_storage_collection_model_test.dart new file mode 100644 index 0000000..2b2dee1 --- /dev/null +++ b/test/project_storage_collection_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectStorageCollectionModel +void main() { + // final instance = ProjectStorageCollectionModel(); + + group('test ProjectStorageCollectionModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // ProjectStorageCollectionModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // ProjectStorageCollectionModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_storage_model_links_creator_test.dart b/test/project_storage_model_links_creator_test.dart new file mode 100644 index 0000000..0b5b310 --- /dev/null +++ b/test/project_storage_model_links_creator_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectStorageModelLinksCreator +void main() { + // final instance = ProjectStorageModelLinksCreator(); + + group('test ProjectStorageModelLinksCreator', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_storage_model_links_project_folder_test.dart b/test/project_storage_model_links_project_folder_test.dart new file mode 100644 index 0000000..90379d0 --- /dev/null +++ b/test/project_storage_model_links_project_folder_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectStorageModelLinksProjectFolder +void main() { + // final instance = ProjectStorageModelLinksProjectFolder(); + + group('test ProjectStorageModelLinksProjectFolder', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_storage_model_links_project_test.dart b/test/project_storage_model_links_project_test.dart new file mode 100644 index 0000000..d0e7633 --- /dev/null +++ b/test/project_storage_model_links_project_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectStorageModelLinksProject +void main() { + // final instance = ProjectStorageModelLinksProject(); + + group('test ProjectStorageModelLinksProject', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_storage_model_links_self_test.dart b/test/project_storage_model_links_self_test.dart new file mode 100644 index 0000000..98d20fc --- /dev/null +++ b/test/project_storage_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectStorageModelLinksSelf +void main() { + // final instance = ProjectStorageModelLinksSelf(); + + group('test ProjectStorageModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_storage_model_links_storage_test.dart b/test/project_storage_model_links_storage_test.dart new file mode 100644 index 0000000..c6b3f8e --- /dev/null +++ b/test/project_storage_model_links_storage_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectStorageModelLinksStorage +void main() { + // final instance = ProjectStorageModelLinksStorage(); + + group('test ProjectStorageModelLinksStorage', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_storage_model_links_test.dart b/test/project_storage_model_links_test.dart new file mode 100644 index 0000000..13c2c76 --- /dev/null +++ b/test/project_storage_model_links_test.dart @@ -0,0 +1,47 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectStorageModelLinks +void main() { + // final instance = ProjectStorageModelLinks(); + + group('test ProjectStorageModelLinks', () { + // ProjectStorageModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // ProjectStorageModelLinksCreator creator + test('to test the property `creator`', () async { + // TODO + }); + + // ProjectStorageModelLinksStorage storage + test('to test the property `storage`', () async { + // TODO + }); + + // ProjectStorageModelLinksProject project + test('to test the property `project`', () async { + // TODO + }); + + // ProjectStorageModelLinksProjectFolder projectFolder + test('to test the property `projectFolder`', () async { + // TODO + }); + + + }); + +} diff --git a/test/project_storage_model_test.dart b/test/project_storage_model_test.dart new file mode 100644 index 0000000..92746cf --- /dev/null +++ b/test/project_storage_model_test.dart @@ -0,0 +1,55 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ProjectStorageModel +void main() { + // final instance = ProjectStorageModel(); + + group('test ProjectStorageModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The project storage's id + // int id + test('to test the property `id`', () async { + // TODO + }); + + // String projectFolderMode + test('to test the property `projectFolderMode`', () async { + // TODO + }); + + // Time of creation + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Time of the most recent change to the project storage + // DateTime updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // ProjectStorageModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/projects_api_test.dart b/test/projects_api_test.dart new file mode 100644 index 0000000..6daa99c --- /dev/null +++ b/test/projects_api_test.dart @@ -0,0 +1,138 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for ProjectsApi +void main() { + // final instance = ProjectsApi(); + + group('tests for ProjectsApi', () { + // Create project + // + // Creates a new project, applying the attributes provided in the body. You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation. + // + //Future createProject({ Object body }) async + test('test createProject', () async { + // TODO + }); + + // Create project copy + // + // + // + //Future createProjectCopy(int id) async + test('test createProjectCopy', () async { + // TODO + }); + + // Delete Project + // + // Deletes the project permanently. As this is a lengthy process, the actual deletion is carried out asynchronously. So the project might exist well after the request has returned successfully. To prevent unwanted changes to the project scheduled for deletion, it is archived at once. + // + //Future deleteProject(int id) async + test('test deleteProject', () async { + // TODO + }); + + // List available parent project candidates + // + // Lists projects which can become parent to another project. Only sound candidates are returned. For instance a project cannot become parent of itself or it's children. To specify the project for which a parent is queried for, the `of` parameter can be provided. If no `of` parameter is provided, a new project is assumed. Then, the check for the hierarchy is omitted as a new project cannot be part of a hierarchy yet. Candidates can be filtered. Most commonly one will want to filter by name or identifier. You can do this through the `filters` parameter which works just like the work package index. For instance to find all parent candidates with \"rollout\" in their name: ``` ?filters=[{\"name_and_identifier\":{\"operator\":\"~\",\"values\":[\"rollout\"]}}] ``` + // + //Future listAvailableParentProjectCandidates({ String filters, String of_, String sortBy }) async + test('test listAvailableParentProjectCandidates', () async { + // TODO + }); + + // List projects + // + // Returns a collection of projects. The collection can be filtered via query parameters similar to how work packages are filtered. In addition to the provided filter, the result set is always limited to only contain projects the client is allowed to see. + // + //Future listProjects({ String filters, String sortBy, String select }) async + test('test listProjects', () async { + // TODO + }); + + // List projects having version + // + // This endpoint lists the projects where the given version is available. The projects returned depend on the sharing settings of the given version, but are also limited to the projects that the current user is allowed to see. + // + //Future listProjectsWithVersion(int id) async + test('test listProjectsWithVersion', () async { + // TODO + }); + + // Project copy form + // + // + // + //Future projectCopyForm(int id) async + test('test projectCopyForm', () async { + // TODO + }); + + // Project create form + // + // + // + //Future projectCreateForm({ Object body }) async + test('test projectCreateForm', () async { + // TODO + }); + + // Project update form + // + // + // + //Future projectUpdateForm(int id, { Object body }) async + test('test projectUpdateForm', () async { + // TODO + }); + + // Update Project + // + // Updates the given project by applying the attributes provided in the body. + // + //Future updateProject(int id, { Object body }) async + test('test updateProject', () async { + // TODO + }); + + // View project + // + // + // + //Future viewProject(int id) async + test('test viewProject', () async { + // TODO + }); + + // View project schema + // + // + // + //Future viewProjectSchema() async + test('test viewProjectSchema', () async { + // TODO + }); + + // View project status + // + // + // + //Future viewProjectStatus(String id) async + test('test viewProjectStatus', () async { + // TODO + }); + + }); +} diff --git a/test/queries_api_test.dart b/test/queries_api_test.dart new file mode 100644 index 0000000..1efae30 --- /dev/null +++ b/test/queries_api_test.dart @@ -0,0 +1,147 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for QueriesApi +void main() { + // final instance = QueriesApi(); + + group('tests for QueriesApi', () { + // Available projects for query + // + // Gets a list of projects that are available as projects a query can be assigned to. + // + //Future availableProjectsForQuery() async + test('test availableProjectsForQuery', () async { + // TODO + }); + + // Create query + // + // When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a Query can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. + // + //Future createQuery({ QueryCreateForm queryCreateForm }) async + test('test createQuery', () async { + // TODO + }); + + // Delete query + // + // Delete the query identified by the id parameter + // + //Future deleteQuery(int id) async + test('test deleteQuery', () async { + // TODO + }); + + // Edit Query + // + // When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body. Note that it is only allowed to provide properties or links supporting the **write** operation. + // + //Future editQuery(int id, { QueryUpdateForm queryUpdateForm }) async + test('test editQuery', () async { + // TODO + }); + + // List queries + // + // Returns a collection of queries. The collection can be filtered via query parameters similar to how work packages are filtered. Please note however, that the filters are applied to the queries and not to the work packages the queries in turn might return. + // + //Future listQueries({ String filters }) async + test('test listQueries', () async { + // TODO + }); + + // Query Create Form + // + // + // + //Future queryCreateForm({ QueryCreateForm queryCreateForm }) async + test('test queryCreateForm', () async { + // TODO + }); + + // Query Update Form + // + // + // + //Future queryUpdateForm(int id, { QueryUpdateForm queryUpdateForm }) async + test('test queryUpdateForm', () async { + // TODO + }); + + // Star query + // + // + // + //Future starQuery(int id) async + test('test starQuery', () async { + // TODO + }); + + // Unstar query + // + // + // + //Future unstarQuery(int id) async + test('test unstarQuery', () async { + // TODO + }); + + // View default query + // + // Same as [viewing an existing, persisted Query](https://www.openproject.org/docs/api/endpoints/queries/#list-queries) in its response, this resource returns an unpersisted query and by that allows to get the default query configuration. The client may also provide additional parameters which will modify the default query. + // + //Future viewDefaultQuery({ String filters, int offset, int pageSize, String sortBy, String groupBy, bool showSums, String timestamps, bool timelineVisible, String timelineZoomLevel, bool showHierarchies }) async + test('test viewDefaultQuery', () async { + // TODO + }); + + // View default query for project + // + // Same as [viewing an existing, persisted Query](https://www.openproject.org/docs/api/endpoints/queries/#list-queries) in its response, this resource returns an unpersisted query and by that allows to get the default query configuration. The client may also provide additional parameters which will modify the default query. The query will already be scoped for the project. + // + //Future viewDefaultQueryForProject(int id, { String filters, int offset, int pageSize, String sortBy, String groupBy, bool showSums, String timestamps, bool timelineVisible, bool showHierarchies }) async + test('test viewDefaultQueryForProject', () async { + // TODO + }); + + // View query + // + // Retrieve an individual query as identified by the id parameter. Then end point accepts a number of parameters that can be used to override the resources' persisted parameters. + // + //Future viewQuery(int id, { String filters, int offset, int pageSize, String columns, String sortBy, String groupBy, bool showSums, String timestamps, bool timelineVisible, String timelineLabels, String highlightingMode, String highlightedAttributes, bool showHierarchies }) async + test('test viewQuery', () async { + // TODO + }); + + // View schema for global queries + // + // Retrieve the schema for global queries, those, that are not assigned to a project. + // + //Future viewSchemaForGlobalQueries() async + test('test viewSchemaForGlobalQueries', () async { + // TODO + }); + + // View schema for project queries + // + // Retrieve the schema for project queries. + // + //Future viewSchemaForProjectQueries(int id) async + test('test viewSchemaForProjectQueries', () async { + // TODO + }); + + }); +} diff --git a/test/query_column_model_test.dart b/test/query_column_model_test.dart new file mode 100644 index 0000000..4369cde --- /dev/null +++ b/test/query_column_model_test.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryColumnModel +void main() { + // final instance = QueryColumnModel(); + + group('test QueryColumnModel', () { + // Query column id + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // Query column name + // Object name + test('to test the property `name`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_columns_api_test.dart b/test/query_columns_api_test.dart new file mode 100644 index 0000000..9ad29c9 --- /dev/null +++ b/test/query_columns_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for QueryColumnsApi +void main() { + // final instance = QueryColumnsApi(); + + group('tests for QueryColumnsApi', () { + // View Query Column + // + // Retrieve an individual QueryColumn as identified by the `id` parameter. + // + //Future viewQueryColumn(String id) async + test('test viewQueryColumn', () async { + // TODO + }); + + }); +} diff --git a/test/query_create_form_test.dart b/test/query_create_form_test.dart new file mode 100644 index 0000000..48c339d --- /dev/null +++ b/test/query_create_form_test.dart @@ -0,0 +1,28 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryCreateForm +void main() { + // final instance = QueryCreateForm(); + + group('test QueryCreateForm', () { + // Query name. + // Object name + test('to test the property `name`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_filter_instance_schema_api_test.dart b/test/query_filter_instance_schema_api_test.dart new file mode 100644 index 0000000..2efb470 --- /dev/null +++ b/test/query_filter_instance_schema_api_test.dart @@ -0,0 +1,48 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for QueryFilterInstanceSchemaApi +void main() { + // final instance = QueryFilterInstanceSchemaApi(); + + group('tests for QueryFilterInstanceSchemaApi', () { + // List Query Filter Instance Schemas + // + // Returns the list of QueryFilterInstanceSchemas defined for a global query. That is a query not assigned to a project. + // + //Future listQueryFilterInstanceSchemas() async + test('test listQueryFilterInstanceSchemas', () async { + // TODO + }); + + // List Query Filter Instance Schemas for Project + // + // Returns the list of QueryFilterInstanceSchemas defined for a query of the specified project. + // + //Future listQueryFilterInstanceSchemasForProject(int id) async + test('test listQueryFilterInstanceSchemasForProject', () async { + // TODO + }); + + // View Query Filter Instance Schema + // + // Retrieve an individual QueryFilterInstanceSchema as identified by the id parameter. + // + //Future viewQueryFilterInstanceSchema(String id) async + test('test viewQueryFilterInstanceSchema', () async { + // TODO + }); + + }); +} diff --git a/test/query_filter_instance_schema_model_links_filter_test.dart b/test/query_filter_instance_schema_model_links_filter_test.dart new file mode 100644 index 0000000..704e976 --- /dev/null +++ b/test/query_filter_instance_schema_model_links_filter_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryFilterInstanceSchemaModelLinksFilter +void main() { + // final instance = QueryFilterInstanceSchemaModelLinksFilter(); + + group('test QueryFilterInstanceSchemaModelLinksFilter', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_filter_instance_schema_model_links_self_test.dart b/test/query_filter_instance_schema_model_links_self_test.dart new file mode 100644 index 0000000..18cdcf3 --- /dev/null +++ b/test/query_filter_instance_schema_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryFilterInstanceSchemaModelLinksSelf +void main() { + // final instance = QueryFilterInstanceSchemaModelLinksSelf(); + + group('test QueryFilterInstanceSchemaModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_filter_instance_schema_model_links_test.dart b/test/query_filter_instance_schema_model_links_test.dart new file mode 100644 index 0000000..816b88c --- /dev/null +++ b/test/query_filter_instance_schema_model_links_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryFilterInstanceSchemaModelLinks +void main() { + // final instance = QueryFilterInstanceSchemaModelLinks(); + + group('test QueryFilterInstanceSchemaModelLinks', () { + // QueryFilterInstanceSchemaModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // QueryFilterInstanceSchemaModelLinksFilter filter + test('to test the property `filter`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_filter_instance_schema_model_test.dart b/test/query_filter_instance_schema_model_test.dart new file mode 100644 index 0000000..4b6bab9 --- /dev/null +++ b/test/query_filter_instance_schema_model_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryFilterInstanceSchemaModel +void main() { + // final instance = QueryFilterInstanceSchemaModel(); + + group('test QueryFilterInstanceSchemaModel', () { + // Describes the name attribute + // Object name + test('to test the property `name`', () async { + // TODO + }); + + // QuerySortBy name + // Object filter + test('to test the property `filter`', () async { + // TODO + }); + + // QueryFilterInstanceSchemaModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_filter_model_test.dart b/test/query_filter_model_test.dart new file mode 100644 index 0000000..cf839bf --- /dev/null +++ b/test/query_filter_model_test.dart @@ -0,0 +1,28 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryFilterModel +void main() { + // final instance = QueryFilterModel(); + + group('test QueryFilterModel', () { + // QueryFilter id + // Object id + test('to test the property `id`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_filters_api_test.dart b/test/query_filters_api_test.dart new file mode 100644 index 0000000..71fd63b --- /dev/null +++ b/test/query_filters_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for QueryFiltersApi +void main() { + // final instance = QueryFiltersApi(); + + group('tests for QueryFiltersApi', () { + // View Query Filter + // + // Retrieve an individual QueryFilter as identified by the id parameter. + // + //Future viewQueryFilter(String id) async + test('test viewQueryFilter', () async { + // TODO + }); + + }); +} diff --git a/test/query_model_links_star_test.dart b/test/query_model_links_star_test.dart new file mode 100644 index 0000000..9b57e0f --- /dev/null +++ b/test/query_model_links_star_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryModelLinksStar +void main() { + // final instance = QueryModelLinksStar(); + + group('test QueryModelLinksStar', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_model_links_test.dart b/test/query_model_links_test.dart new file mode 100644 index 0000000..355211e --- /dev/null +++ b/test/query_model_links_test.dart @@ -0,0 +1,42 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryModelLinks +void main() { + // final instance = QueryModelLinks(); + + group('test QueryModelLinks', () { + // QueryModelLinksStar star + test('to test the property `star`', () async { + // TODO + }); + + // QueryModelLinksUnstar unstar + test('to test the property `unstar`', () async { + // TODO + }); + + // QueryModelLinksUpdate update + test('to test the property `update`', () async { + // TODO + }); + + // QueryModelLinksUpdateImmediately updateImmediately + test('to test the property `updateImmediately`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_model_links_unstar_test.dart b/test/query_model_links_unstar_test.dart new file mode 100644 index 0000000..be022c0 --- /dev/null +++ b/test/query_model_links_unstar_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryModelLinksUnstar +void main() { + // final instance = QueryModelLinksUnstar(); + + group('test QueryModelLinksUnstar', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_model_links_update_immediately_test.dart b/test/query_model_links_update_immediately_test.dart new file mode 100644 index 0000000..8dd16cf --- /dev/null +++ b/test/query_model_links_update_immediately_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryModelLinksUpdateImmediately +void main() { + // final instance = QueryModelLinksUpdateImmediately(); + + group('test QueryModelLinksUpdateImmediately', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_model_links_update_test.dart b/test/query_model_links_update_test.dart new file mode 100644 index 0000000..4e64cbe --- /dev/null +++ b/test/query_model_links_update_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryModelLinksUpdate +void main() { + // final instance = QueryModelLinksUpdate(); + + group('test QueryModelLinksUpdate', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_model_test.dart b/test/query_model_test.dart new file mode 100644 index 0000000..dcf5baa --- /dev/null +++ b/test/query_model_test.dart @@ -0,0 +1,115 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryModel +void main() { + // final instance = QueryModel(); + + group('test QueryModel', () { + // Query id + // int id + test('to test the property `id`', () async { + // TODO + }); + + // Query name + // String name + test('to test the property `name`', () async { + // TODO + }); + + // List filters (default value: const []) + test('to test the property `filters`', () async { + // TODO + }); + + // Should sums (of supported properties) be shown? + // bool sums + test('to test the property `sums`', () async { + // TODO + }); + + // Should the timeline mode be shown? + // bool timelineVisible + test('to test the property `timelineVisible`', () async { + // TODO + }); + + // List timelineLabels (default value: const []) + test('to test the property `timelineLabels`', () async { + // TODO + }); + + // Which zoom level should the timeline be rendered in? + // String timelineZoomLevel + test('to test the property `timelineZoomLevel`', () async { + // TODO + }); + + // Timestamps to filter by when showing changed attributes on work packages. + // Object timestamps + test('to test the property `timestamps`', () async { + // TODO + }); + + // Which highlighting mode should the table have? + // Object highlightingMode + test('to test the property `highlightingMode`', () async { + // TODO + }); + + // Should the hierarchy mode be enabled? + // Object showHierarchies + test('to test the property `showHierarchies`', () async { + // TODO + }); + + // Should the query be hidden from the query list? + // Object hidden + test('to test the property `hidden`', () async { + // TODO + }); + + // Can users besides the owner see the query? + // Object public + test('to test the property `public`', () async { + // TODO + }); + + // Should the query be highlighted to the user? + // Object starred + test('to test the property `starred`', () async { + // TODO + }); + + // Time of creation + // Object createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Time of the most recent change to the query + // Object updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // QueryModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_operator_model_test.dart b/test/query_operator_model_test.dart new file mode 100644 index 0000000..3ac7cd6 --- /dev/null +++ b/test/query_operator_model_test.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryOperatorModel +void main() { + // final instance = QueryOperatorModel(); + + group('test QueryOperatorModel', () { + // Query operator id + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // Query operator name + // Object name + test('to test the property `name`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_operators_api_test.dart b/test/query_operators_api_test.dart new file mode 100644 index 0000000..dd82e27 --- /dev/null +++ b/test/query_operators_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for QueryOperatorsApi +void main() { + // final instance = QueryOperatorsApi(); + + group('tests for QueryOperatorsApi', () { + // View Query Operator + // + // Retrieve an individual QueryOperator as identified by the `id` parameter. + // + //Future viewQueryOperator(String id) async + test('test viewQueryOperator', () async { + // TODO + }); + + }); +} diff --git a/test/query_sort_by_model_test.dart b/test/query_sort_by_model_test.dart new file mode 100644 index 0000000..07a95cc --- /dev/null +++ b/test/query_sort_by_model_test.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QuerySortByModel +void main() { + // final instance = QuerySortByModel(); + + group('test QuerySortByModel', () { + // QuerySortBy id + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // QuerySortBy name + // Object name + test('to test the property `name`', () async { + // TODO + }); + + + }); + +} diff --git a/test/query_sort_bys_api_test.dart b/test/query_sort_bys_api_test.dart new file mode 100644 index 0000000..62b81bb --- /dev/null +++ b/test/query_sort_bys_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for QuerySortBysApi +void main() { + // final instance = QuerySortBysApi(); + + group('tests for QuerySortBysApi', () { + // View Query Sort By + // + // Retrieve an individual QuerySortBy as identified by the id parameter. + // + //Future viewQuerySortBy(String id) async + test('test viewQuerySortBy', () async { + // TODO + }); + + }); +} diff --git a/test/query_update_form_test.dart b/test/query_update_form_test.dart new file mode 100644 index 0000000..d1892c6 --- /dev/null +++ b/test/query_update_form_test.dart @@ -0,0 +1,28 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for QueryUpdateForm +void main() { + // final instance = QueryUpdateForm(); + + group('test QueryUpdateForm', () { + // Query name. + // Object name + test('to test the property `name`', () async { + // TODO + }); + + + }); + +} diff --git a/test/relation_model_links_delete_test.dart b/test/relation_model_links_delete_test.dart new file mode 100644 index 0000000..0eeed47 --- /dev/null +++ b/test/relation_model_links_delete_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RelationModelLinksDelete +void main() { + // final instance = RelationModelLinksDelete(); + + group('test RelationModelLinksDelete', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/relation_model_links_from_test.dart b/test/relation_model_links_from_test.dart new file mode 100644 index 0000000..743d3d7 --- /dev/null +++ b/test/relation_model_links_from_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RelationModelLinksFrom +void main() { + // final instance = RelationModelLinksFrom(); + + group('test RelationModelLinksFrom', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/relation_model_links_schema_test.dart b/test/relation_model_links_schema_test.dart new file mode 100644 index 0000000..672fd1b --- /dev/null +++ b/test/relation_model_links_schema_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RelationModelLinksSchema +void main() { + // final instance = RelationModelLinksSchema(); + + group('test RelationModelLinksSchema', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/relation_model_links_self_test.dart b/test/relation_model_links_self_test.dart new file mode 100644 index 0000000..0585a4f --- /dev/null +++ b/test/relation_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RelationModelLinksSelf +void main() { + // final instance = RelationModelLinksSelf(); + + group('test RelationModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/relation_model_links_test.dart b/test/relation_model_links_test.dart new file mode 100644 index 0000000..31ad668 --- /dev/null +++ b/test/relation_model_links_test.dart @@ -0,0 +1,57 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RelationModelLinks +void main() { + // final instance = RelationModelLinks(); + + group('test RelationModelLinks', () { + // RelationModelLinksUpdate update + test('to test the property `update`', () async { + // TODO + }); + + // RelationModelLinksUpdateImmediately updateImmediately + test('to test the property `updateImmediately`', () async { + // TODO + }); + + // RelationModelLinksDelete delete + test('to test the property `delete`', () async { + // TODO + }); + + // RelationModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // RelationModelLinksSchema schema + test('to test the property `schema`', () async { + // TODO + }); + + // RelationModelLinksFrom from + test('to test the property `from`', () async { + // TODO + }); + + // RelationModelLinksTo to + test('to test the property `to`', () async { + // TODO + }); + + + }); + +} diff --git a/test/relation_model_links_to_test.dart b/test/relation_model_links_to_test.dart new file mode 100644 index 0000000..d51b03d --- /dev/null +++ b/test/relation_model_links_to_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RelationModelLinksTo +void main() { + // final instance = RelationModelLinksTo(); + + group('test RelationModelLinksTo', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/relation_model_links_update_immediately_test.dart b/test/relation_model_links_update_immediately_test.dart new file mode 100644 index 0000000..053f02e --- /dev/null +++ b/test/relation_model_links_update_immediately_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RelationModelLinksUpdateImmediately +void main() { + // final instance = RelationModelLinksUpdateImmediately(); + + group('test RelationModelLinksUpdateImmediately', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/relation_model_links_update_test.dart b/test/relation_model_links_update_test.dart new file mode 100644 index 0000000..f41dfba --- /dev/null +++ b/test/relation_model_links_update_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RelationModelLinksUpdate +void main() { + // final instance = RelationModelLinksUpdate(); + + group('test RelationModelLinksUpdate', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/relation_model_test.dart b/test/relation_model_test.dart new file mode 100644 index 0000000..6217a71 --- /dev/null +++ b/test/relation_model_test.dart @@ -0,0 +1,63 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RelationModel +void main() { + // final instance = RelationModel(); + + group('test RelationModel', () { + // Relation ID + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // The internationalized name of this kind of relation + // Object name + test('to test the property `name`', () async { + // TODO + }); + + // Which kind of relation (blocks, precedes, etc.) + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // The kind of relation from the other WP's perspective + // Object reverseType + test('to test the property `reverseType`', () async { + // TODO + }); + + // Short text further describing the relation + // Object description + test('to test the property `description`', () async { + // TODO + }); + + // The delay in days between closing of `from` and start of `to` + // Object delayStar + test('to test the property `delayStar`', () async { + // TODO + }); + + // RelationModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/relations_api_test.dart b/test/relations_api_test.dart new file mode 100644 index 0000000..b07b11b --- /dev/null +++ b/test/relations_api_test.dart @@ -0,0 +1,84 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for RelationsApi +void main() { + // final instance = RelationsApi(); + + group('tests for RelationsApi', () { + // Delete Relation + // + // Deletes the relation. + // + //Future deleteRelation(int id) async + test('test deleteRelation', () async { + // TODO + }); + + // Edit Relation + // + // When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body. It is only allowed to provide properties or links supporting the **write** operation. Note that changing the `type` of a relation invariably also changes the respective `reverseType` as well as the \"name\" of it. The returned Relation object will reflect that change. For instance if you change a Relation's `type` to \"follows\" then the `reverseType` will be changed to `precedes`. + // + //Future editRelation(int id) async + test('test editRelation', () async { + // TODO + }); + + // List Relations + // + // Lists all relations according to the given (optional, logically conjunctive) filters and ordered by ID. The response only includes relations between work packages which the user is allowed to see. + // + //Future listRelations({ String filters, String sortBy }) async + test('test listRelations', () async { + // TODO + }); + + // Relation edit form + // + // + // + //Future relationEditForm(int id) async + test('test relationEditForm', () async { + // TODO + }); + + // View Relation + // + // + // + //Future viewRelation(int id) async + test('test viewRelation', () async { + // TODO + }); + + // View relation schema + // + // + // + //Future viewRelationSchema() async + test('test viewRelationSchema', () async { + // TODO + }); + + // View relation schema for type + // + // + // + //Future viewRelationSchemaForType(String type) async + test('test viewRelationSchemaForType', () async { + // TODO + }); + + }); +} diff --git a/test/revision_model_links_author_test.dart b/test/revision_model_links_author_test.dart new file mode 100644 index 0000000..9327446 --- /dev/null +++ b/test/revision_model_links_author_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RevisionModelLinksAuthor +void main() { + // final instance = RevisionModelLinksAuthor(); + + group('test RevisionModelLinksAuthor', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/revision_model_links_project_test.dart b/test/revision_model_links_project_test.dart new file mode 100644 index 0000000..a4c3d22 --- /dev/null +++ b/test/revision_model_links_project_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RevisionModelLinksProject +void main() { + // final instance = RevisionModelLinksProject(); + + group('test RevisionModelLinksProject', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/revision_model_links_self_test.dart b/test/revision_model_links_self_test.dart new file mode 100644 index 0000000..51c781f --- /dev/null +++ b/test/revision_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RevisionModelLinksSelf +void main() { + // final instance = RevisionModelLinksSelf(); + + group('test RevisionModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/revision_model_links_show_revision_test.dart b/test/revision_model_links_show_revision_test.dart new file mode 100644 index 0000000..7005007 --- /dev/null +++ b/test/revision_model_links_show_revision_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RevisionModelLinksShowRevision +void main() { + // final instance = RevisionModelLinksShowRevision(); + + group('test RevisionModelLinksShowRevision', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/revision_model_links_test.dart b/test/revision_model_links_test.dart new file mode 100644 index 0000000..823d3c2 --- /dev/null +++ b/test/revision_model_links_test.dart @@ -0,0 +1,42 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RevisionModelLinks +void main() { + // final instance = RevisionModelLinks(); + + group('test RevisionModelLinks', () { + // RevisionModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // RevisionModelLinksProject project + test('to test the property `project`', () async { + // TODO + }); + + // RevisionModelLinksAuthor author + test('to test the property `author`', () async { + // TODO + }); + + // RevisionModelLinksShowRevision showRevision + test('to test the property `showRevision`', () async { + // TODO + }); + + + }); + +} diff --git a/test/revision_model_message_test.dart b/test/revision_model_message_test.dart new file mode 100644 index 0000000..82c5c71 --- /dev/null +++ b/test/revision_model_message_test.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RevisionModelMessage +void main() { + // final instance = RevisionModelMessage(); + + group('test RevisionModelMessage', () { + // Indicates the formatting language of the raw text + // String format + test('to test the property `format`', () async { + // TODO + }); + + // The raw text, as entered by the user + // String raw + test('to test the property `raw`', () async { + // TODO + }); + + // The text converted to HTML according to the format + // String html + test('to test the property `html`', () async { + // TODO + }); + + + }); + +} diff --git a/test/revision_model_test.dart b/test/revision_model_test.dart new file mode 100644 index 0000000..86a831e --- /dev/null +++ b/test/revision_model_test.dart @@ -0,0 +1,62 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RevisionModel +void main() { + // final instance = RevisionModel(); + + group('test RevisionModel', () { + // Revision's id, assigned by OpenProject + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // The raw SCM identifier of the revision (e.g. full SHA hash) + // Object identifier + test('to test the property `identifier`', () async { + // TODO + }); + + // The SCM identifier of the revision, formatted (e.g. shortened unambiguous SHA hash). May be identical to identifier in many cases + // Object formattedIdentifier + test('to test the property `formattedIdentifier`', () async { + // TODO + }); + + // The name of the author that committed this revision. Note that this name is retrieved from the repository and does not identify a user in OpenProject. + // Object authorName + test('to test the property `authorName`', () async { + // TODO + }); + + // RevisionModelMessage message + test('to test the property `message`', () async { + // TODO + }); + + // The time this revision was committed to the repository + // Object createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // RevisionModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/revisions_api_test.dart b/test/revisions_api_test.dart new file mode 100644 index 0000000..bbeecdb --- /dev/null +++ b/test/revisions_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for RevisionsApi +void main() { + // final instance = RevisionsApi(); + + group('tests for RevisionsApi', () { + // View revision + // + // + // + //Future viewRevision(int id) async + test('test viewRevision', () async { + // TODO + }); + + }); +} diff --git a/test/role_model_links_self_test.dart b/test/role_model_links_self_test.dart new file mode 100644 index 0000000..bd05baf --- /dev/null +++ b/test/role_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RoleModelLinksSelf +void main() { + // final instance = RoleModelLinksSelf(); + + group('test RoleModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/role_model_links_test.dart b/test/role_model_links_test.dart new file mode 100644 index 0000000..e081bbf --- /dev/null +++ b/test/role_model_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RoleModelLinks +void main() { + // final instance = RoleModelLinks(); + + group('test RoleModelLinks', () { + // RoleModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/role_model_test.dart b/test/role_model_test.dart new file mode 100644 index 0000000..f927ac3 --- /dev/null +++ b/test/role_model_test.dart @@ -0,0 +1,44 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RoleModel +void main() { + // final instance = RoleModel(); + + group('test RoleModel', () { + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // Role id + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // Role name + // Object name + test('to test the property `name`', () async { + // TODO + }); + + // RoleModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/roles_api_test.dart b/test/roles_api_test.dart new file mode 100644 index 0000000..ecf2a13 --- /dev/null +++ b/test/roles_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for RolesApi +void main() { + // final instance = RolesApi(); + + group('tests for RolesApi', () { + // List roles + // + // List all defined roles. This includes built in roles like 'Anonymous' and 'Non member'. + // + //Future listRoles({ String filters }) async + test('test listRoles', () async { + // TODO + }); + + // View role + // + // Fetch an individual role. + // + //Future viewRole(int id) async + test('test viewRole', () async { + // TODO + }); + + }); +} diff --git a/test/root_api_test.dart b/test/root_api_test.dart new file mode 100644 index 0000000..f6a05af --- /dev/null +++ b/test/root_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for RootApi +void main() { + // final instance = RootApi(); + + group('tests for RootApi', () { + // View root + // + // Returns the root resource, containing basic information about the server instance and a collection of useful links. + // + //Future viewRoot() async + test('test viewRoot', () async { + // TODO + }); + + }); +} diff --git a/test/root_model_links_configuration_test.dart b/test/root_model_links_configuration_test.dart new file mode 100644 index 0000000..713a4dd --- /dev/null +++ b/test/root_model_links_configuration_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RootModelLinksConfiguration +void main() { + // final instance = RootModelLinksConfiguration(); + + group('test RootModelLinksConfiguration', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/root_model_links_memberships_test.dart b/test/root_model_links_memberships_test.dart new file mode 100644 index 0000000..b4e9bdc --- /dev/null +++ b/test/root_model_links_memberships_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RootModelLinksMemberships +void main() { + // final instance = RootModelLinksMemberships(); + + group('test RootModelLinksMemberships', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/root_model_links_priorities_test.dart b/test/root_model_links_priorities_test.dart new file mode 100644 index 0000000..fc61d2f --- /dev/null +++ b/test/root_model_links_priorities_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RootModelLinksPriorities +void main() { + // final instance = RootModelLinksPriorities(); + + group('test RootModelLinksPriorities', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/root_model_links_relations_test.dart b/test/root_model_links_relations_test.dart new file mode 100644 index 0000000..dd91f87 --- /dev/null +++ b/test/root_model_links_relations_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RootModelLinksRelations +void main() { + // final instance = RootModelLinksRelations(); + + group('test RootModelLinksRelations', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/root_model_links_self_test.dart b/test/root_model_links_self_test.dart new file mode 100644 index 0000000..7a88724 --- /dev/null +++ b/test/root_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RootModelLinksSelf +void main() { + // final instance = RootModelLinksSelf(); + + group('test RootModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/root_model_links_statuses_test.dart b/test/root_model_links_statuses_test.dart new file mode 100644 index 0000000..efc7072 --- /dev/null +++ b/test/root_model_links_statuses_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RootModelLinksStatuses +void main() { + // final instance = RootModelLinksStatuses(); + + group('test RootModelLinksStatuses', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/root_model_links_test.dart b/test/root_model_links_test.dart new file mode 100644 index 0000000..9fe5b18 --- /dev/null +++ b/test/root_model_links_test.dart @@ -0,0 +1,77 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RootModelLinks +void main() { + // final instance = RootModelLinks(); + + group('test RootModelLinks', () { + // RootModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // RootModelLinksConfiguration configuration + test('to test the property `configuration`', () async { + // TODO + }); + + // RootModelLinksMemberships memberships + test('to test the property `memberships`', () async { + // TODO + }); + + // RootModelLinksPriorities priorities + test('to test the property `priorities`', () async { + // TODO + }); + + // RootModelLinksRelations relations + test('to test the property `relations`', () async { + // TODO + }); + + // RootModelLinksStatuses statuses + test('to test the property `statuses`', () async { + // TODO + }); + + // RootModelLinksTimeEntries timeEntries + test('to test the property `timeEntries`', () async { + // TODO + }); + + // RootModelLinksTypes types + test('to test the property `types`', () async { + // TODO + }); + + // RootModelLinksUser user + test('to test the property `user`', () async { + // TODO + }); + + // RootModelLinksUserPreferences userPreferences + test('to test the property `userPreferences`', () async { + // TODO + }); + + // RootModelLinksWorkPackages workPackages + test('to test the property `workPackages`', () async { + // TODO + }); + + + }); + +} diff --git a/test/root_model_links_time_entries_test.dart b/test/root_model_links_time_entries_test.dart new file mode 100644 index 0000000..ca98e97 --- /dev/null +++ b/test/root_model_links_time_entries_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RootModelLinksTimeEntries +void main() { + // final instance = RootModelLinksTimeEntries(); + + group('test RootModelLinksTimeEntries', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/root_model_links_types_test.dart b/test/root_model_links_types_test.dart new file mode 100644 index 0000000..a8dec71 --- /dev/null +++ b/test/root_model_links_types_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RootModelLinksTypes +void main() { + // final instance = RootModelLinksTypes(); + + group('test RootModelLinksTypes', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/root_model_links_user_preferences_test.dart b/test/root_model_links_user_preferences_test.dart new file mode 100644 index 0000000..65ca7e5 --- /dev/null +++ b/test/root_model_links_user_preferences_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RootModelLinksUserPreferences +void main() { + // final instance = RootModelLinksUserPreferences(); + + group('test RootModelLinksUserPreferences', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/root_model_links_user_test.dart b/test/root_model_links_user_test.dart new file mode 100644 index 0000000..0186fc8 --- /dev/null +++ b/test/root_model_links_user_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RootModelLinksUser +void main() { + // final instance = RootModelLinksUser(); + + group('test RootModelLinksUser', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/root_model_links_work_packages_test.dart b/test/root_model_links_work_packages_test.dart new file mode 100644 index 0000000..95bbd49 --- /dev/null +++ b/test/root_model_links_work_packages_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RootModelLinksWorkPackages +void main() { + // final instance = RootModelLinksWorkPackages(); + + group('test RootModelLinksWorkPackages', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/root_model_test.dart b/test/root_model_test.dart new file mode 100644 index 0000000..28e770c --- /dev/null +++ b/test/root_model_test.dart @@ -0,0 +1,44 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for RootModel +void main() { + // final instance = RootModel(); + + group('test RootModel', () { + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // The name of the OpenProject instance + // Object instanceName + test('to test the property `instanceName`', () async { + // TODO + }); + + // The OpenProject core version number for the instance # Conditions **Permission** requires admin privileges + // Object coreVersion + test('to test the property `coreVersion`', () async { + // TODO + }); + + // RootModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/schema_model_links_self_test.dart b/test/schema_model_links_self_test.dart new file mode 100644 index 0000000..2292e39 --- /dev/null +++ b/test/schema_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for SchemaModelLinksSelf +void main() { + // final instance = SchemaModelLinksSelf(); + + group('test SchemaModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/schema_model_links_test.dart b/test/schema_model_links_test.dart new file mode 100644 index 0000000..628851c --- /dev/null +++ b/test/schema_model_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for SchemaModelLinks +void main() { + // final instance = SchemaModelLinks(); + + group('test SchemaModelLinks', () { + // SchemaModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/schema_model_test.dart b/test/schema_model_test.dart new file mode 100644 index 0000000..a8d236d --- /dev/null +++ b/test/schema_model_test.dart @@ -0,0 +1,38 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for SchemaModel +void main() { + // final instance = SchemaModel(); + + group('test SchemaModel', () { + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // A list of dependencies between one property's value and another property + // Object dependencies + test('to test the property `dependencies`', () async { + // TODO + }); + + // SchemaModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/schemas_api_test.dart b/test/schemas_api_test.dart new file mode 100644 index 0000000..84cb94a --- /dev/null +++ b/test/schemas_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for SchemasApi +void main() { + // final instance = SchemasApi(); + + group('tests for SchemasApi', () { + // view the schema + // + // This is an example of how a schema might look like. Note that this endpoint does not exist in the actual implementation. + // + //Future viewTheSchema() async + test('test viewTheSchema', () async { + // TODO + }); + + }); +} diff --git a/test/show_or_validate_form_request_test.dart b/test/show_or_validate_form_request_test.dart new file mode 100644 index 0000000..4dbb0b6 --- /dev/null +++ b/test/show_or_validate_form_request_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ShowOrValidateFormRequest +void main() { + // final instance = ShowOrValidateFormRequest(); + + group('test ShowOrValidateFormRequest', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // num lockVersion + test('to test the property `lockVersion`', () async { + // TODO + }); + + // String subject + test('to test the property `subject`', () async { + // TODO + }); + + + }); + +} diff --git a/test/status_model_links_self_test.dart b/test/status_model_links_self_test.dart new file mode 100644 index 0000000..9035237 --- /dev/null +++ b/test/status_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StatusModelLinksSelf +void main() { + // final instance = StatusModelLinksSelf(); + + group('test StatusModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/status_model_links_test.dart b/test/status_model_links_test.dart new file mode 100644 index 0000000..168309a --- /dev/null +++ b/test/status_model_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StatusModelLinks +void main() { + // final instance = StatusModelLinks(); + + group('test StatusModelLinks', () { + // StatusModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/status_model_test.dart b/test/status_model_test.dart new file mode 100644 index 0000000..5b1ffff --- /dev/null +++ b/test/status_model_test.dart @@ -0,0 +1,73 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StatusModel +void main() { + // final instance = StatusModel(); + + group('test StatusModel', () { + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // Status id + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // Status name + // Object name + test('to test the property `name`', () async { + // TODO + }); + + // Sort index of the status + // Object position + test('to test the property `position`', () async { + // TODO + }); + + // Object isDefault + test('to test the property `isDefault`', () async { + // TODO + }); + + // are tickets of this status considered closed? + // Object isClosed + test('to test the property `isClosed`', () async { + // TODO + }); + + // are tickets of this status read only? + // Object isReadonly + test('to test the property `isReadonly`', () async { + // TODO + }); + + // The percentageDone being applied when changing to this status + // Object defaultDoneRatio + test('to test the property `defaultDoneRatio`', () async { + // TODO + }); + + // StatusModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/statuses_api_test.dart b/test/statuses_api_test.dart new file mode 100644 index 0000000..59cfd11 --- /dev/null +++ b/test/statuses_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for StatusesApi +void main() { + // final instance = StatusesApi(); + + group('tests for StatusesApi', () { + // List all Statuses + // + // + // + //Future listAllStatuses() async + test('test listAllStatuses', () async { + // TODO + }); + + // View Status + // + // + // + //Future viewStatus(int id) async + test('test viewStatus', () async { + // TODO + }); + + }); +} diff --git a/test/storage_file_model_all_of_links_self_test.dart b/test/storage_file_model_all_of_links_self_test.dart new file mode 100644 index 0000000..d202822 --- /dev/null +++ b/test/storage_file_model_all_of_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageFileModelAllOfLinksSelf +void main() { + // final instance = StorageFileModelAllOfLinksSelf(); + + group('test StorageFileModelAllOfLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_file_model_all_of_links_test.dart b/test/storage_file_model_all_of_links_test.dart new file mode 100644 index 0000000..1586a92 --- /dev/null +++ b/test/storage_file_model_all_of_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageFileModelAllOfLinks +void main() { + // final instance = StorageFileModelAllOfLinks(); + + group('test StorageFileModelAllOfLinks', () { + // StorageFileModelAllOfLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_file_model_test.dart b/test/storage_file_model_test.dart new file mode 100644 index 0000000..04f7a6b --- /dev/null +++ b/test/storage_file_model_test.dart @@ -0,0 +1,86 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageFileModel +void main() { + // final instance = StorageFileModel(); + + group('test StorageFileModel', () { + // Linked file's id on the origin + // String id + test('to test the property `id`', () async { + // TODO + }); + + // Linked file's name on the origin + // String name + test('to test the property `name`', () async { + // TODO + }); + + // MIME type of the linked file. To link a folder entity, the custom MIME type `application/x-op-directory` MUST be provided. Otherwise it defaults back to an unknown MIME type. + // String mimeType + test('to test the property `mimeType`', () async { + // TODO + }); + + // file size on origin in bytes + // int size + test('to test the property `size`', () async { + // TODO + }); + + // Timestamp of the creation datetime of the file on the origin + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Timestamp of the datetime of the last modification of the file on the origin + // DateTime lastModifiedAt + test('to test the property `lastModifiedAt`', () async { + // TODO + }); + + // Display name of the author that created the file on the origin + // String createdByName + test('to test the property `createdByName`', () async { + // TODO + }); + + // Display name of the author that modified the file on the origin last + // String lastModifiedByName + test('to test the property `lastModifiedByName`', () async { + // TODO + }); + + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // Location identification for file in storage + // Object location + test('to test the property `location`', () async { + // TODO + }); + + // StorageFileModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_file_upload_link_model_links_destination_test.dart b/test/storage_file_upload_link_model_links_destination_test.dart new file mode 100644 index 0000000..aaab146 --- /dev/null +++ b/test/storage_file_upload_link_model_links_destination_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageFileUploadLinkModelLinksDestination +void main() { + // final instance = StorageFileUploadLinkModelLinksDestination(); + + group('test StorageFileUploadLinkModelLinksDestination', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_file_upload_link_model_links_self_test.dart b/test/storage_file_upload_link_model_links_self_test.dart new file mode 100644 index 0000000..a8f167c --- /dev/null +++ b/test/storage_file_upload_link_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageFileUploadLinkModelLinksSelf +void main() { + // final instance = StorageFileUploadLinkModelLinksSelf(); + + group('test StorageFileUploadLinkModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_file_upload_link_model_links_test.dart b/test/storage_file_upload_link_model_links_test.dart new file mode 100644 index 0000000..c5787fb --- /dev/null +++ b/test/storage_file_upload_link_model_links_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageFileUploadLinkModelLinks +void main() { + // final instance = StorageFileUploadLinkModelLinks(); + + group('test StorageFileUploadLinkModelLinks', () { + // StorageFileUploadLinkModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // StorageFileUploadLinkModelLinksDestination destination + test('to test the property `destination`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_file_upload_link_model_test.dart b/test/storage_file_upload_link_model_test.dart new file mode 100644 index 0000000..5d3e562 --- /dev/null +++ b/test/storage_file_upload_link_model_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageFileUploadLinkModel +void main() { + // final instance = StorageFileUploadLinkModel(); + + group('test StorageFileUploadLinkModel', () { + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // StorageFileUploadLinkModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_file_upload_preparation_model_test.dart b/test/storage_file_upload_preparation_model_test.dart new file mode 100644 index 0000000..612f9df --- /dev/null +++ b/test/storage_file_upload_preparation_model_test.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageFileUploadPreparationModel +void main() { + // final instance = StorageFileUploadPreparationModel(); + + group('test StorageFileUploadPreparationModel', () { + // The project identifier, from where a user starts uploading a file. + // Object projectId + test('to test the property `projectId`', () async { + // TODO + }); + + // The file name. + // Object fileName + test('to test the property `fileName`', () async { + // TODO + }); + + // The directory to which the file is to be uploaded. For root directories, the value `/` must be provided. + // Object parent + test('to test the property `parent`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_files_model_parent_test.dart b/test/storage_files_model_parent_test.dart new file mode 100644 index 0000000..6899168 --- /dev/null +++ b/test/storage_files_model_parent_test.dart @@ -0,0 +1,86 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageFilesModelParent +void main() { + // final instance = StorageFilesModelParent(); + + group('test StorageFilesModelParent', () { + // Linked file's id on the origin + // String id + test('to test the property `id`', () async { + // TODO + }); + + // Linked file's name on the origin + // String name + test('to test the property `name`', () async { + // TODO + }); + + // MIME type of the linked file. To link a folder entity, the custom MIME type `application/x-op-directory` MUST be provided. Otherwise it defaults back to an unknown MIME type. + // String mimeType + test('to test the property `mimeType`', () async { + // TODO + }); + + // file size on origin in bytes + // int size + test('to test the property `size`', () async { + // TODO + }); + + // Timestamp of the creation datetime of the file on the origin + // DateTime createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Timestamp of the datetime of the last modification of the file on the origin + // DateTime lastModifiedAt + test('to test the property `lastModifiedAt`', () async { + // TODO + }); + + // Display name of the author that created the file on the origin + // String createdByName + test('to test the property `createdByName`', () async { + // TODO + }); + + // Display name of the author that modified the file on the origin last + // String lastModifiedByName + test('to test the property `lastModifiedByName`', () async { + // TODO + }); + + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // Location identification for file in storage + // Object location + test('to test the property `location`', () async { + // TODO + }); + + // StorageFileModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_files_model_test.dart b/test/storage_files_model_test.dart new file mode 100644 index 0000000..6639b40 --- /dev/null +++ b/test/storage_files_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageFilesModel +void main() { + // final instance = StorageFilesModel(); + + group('test StorageFilesModel', () { + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // List of files provided by the selected storage. + // Object files + test('to test the property `files`', () async { + // TODO + }); + + // StorageFilesModelParent parent + test('to test the property `parent`', () async { + // TODO + }); + + // List of ancestors of the parent directory. Can be empty, if parent directory was root directory. + // Object ancestors + test('to test the property `ancestors`', () async { + // TODO + }); + + // StorageFileModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_read_model_embedded_test.dart b/test/storage_read_model_embedded_test.dart new file mode 100644 index 0000000..26e3aad --- /dev/null +++ b/test/storage_read_model_embedded_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageReadModelEmbedded +void main() { + // final instance = StorageReadModelEmbedded(); + + group('test StorageReadModelEmbedded', () { + // OAuthApplicationReadModel oauthApplication + test('to test the property `oauthApplication`', () async { + // TODO + }); + + // OAuthClientCredentialsReadModel oauthClientCredentials + test('to test the property `oauthClientCredentials`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_read_model_links_authorization_state_test.dart b/test/storage_read_model_links_authorization_state_test.dart new file mode 100644 index 0000000..220086f --- /dev/null +++ b/test/storage_read_model_links_authorization_state_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageReadModelLinksAuthorizationState +void main() { + // final instance = StorageReadModelLinksAuthorizationState(); + + group('test StorageReadModelLinksAuthorizationState', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_read_model_links_authorize_test.dart b/test/storage_read_model_links_authorize_test.dart new file mode 100644 index 0000000..e468055 --- /dev/null +++ b/test/storage_read_model_links_authorize_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageReadModelLinksAuthorize +void main() { + // final instance = StorageReadModelLinksAuthorize(); + + group('test StorageReadModelLinksAuthorize', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_read_model_links_oauth_application_test.dart b/test/storage_read_model_links_oauth_application_test.dart new file mode 100644 index 0000000..5942263 --- /dev/null +++ b/test/storage_read_model_links_oauth_application_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageReadModelLinksOauthApplication +void main() { + // final instance = StorageReadModelLinksOauthApplication(); + + group('test StorageReadModelLinksOauthApplication', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_read_model_links_oauth_client_credentials_test.dart b/test/storage_read_model_links_oauth_client_credentials_test.dart new file mode 100644 index 0000000..f9b13ec --- /dev/null +++ b/test/storage_read_model_links_oauth_client_credentials_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageReadModelLinksOauthClientCredentials +void main() { + // final instance = StorageReadModelLinksOauthClientCredentials(); + + group('test StorageReadModelLinksOauthClientCredentials', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_read_model_links_open_test.dart b/test/storage_read_model_links_open_test.dart new file mode 100644 index 0000000..2ee57a5 --- /dev/null +++ b/test/storage_read_model_links_open_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageReadModelLinksOpen +void main() { + // final instance = StorageReadModelLinksOpen(); + + group('test StorageReadModelLinksOpen', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_read_model_links_origin_test.dart b/test/storage_read_model_links_origin_test.dart new file mode 100644 index 0000000..bc42920 --- /dev/null +++ b/test/storage_read_model_links_origin_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageReadModelLinksOrigin +void main() { + // final instance = StorageReadModelLinksOrigin(); + + group('test StorageReadModelLinksOrigin', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_read_model_links_self_test.dart b/test/storage_read_model_links_self_test.dart new file mode 100644 index 0000000..8084e8c --- /dev/null +++ b/test/storage_read_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageReadModelLinksSelf +void main() { + // final instance = StorageReadModelLinksSelf(); + + group('test StorageReadModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_read_model_links_test.dart b/test/storage_read_model_links_test.dart new file mode 100644 index 0000000..2534c4d --- /dev/null +++ b/test/storage_read_model_links_test.dart @@ -0,0 +1,62 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageReadModelLinks +void main() { + // final instance = StorageReadModelLinks(); + + group('test StorageReadModelLinks', () { + // StorageReadModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // StorageReadModelLinksType type + test('to test the property `type`', () async { + // TODO + }); + + // StorageReadModelLinksOrigin origin + test('to test the property `origin`', () async { + // TODO + }); + + // StorageReadModelLinksOpen open + test('to test the property `open`', () async { + // TODO + }); + + // StorageReadModelLinksAuthorizationState authorizationState + test('to test the property `authorizationState`', () async { + // TODO + }); + + // StorageReadModelLinksAuthorize authorize + test('to test the property `authorize`', () async { + // TODO + }); + + // StorageReadModelLinksOauthApplication oauthApplication + test('to test the property `oauthApplication`', () async { + // TODO + }); + + // StorageReadModelLinksOauthClientCredentials oauthClientCredentials + test('to test the property `oauthClientCredentials`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_read_model_links_type_test.dart b/test/storage_read_model_links_type_test.dart new file mode 100644 index 0000000..0b55c16 --- /dev/null +++ b/test/storage_read_model_links_type_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageReadModelLinksType +void main() { + // final instance = StorageReadModelLinksType(); + + group('test StorageReadModelLinksType', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_read_model_test.dart b/test/storage_read_model_test.dart new file mode 100644 index 0000000..5605a7b --- /dev/null +++ b/test/storage_read_model_test.dart @@ -0,0 +1,67 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageReadModel +void main() { + // final instance = StorageReadModel(); + + group('test StorageReadModel', () { + // Storage id + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // Storage name + // Object name + test('to test the property `name`', () async { + // TODO + }); + + // Whether the storage has the application password to use for the Nextcloud storage. Ignored if the provider type is not Nextcloud + // Object hasApplicationPassword + test('to test the property `hasApplicationPassword`', () async { + // TODO + }); + + // Time of creation + // Object createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Time of the most recent change to the storage + // Object updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // StorageReadModelEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + // StorageReadModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_write_model_links_origin_test.dart b/test/storage_write_model_links_origin_test.dart new file mode 100644 index 0000000..936e6c9 --- /dev/null +++ b/test/storage_write_model_links_origin_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageWriteModelLinksOrigin +void main() { + // final instance = StorageWriteModelLinksOrigin(); + + group('test StorageWriteModelLinksOrigin', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_write_model_links_test.dart b/test/storage_write_model_links_test.dart new file mode 100644 index 0000000..547010f --- /dev/null +++ b/test/storage_write_model_links_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageWriteModelLinks +void main() { + // final instance = StorageWriteModelLinks(); + + group('test StorageWriteModelLinks', () { + // StorageWriteModelLinksOrigin origin + test('to test the property `origin`', () async { + // TODO + }); + + // StorageWriteModelLinksType type + test('to test the property `type`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_write_model_links_type_test.dart b/test/storage_write_model_links_type_test.dart new file mode 100644 index 0000000..c352a38 --- /dev/null +++ b/test/storage_write_model_links_type_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageWriteModelLinksType +void main() { + // final instance = StorageWriteModelLinksType(); + + group('test StorageWriteModelLinksType', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/storage_write_model_test.dart b/test/storage_write_model_test.dart new file mode 100644 index 0000000..cf64391 --- /dev/null +++ b/test/storage_write_model_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for StorageWriteModel +void main() { + // final instance = StorageWriteModel(); + + group('test StorageWriteModel', () { + // Storage name, if not provided, falls back to a default. + // Object name + test('to test the property `name`', () async { + // TODO + }); + + // The application password to use for the Nextcloud storage. Ignored if the provider type is not Nextcloud. If a string is provided, the password is set and automatic management is enabled for the storage. If null is provided, the password is unset and automatic management is disabled for the storage. + // Object applicationPassword + test('to test the property `applicationPassword`', () async { + // TODO + }); + + // StorageWriteModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entries_api_test.dart b/test/time_entries_api_test.dart new file mode 100644 index 0000000..e36a42d --- /dev/null +++ b/test/time_entries_api_test.dart @@ -0,0 +1,102 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for TimeEntriesApi +void main() { + // final instance = TimeEntriesApi(); + + group('tests for TimeEntriesApi', () { + // Available projects for time entries + // + // Gets a list of projects in which a time entry can be created in or be assigned to on update. The list contains all projects in which the user issuing the request has the necessary permissions. + // + //Future availableProjectsForTimeEntries() async + test('test availableProjectsForTimeEntries', () async { + // TODO + }); + + // Create time entry + // + // Creates a new time entry applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a time entries' attributes and are accepted by the endpoint. + // + //Future createTimeEntry() async + test('test createTimeEntry', () async { + // TODO + }); + + // Delete time entry + // + // Permanently deletes the specified time entry. + // + //Future deleteTimeEntry(int id) async + test('test deleteTimeEntry', () async { + // TODO + }); + + // Get time entry + // + // Retrieves a single time entry identified by the given id. + // + //Future getTimeEntry(int id) async + test('test getTimeEntry', () async { + // TODO + }); + + // List time entries + // + // Lists time entries. The time entries returned depend on the filters provided and also on the permission of the requesting user. + // + //Future listTimeEntries({ int offset, int pageSize, String sortBy, String filters }) async + test('test listTimeEntries', () async { + // TODO + }); + + // Time entry create form + // + // + // + //Future timeEntryCreateForm() async + test('test timeEntryCreateForm', () async { + // TODO + }); + + // Time entry update form + // + // + // + //Future timeEntryUpdateForm(int id, int body) async + test('test timeEntryUpdateForm', () async { + // TODO + }); + + // update time entry + // + // Updates the given time entry by applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a time entries' attributes and are accepted by the endpoint. + // + //Future updateTimeEntry(int id) async + test('test updateTimeEntry', () async { + // TODO + }); + + // View time entry schema + // + // + // + //Future viewTimeEntrySchema() async + test('test viewTimeEntrySchema', () async { + // TODO + }); + + }); +} diff --git a/test/time_entry_activities_api_test.dart b/test/time_entry_activities_api_test.dart new file mode 100644 index 0000000..a3ff7b0 --- /dev/null +++ b/test/time_entry_activities_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for TimeEntryActivitiesApi +void main() { + // final instance = TimeEntryActivitiesApi(); + + group('tests for TimeEntryActivitiesApi', () { + // View time entries activity + // + // Fetches the time entry activity resource by the given id. + // + //Future getTimeEntriesActivity(int id) async + test('test getTimeEntriesActivity', () async { + // TODO + }); + + }); +} diff --git a/test/time_entry_activity_model_embedded_test.dart b/test/time_entry_activity_model_embedded_test.dart new file mode 100644 index 0000000..5cc683f --- /dev/null +++ b/test/time_entry_activity_model_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryActivityModelEmbedded +void main() { + // final instance = TimeEntryActivityModelEmbedded(); + + group('test TimeEntryActivityModelEmbedded', () { + // Object projects + test('to test the property `projects`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_activity_model_links_self_test.dart b/test/time_entry_activity_model_links_self_test.dart new file mode 100644 index 0000000..de34c12 --- /dev/null +++ b/test/time_entry_activity_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryActivityModelLinksSelf +void main() { + // final instance = TimeEntryActivityModelLinksSelf(); + + group('test TimeEntryActivityModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_activity_model_links_test.dart b/test/time_entry_activity_model_links_test.dart new file mode 100644 index 0000000..3ee39e5 --- /dev/null +++ b/test/time_entry_activity_model_links_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryActivityModelLinks +void main() { + // final instance = TimeEntryActivityModelLinks(); + + group('test TimeEntryActivityModelLinks', () { + // TimeEntryActivityModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // Object projects + test('to test the property `projects`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_activity_model_test.dart b/test/time_entry_activity_model_test.dart new file mode 100644 index 0000000..6bf4265 --- /dev/null +++ b/test/time_entry_activity_model_test.dart @@ -0,0 +1,61 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryActivityModel +void main() { + // final instance = TimeEntryActivityModel(); + + group('test TimeEntryActivityModel', () { + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // Time entry id + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // The human readable name chosen for this activity + // Object name + test('to test the property `name`', () async { + // TODO + }); + + // The rank the activity has in a list of activities + // Object position + test('to test the property `position`', () async { + // TODO + }); + + // Flag to signal whether this activity is the default activity + // Object default_ + test('to test the property `default_`', () async { + // TODO + }); + + // TimeEntryActivityModelEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + // TimeEntryActivityModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_collection_model_all_of_embedded_test.dart b/test/time_entry_collection_model_all_of_embedded_test.dart new file mode 100644 index 0000000..ac4cf90 --- /dev/null +++ b/test/time_entry_collection_model_all_of_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryCollectionModelAllOfEmbedded +void main() { + // final instance = TimeEntryCollectionModelAllOfEmbedded(); + + group('test TimeEntryCollectionModelAllOfEmbedded', () { + // Object elements + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_collection_model_all_of_links_self_test.dart b/test/time_entry_collection_model_all_of_links_self_test.dart new file mode 100644 index 0000000..7cc263e --- /dev/null +++ b/test/time_entry_collection_model_all_of_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryCollectionModelAllOfLinksSelf +void main() { + // final instance = TimeEntryCollectionModelAllOfLinksSelf(); + + group('test TimeEntryCollectionModelAllOfLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_collection_model_all_of_links_test.dart b/test/time_entry_collection_model_all_of_links_test.dart new file mode 100644 index 0000000..0a1980c --- /dev/null +++ b/test/time_entry_collection_model_all_of_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryCollectionModelAllOfLinks +void main() { + // final instance = TimeEntryCollectionModelAllOfLinks(); + + group('test TimeEntryCollectionModelAllOfLinks', () { + // TimeEntryCollectionModelAllOfLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_collection_model_test.dart b/test/time_entry_collection_model_test.dart new file mode 100644 index 0000000..9088fa8 --- /dev/null +++ b/test/time_entry_collection_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryCollectionModel +void main() { + // final instance = TimeEntryCollectionModel(); + + group('test TimeEntryCollectionModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // TimeEntryCollectionModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // TimeEntryCollectionModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_model_comment_test.dart b/test/time_entry_model_comment_test.dart new file mode 100644 index 0000000..6130b2c --- /dev/null +++ b/test/time_entry_model_comment_test.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryModelComment +void main() { + // final instance = TimeEntryModelComment(); + + group('test TimeEntryModelComment', () { + // Indicates the formatting language of the raw text + // String format + test('to test the property `format`', () async { + // TODO + }); + + // The raw text, as entered by the user + // String raw + test('to test the property `raw`', () async { + // TODO + }); + + // The text converted to HTML according to the format + // String html + test('to test the property `html`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_model_links_activity_test.dart b/test/time_entry_model_links_activity_test.dart new file mode 100644 index 0000000..da27fe9 --- /dev/null +++ b/test/time_entry_model_links_activity_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryModelLinksActivity +void main() { + // final instance = TimeEntryModelLinksActivity(); + + group('test TimeEntryModelLinksActivity', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_model_links_delete_test.dart b/test/time_entry_model_links_delete_test.dart new file mode 100644 index 0000000..2366288 --- /dev/null +++ b/test/time_entry_model_links_delete_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryModelLinksDelete +void main() { + // final instance = TimeEntryModelLinksDelete(); + + group('test TimeEntryModelLinksDelete', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_model_links_project_test.dart b/test/time_entry_model_links_project_test.dart new file mode 100644 index 0000000..2d87534 --- /dev/null +++ b/test/time_entry_model_links_project_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryModelLinksProject +void main() { + // final instance = TimeEntryModelLinksProject(); + + group('test TimeEntryModelLinksProject', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_model_links_schema_test.dart b/test/time_entry_model_links_schema_test.dart new file mode 100644 index 0000000..189490b --- /dev/null +++ b/test/time_entry_model_links_schema_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryModelLinksSchema +void main() { + // final instance = TimeEntryModelLinksSchema(); + + group('test TimeEntryModelLinksSchema', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_model_links_self_test.dart b/test/time_entry_model_links_self_test.dart new file mode 100644 index 0000000..1ef0c79 --- /dev/null +++ b/test/time_entry_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryModelLinksSelf +void main() { + // final instance = TimeEntryModelLinksSelf(); + + group('test TimeEntryModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_model_links_test.dart b/test/time_entry_model_links_test.dart new file mode 100644 index 0000000..8ba729a --- /dev/null +++ b/test/time_entry_model_links_test.dart @@ -0,0 +1,67 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryModelLinks +void main() { + // final instance = TimeEntryModelLinks(); + + group('test TimeEntryModelLinks', () { + // TimeEntryModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // TimeEntryModelLinksUpdateImmediately updateImmediately + test('to test the property `updateImmediately`', () async { + // TODO + }); + + // TimeEntryModelLinksUpdate update + test('to test the property `update`', () async { + // TODO + }); + + // TimeEntryModelLinksDelete delete + test('to test the property `delete`', () async { + // TODO + }); + + // TimeEntryModelLinksSchema schema + test('to test the property `schema`', () async { + // TODO + }); + + // TimeEntryModelLinksProject project + test('to test the property `project`', () async { + // TODO + }); + + // TimeEntryModelLinksWorkPackage workPackage + test('to test the property `workPackage`', () async { + // TODO + }); + + // TimeEntryModelLinksUser user + test('to test the property `user`', () async { + // TODO + }); + + // TimeEntryModelLinksActivity activity + test('to test the property `activity`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_model_links_update_immediately_test.dart b/test/time_entry_model_links_update_immediately_test.dart new file mode 100644 index 0000000..ab9e286 --- /dev/null +++ b/test/time_entry_model_links_update_immediately_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryModelLinksUpdateImmediately +void main() { + // final instance = TimeEntryModelLinksUpdateImmediately(); + + group('test TimeEntryModelLinksUpdateImmediately', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_model_links_update_test.dart b/test/time_entry_model_links_update_test.dart new file mode 100644 index 0000000..d13f544 --- /dev/null +++ b/test/time_entry_model_links_update_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryModelLinksUpdate +void main() { + // final instance = TimeEntryModelLinksUpdate(); + + group('test TimeEntryModelLinksUpdate', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_model_links_user_test.dart b/test/time_entry_model_links_user_test.dart new file mode 100644 index 0000000..5a18585 --- /dev/null +++ b/test/time_entry_model_links_user_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryModelLinksUser +void main() { + // final instance = TimeEntryModelLinksUser(); + + group('test TimeEntryModelLinksUser', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_model_links_work_package_test.dart b/test/time_entry_model_links_work_package_test.dart new file mode 100644 index 0000000..ffd3c56 --- /dev/null +++ b/test/time_entry_model_links_work_package_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryModelLinksWorkPackage +void main() { + // final instance = TimeEntryModelLinksWorkPackage(); + + group('test TimeEntryModelLinksWorkPackage', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/time_entry_model_test.dart b/test/time_entry_model_test.dart new file mode 100644 index 0000000..b23d075 --- /dev/null +++ b/test/time_entry_model_test.dart @@ -0,0 +1,68 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TimeEntryModel +void main() { + // final instance = TimeEntryModel(); + + group('test TimeEntryModel', () { + // The id of the time entry + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // TimeEntryModelComment comment + test('to test the property `comment`', () async { + // TODO + }); + + // The date the expenditure is booked for + // Object spentOn + test('to test the property `spentOn`', () async { + // TODO + }); + + // The time quantifying the expenditure + // Object hours + test('to test the property `hours`', () async { + // TODO + }); + + // Whether the time entry is actively tracking time + // Object ongoing + test('to test the property `ongoing`', () async { + // TODO + }); + + // The time the time entry was created + // Object createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // The time the time entry was last updated + // Object updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // TimeEntryModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/type_model_links_self_test.dart b/test/type_model_links_self_test.dart new file mode 100644 index 0000000..eb42396 --- /dev/null +++ b/test/type_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TypeModelLinksSelf +void main() { + // final instance = TypeModelLinksSelf(); + + group('test TypeModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/type_model_links_test.dart b/test/type_model_links_test.dart new file mode 100644 index 0000000..bcf5c38 --- /dev/null +++ b/test/type_model_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TypeModelLinks +void main() { + // final instance = TypeModelLinks(); + + group('test TypeModelLinks', () { + // TypeModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/type_model_test.dart b/test/type_model_test.dart new file mode 100644 index 0000000..7f95b95 --- /dev/null +++ b/test/type_model_test.dart @@ -0,0 +1,75 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TypeModel +void main() { + // final instance = TypeModel(); + + group('test TypeModel', () { + // Type id + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // Type name + // Object name + test('to test the property `name`', () async { + // TODO + }); + + // The color used to represent this type + // Object color + test('to test the property `color`', () async { + // TODO + }); + + // Sort index of the type + // Object position + test('to test the property `position`', () async { + // TODO + }); + + // Is this type active by default in new projects? + // Object isDefault + test('to test the property `isDefault`', () async { + // TODO + }); + + // Do work packages of this type represent a milestone? + // Object isMilestone + test('to test the property `isMilestone`', () async { + // TODO + }); + + // Time of creation + // Object createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Time of the most recent change to the user + // Object updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // TypeModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/types_api_test.dart b/test/types_api_test.dart new file mode 100644 index 0000000..3c1e7e4 --- /dev/null +++ b/test/types_api_test.dart @@ -0,0 +1,48 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for TypesApi +void main() { + // final instance = TypesApi(); + + group('tests for TypesApi', () { + // List all Types + // + // + // + //Future listAllTypes() async + test('test listAllTypes', () async { + // TODO + }); + + // List types available in a project + // + // This endpoint lists the types that are *available* in a given project. + // + //Future listTypesAvailableInAProject(int id) async + test('test listTypesAvailableInAProject', () async { + // TODO + }); + + // View Type + // + // + // + //Future viewType(int id) async + test('test viewType', () async { + // TODO + }); + + }); +} diff --git a/test/update_activity_request_comment_test.dart b/test/update_activity_request_comment_test.dart new file mode 100644 index 0000000..377b946 --- /dev/null +++ b/test/update_activity_request_comment_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UpdateActivityRequestComment +void main() { + // final instance = UpdateActivityRequestComment(); + + group('test UpdateActivityRequestComment', () { + // String raw + test('to test the property `raw`', () async { + // TODO + }); + + + }); + +} diff --git a/test/update_activity_request_test.dart b/test/update_activity_request_test.dart new file mode 100644 index 0000000..bb3841b --- /dev/null +++ b/test/update_activity_request_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UpdateActivityRequest +void main() { + // final instance = UpdateActivityRequest(); + + group('test UpdateActivityRequest', () { + // UpdateActivityRequestComment comment + test('to test the property `comment`', () async { + // TODO + }); + + + }); + +} diff --git a/test/update_user_preferences_request_test.dart b/test/update_user_preferences_request_test.dart new file mode 100644 index 0000000..f4b93a3 --- /dev/null +++ b/test/update_user_preferences_request_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UpdateUserPreferencesRequest +void main() { + // final instance = UpdateUserPreferencesRequest(); + + group('test UpdateUserPreferencesRequest', () { + // bool autoHidePopups + test('to test the property `autoHidePopups`', () async { + // TODO + }); + + // String timeZone + test('to test the property `timeZone`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_collection_model_all_of_embedded_test.dart b/test/user_collection_model_all_of_embedded_test.dart new file mode 100644 index 0000000..3fea660 --- /dev/null +++ b/test/user_collection_model_all_of_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UserCollectionModelAllOfEmbedded +void main() { + // final instance = UserCollectionModelAllOfEmbedded(); + + group('test UserCollectionModelAllOfEmbedded', () { + // Object elements + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_collection_model_all_of_links_self_test.dart b/test/user_collection_model_all_of_links_self_test.dart new file mode 100644 index 0000000..597876b --- /dev/null +++ b/test/user_collection_model_all_of_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UserCollectionModelAllOfLinksSelf +void main() { + // final instance = UserCollectionModelAllOfLinksSelf(); + + group('test UserCollectionModelAllOfLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_collection_model_all_of_links_test.dart b/test/user_collection_model_all_of_links_test.dart new file mode 100644 index 0000000..5ff8568 --- /dev/null +++ b/test/user_collection_model_all_of_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UserCollectionModelAllOfLinks +void main() { + // final instance = UserCollectionModelAllOfLinks(); + + group('test UserCollectionModelAllOfLinks', () { + // UserCollectionModelAllOfLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_collection_model_test.dart b/test/user_collection_model_test.dart new file mode 100644 index 0000000..ac28fcc --- /dev/null +++ b/test/user_collection_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UserCollectionModel +void main() { + // final instance = UserCollectionModel(); + + group('test UserCollectionModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // UserCollectionModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // UserCollectionModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_create_model_test.dart b/test/user_create_model_test.dart new file mode 100644 index 0000000..011aff4 --- /dev/null +++ b/test/user_create_model_test.dart @@ -0,0 +1,64 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UserCreateModel +void main() { + // final instance = UserCreateModel(); + + group('test UserCreateModel', () { + // Object admin + test('to test the property `admin`', () async { + // TODO + }); + + // Object email + test('to test the property `email`', () async { + // TODO + }); + + // Object login + test('to test the property `login`', () async { + // TODO + }); + + // The users password. *Conditions:* Only writable on creation, not on update. + // Object password + test('to test the property `password`', () async { + // TODO + }); + + // Object firstName + test('to test the property `firstName`', () async { + // TODO + }); + + // Object lastName + test('to test the property `lastName`', () async { + // TODO + }); + + // The current activation status of the user. *Conditions:* Only writable on creation, not on update. + // Object status + test('to test the property `status`', () async { + // TODO + }); + + // Object language + test('to test the property `language`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_model_links_delete_test.dart b/test/user_model_links_delete_test.dart new file mode 100644 index 0000000..b95e81e --- /dev/null +++ b/test/user_model_links_delete_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UserModelLinksDelete +void main() { + // final instance = UserModelLinksDelete(); + + group('test UserModelLinksDelete', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_model_links_lock_test.dart b/test/user_model_links_lock_test.dart new file mode 100644 index 0000000..b22064c --- /dev/null +++ b/test/user_model_links_lock_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UserModelLinksLock +void main() { + // final instance = UserModelLinksLock(); + + group('test UserModelLinksLock', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_model_links_memberships_test.dart b/test/user_model_links_memberships_test.dart new file mode 100644 index 0000000..6109563 --- /dev/null +++ b/test/user_model_links_memberships_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UserModelLinksMemberships +void main() { + // final instance = UserModelLinksMemberships(); + + group('test UserModelLinksMemberships', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_model_links_self_test.dart b/test/user_model_links_self_test.dart new file mode 100644 index 0000000..d54834b --- /dev/null +++ b/test/user_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UserModelLinksSelf +void main() { + // final instance = UserModelLinksSelf(); + + group('test UserModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_model_links_show_user_test.dart b/test/user_model_links_show_user_test.dart new file mode 100644 index 0000000..0c88c2e --- /dev/null +++ b/test/user_model_links_show_user_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UserModelLinksShowUser +void main() { + // final instance = UserModelLinksShowUser(); + + group('test UserModelLinksShowUser', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_model_links_test.dart b/test/user_model_links_test.dart new file mode 100644 index 0000000..62d9428 --- /dev/null +++ b/test/user_model_links_test.dart @@ -0,0 +1,57 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UserModelLinks +void main() { + // final instance = UserModelLinks(); + + group('test UserModelLinks', () { + // UserModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // UserModelLinksMemberships memberships + test('to test the property `memberships`', () async { + // TODO + }); + + // UserModelLinksShowUser showUser + test('to test the property `showUser`', () async { + // TODO + }); + + // UserModelLinksUpdateImmediately updateImmediately + test('to test the property `updateImmediately`', () async { + // TODO + }); + + // UserModelLinksLock lock + test('to test the property `lock`', () async { + // TODO + }); + + // UserModelLinksUnlock unlock + test('to test the property `unlock`', () async { + // TODO + }); + + // UserModelLinksDelete delete + test('to test the property `delete`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_model_links_unlock_test.dart b/test/user_model_links_unlock_test.dart new file mode 100644 index 0000000..7cb9cc6 --- /dev/null +++ b/test/user_model_links_unlock_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UserModelLinksUnlock +void main() { + // final instance = UserModelLinksUnlock(); + + group('test UserModelLinksUnlock', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_model_links_update_immediately_test.dart b/test/user_model_links_update_immediately_test.dart new file mode 100644 index 0000000..eff0f1f --- /dev/null +++ b/test/user_model_links_update_immediately_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UserModelLinksUpdateImmediately +void main() { + // final instance = UserModelLinksUpdateImmediately(); + + group('test UserModelLinksUpdateImmediately', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_model_test.dart b/test/user_model_test.dart new file mode 100644 index 0000000..227ea88 --- /dev/null +++ b/test/user_model_test.dart @@ -0,0 +1,110 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for UserModel +void main() { + // final instance = UserModel(); + + group('test UserModel', () { + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // User's id + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // User's login name # Conditions **Permission**: Administrator, manage_user global permission + // Object login + test('to test the property `login`', () async { + // TODO + }); + + // User's first name # Conditions **Permission**: Administrator, manage_user global permission + // Object firstName + test('to test the property `firstName`', () async { + // TODO + }); + + // User's last name # Conditions **Permission**: Administrator, manage_user global permission + // Object lastName + test('to test the property `lastName`', () async { + // TODO + }); + + // User's full name, formatting depends on instance settings + // Object name + test('to test the property `name`', () async { + // TODO + }); + + // User's email address # Conditions E-Mail address not hidden, **Permission**: Administrator, manage_user global permission + // Object email + test('to test the property `email`', () async { + // TODO + }); + + // Flag indicating whether or not the user is an admin # Conditions **Permission**: Administrator + // Object admin + test('to test the property `admin`', () async { + // TODO + }); + + // URL to user's avatar + // Object avatar + test('to test the property `avatar`', () async { + // TODO + }); + + // The current activation status of the user (see below) + // Object status + test('to test the property `status`', () async { + // TODO + }); + + // User's language | ISO 639-1 format # Conditions **Permission**: Administrator, manage_user global permission + // Object language + test('to test the property `language`', () async { + // TODO + }); + + // User's identity_url for OmniAuth authentication # Conditions **Permission**: Administrator + // Object identityUrl + test('to test the property `identityUrl`', () async { + // TODO + }); + + // Time of creation + // Object createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Time of the most recent change to the user + // Object updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // UserModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/user_preferences_api_test.dart b/test/user_preferences_api_test.dart new file mode 100644 index 0000000..2e71b0e --- /dev/null +++ b/test/user_preferences_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for UserPreferencesApi +void main() { + // final instance = UserPreferencesApi(); + + group('tests for UserPreferencesApi', () { + // Show my preferences + // + // + // + //Future showMyPreferences() async + test('test showMyPreferences', () async { + // TODO + }); + + // Update my preferences + // + // When calling this endpoint the client provides a single object, containing the properties that it wants to change, in the body. + // + //Future updateUserPreferences({ UpdateUserPreferencesRequest updateUserPreferencesRequest }) async + test('test updateUserPreferences', () async { + // TODO + }); + + }); +} diff --git a/test/users_api_test.dart b/test/users_api_test.dart new file mode 100644 index 0000000..ea201bd --- /dev/null +++ b/test/users_api_test.dart @@ -0,0 +1,98 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for UsersApi +void main() { + // final instance = UsersApi(); + + group('tests for UsersApi', () { + // Create User + // + // Creates a new user. Only administrators and users with manage_user global permission are allowed to do so. When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. Valid values for `status`: 1) \"active\" - In this case a password has to be provided in addition to the other attributes. 2) \"invited\" - In this case nothing but the email address is required. The rest is optional. An invitation will be sent to the user. + // + //Future createUser({ UserCreateModel userCreateModel }) async + test('test createUser', () async { + // TODO + }); + + // Delete user + // + // Permanently deletes the specified user account. + // + //Future deleteUser(int id) async + test('test deleteUser', () async { + // TODO + }); + + // List Users + // + // Lists users. Only administrators or users with manage_user global permission have permission to do this. + // + //Future listUsers({ int offset, int pageSize, String filters, String sortBy, String select }) async + test('test listUsers', () async { + // TODO + }); + + // Lock user + // + //Future lockUser(int id) async + test('test lockUser', () async { + // TODO + }); + + // Unlock user + // + //Future unlockUser(int id) async + test('test unlockUser', () async { + // TODO + }); + + // Update user + // + // Updates the user's writable attributes. When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. + // + //Future updateUser(int id, { UserCreateModel userCreateModel }) async + test('test updateUser', () async { + // TODO + }); + + // User update form + // + // + // + //Future userUpdateForm(int id) async + test('test userUpdateForm', () async { + // TODO + }); + + // View user + // + // + // + //Future viewUser(String id) async + test('test viewUser', () async { + // TODO + }); + + // View user schema + // + // The schema response use two exemplary custom fields that extend the schema response. Depending on your instance and custom field configuration, the response will look somewhat different. + // + //Future viewUserSchema() async + test('test viewUserSchema', () async { + // TODO + }); + + }); +} diff --git a/test/values_property_api_test.dart b/test/values_property_api_test.dart new file mode 100644 index 0000000..36f73eb --- /dev/null +++ b/test/values_property_api_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for ValuesPropertyApi +void main() { + // final instance = ValuesPropertyApi(); + + group('tests for ValuesPropertyApi', () { + // Get a notification detail + // + // Returns an individual detail of a notification identified by the notification id and the id of the detail. + // + //Future viewNotificationDetail(int notificationId, int id) async + test('test viewNotificationDetail', () async { + // TODO + }); + + // View Values schema + // + // The schema of a `Values` resource. + // + //Future viewValuesSchema(String id) async + test('test viewValuesSchema', () async { + // TODO + }); + + }); +} diff --git a/test/values_property_model_links_schema_test.dart b/test/values_property_model_links_schema_test.dart new file mode 100644 index 0000000..28f01d2 --- /dev/null +++ b/test/values_property_model_links_schema_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ValuesPropertyModelLinksSchema +void main() { + // final instance = ValuesPropertyModelLinksSchema(); + + group('test ValuesPropertyModelLinksSchema', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/values_property_model_links_self_test.dart b/test/values_property_model_links_self_test.dart new file mode 100644 index 0000000..9e826da --- /dev/null +++ b/test/values_property_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ValuesPropertyModelLinksSelf +void main() { + // final instance = ValuesPropertyModelLinksSelf(); + + group('test ValuesPropertyModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/values_property_model_links_test.dart b/test/values_property_model_links_test.dart new file mode 100644 index 0000000..8a5340a --- /dev/null +++ b/test/values_property_model_links_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ValuesPropertyModelLinks +void main() { + // final instance = ValuesPropertyModelLinks(); + + group('test ValuesPropertyModelLinks', () { + // ValuesPropertyModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // ValuesPropertyModelLinksSchema schema + test('to test the property `schema`', () async { + // TODO + }); + + + }); + +} diff --git a/test/values_property_model_test.dart b/test/values_property_model_test.dart new file mode 100644 index 0000000..cb27417 --- /dev/null +++ b/test/values_property_model_test.dart @@ -0,0 +1,44 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ValuesPropertyModel +void main() { + // final instance = ValuesPropertyModel(); + + group('test ValuesPropertyModel', () { + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // The key of the key - value pair represented by the Values::Property + // Object property + test('to test the property `property`', () async { + // TODO + }); + + // The value of the key - value pair represented by the Values::Property + // Object value + test('to test the property `value`', () async { + // TODO + }); + + // ValuesPropertyModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/version_model_links_available_in_projects_test.dart b/test/version_model_links_available_in_projects_test.dart new file mode 100644 index 0000000..34b723d --- /dev/null +++ b/test/version_model_links_available_in_projects_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for VersionModelLinksAvailableInProjects +void main() { + // final instance = VersionModelLinksAvailableInProjects(); + + group('test VersionModelLinksAvailableInProjects', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/version_model_links_defining_project_test.dart b/test/version_model_links_defining_project_test.dart new file mode 100644 index 0000000..b9bf609 --- /dev/null +++ b/test/version_model_links_defining_project_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for VersionModelLinksDefiningProject +void main() { + // final instance = VersionModelLinksDefiningProject(); + + group('test VersionModelLinksDefiningProject', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/version_model_links_self_test.dart b/test/version_model_links_self_test.dart new file mode 100644 index 0000000..57f39f7 --- /dev/null +++ b/test/version_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for VersionModelLinksSelf +void main() { + // final instance = VersionModelLinksSelf(); + + group('test VersionModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/version_model_links_test.dart b/test/version_model_links_test.dart new file mode 100644 index 0000000..a985e3c --- /dev/null +++ b/test/version_model_links_test.dart @@ -0,0 +1,47 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for VersionModelLinks +void main() { + // final instance = VersionModelLinks(); + + group('test VersionModelLinks', () { + // VersionModelLinksUpdate update + test('to test the property `update`', () async { + // TODO + }); + + // VersionModelLinksUpdateImmediately updateImmediately + test('to test the property `updateImmediately`', () async { + // TODO + }); + + // VersionModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // VersionModelLinksDefiningProject definingProject + test('to test the property `definingProject`', () async { + // TODO + }); + + // VersionModelLinksAvailableInProjects availableInProjects + test('to test the property `availableInProjects`', () async { + // TODO + }); + + + }); + +} diff --git a/test/version_model_links_update_immediately_test.dart b/test/version_model_links_update_immediately_test.dart new file mode 100644 index 0000000..6d73b2c --- /dev/null +++ b/test/version_model_links_update_immediately_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for VersionModelLinksUpdateImmediately +void main() { + // final instance = VersionModelLinksUpdateImmediately(); + + group('test VersionModelLinksUpdateImmediately', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/version_model_links_update_test.dart b/test/version_model_links_update_test.dart new file mode 100644 index 0000000..9112ac1 --- /dev/null +++ b/test/version_model_links_update_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for VersionModelLinksUpdate +void main() { + // final instance = VersionModelLinksUpdate(); + + group('test VersionModelLinksUpdate', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/version_model_test.dart b/test/version_model_test.dart new file mode 100644 index 0000000..6b4cd83 --- /dev/null +++ b/test/version_model_test.dart @@ -0,0 +1,78 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for VersionModel +void main() { + // final instance = VersionModel(); + + group('test VersionModel', () { + // Version id + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // Version name + // Object name + test('to test the property `name`', () async { + // TODO + }); + + // ActivityModelComment description + test('to test the property `description`', () async { + // TODO + }); + + // Object startDate + test('to test the property `startDate`', () async { + // TODO + }); + + // Object endDate + test('to test the property `endDate`', () async { + // TODO + }); + + // The current status of the version + // Object status + test('to test the property `status`', () async { + // TODO + }); + + // The current status of the version + // Object sharing + test('to test the property `sharing`', () async { + // TODO + }); + + // Time of creation + // Object createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Time of the most recent change to the version + // Object updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // VersionModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/versions_api_test.dart b/test/versions_api_test.dart new file mode 100644 index 0000000..e1640c2 --- /dev/null +++ b/test/versions_api_test.dart @@ -0,0 +1,111 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for VersionsApi +void main() { + // final instance = VersionsApi(); + + group('tests for VersionsApi', () { + // Available projects for versions + // + // Gets a list of projects in which a version can be created in. The list contains all projects in which the user issuing the request has the manage versions permissions. + // + //Future availableProjectsForVersions() async + test('test availableProjectsForVersions', () async { + // TODO + }); + + // Create version + // + // Creates a new version applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a version's attributes and are accepted by the endpoint. You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation. + // + //Future createVersion() async + test('test createVersion', () async { + // TODO + }); + + // Delete version + // + // Deletes the version. Work packages associated to the version will no longer be assigned to it. + // + //Future deleteVersion(int id) async + test('test deleteVersion', () async { + // TODO + }); + + // List versions + // + // Returns a collection of versions. The client can choose to filter the versions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain versions, for which the requesting client has sufficient permissions (*view_work_packages*). + // + //Future listVersions({ String filters }) async + test('test listVersions', () async { + // TODO + }); + + // List versions available in a project + // + // This endpoint lists the versions that are *available* in a given project. Note that due to sharing this might be more than the versions *defined* by that project. + // + //Future listVersionsAvailableInAProject(int id) async + test('test listVersionsAvailableInAProject', () async { + // TODO + }); + + // Update Version + // + // Updates the given version by applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a version's attributes and are accepted by the endpoint. + // + //Future updateVersion(int id) async + test('test updateVersion', () async { + // TODO + }); + + // Version create form + // + // + // + //Future versionCreateForm() async + test('test versionCreateForm', () async { + // TODO + }); + + // Version update form + // + // + // + //Future versionUpdateForm(int id) async + test('test versionUpdateForm', () async { + // TODO + }); + + // View version + // + // + // + //Future viewVersion(int id) async + test('test viewVersion', () async { + // TODO + }); + + // View version schema + // + // + // + //Future viewVersionSchema() async + test('test viewVersionSchema', () async { + // TODO + }); + + }); +} diff --git a/test/views_api_test.dart b/test/views_api_test.dart new file mode 100644 index 0000000..ee2d887 --- /dev/null +++ b/test/views_api_test.dart @@ -0,0 +1,48 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for ViewsApi +void main() { + // final instance = ViewsApi(); + + group('tests for ViewsApi', () { + // Create view + // + // When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a View can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. There are different subtypes of `Views` (e.g. `Views::WorkPackagesTable`) with each having its own endpoint for creating that subtype e.g. * `/api/v3/views/work_packages_table` for `Views::WorkPackagesTable` * `/api/v3/views/team_planner` for `Views::TeamPlanner` * `/api/v3/views/work_packages_calendar` for `Views::WorkPackagesCalendar` **Not yet implemented** To get the list of available subtypes and by that the endpoints for creating a subtype, use the ``` /api/v3/views/schemas ``` endpoint. + // + //Future createViews(String id, { CreateViewsRequest createViewsRequest }) async + test('test createViews', () async { + // TODO + }); + + // List views + // + // Returns a collection of Views. The collection can be filtered via query parameters similar to how work packages are filtered. + // + //Future listViews({ String filters }) async + test('test listViews', () async { + // TODO + }); + + // View view + // + // + // + //Future viewView(int id) async + test('test viewView', () async { + // TODO + }); + + }); +} diff --git a/test/watchers_model_all_of_embedded_test.dart b/test/watchers_model_all_of_embedded_test.dart new file mode 100644 index 0000000..fe72370 --- /dev/null +++ b/test/watchers_model_all_of_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WatchersModelAllOfEmbedded +void main() { + // final instance = WatchersModelAllOfEmbedded(); + + group('test WatchersModelAllOfEmbedded', () { + // Object elements + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/watchers_model_all_of_links_self_test.dart b/test/watchers_model_all_of_links_self_test.dart new file mode 100644 index 0000000..03085b2 --- /dev/null +++ b/test/watchers_model_all_of_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WatchersModelAllOfLinksSelf +void main() { + // final instance = WatchersModelAllOfLinksSelf(); + + group('test WatchersModelAllOfLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/watchers_model_all_of_links_test.dart b/test/watchers_model_all_of_links_test.dart new file mode 100644 index 0000000..d032453 --- /dev/null +++ b/test/watchers_model_all_of_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WatchersModelAllOfLinks +void main() { + // final instance = WatchersModelAllOfLinks(); + + group('test WatchersModelAllOfLinks', () { + // WatchersModelAllOfLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/watchers_model_test.dart b/test/watchers_model_test.dart new file mode 100644 index 0000000..43f6099 --- /dev/null +++ b/test/watchers_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WatchersModel +void main() { + // final instance = WatchersModel(); + + group('test WatchersModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // WatchersModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // WatchersModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/week_day_collection_model_all_of_embedded_test.dart b/test/week_day_collection_model_all_of_embedded_test.dart new file mode 100644 index 0000000..eeb3dfe --- /dev/null +++ b/test/week_day_collection_model_all_of_embedded_test.dart @@ -0,0 +1,28 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WeekDayCollectionModelAllOfEmbedded +void main() { + // final instance = WeekDayCollectionModelAllOfEmbedded(); + + group('test WeekDayCollectionModelAllOfEmbedded', () { + // The array of week days. + // Object elements + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/week_day_collection_model_all_of_links_self_test.dart b/test/week_day_collection_model_all_of_links_self_test.dart new file mode 100644 index 0000000..bfaaaa6 --- /dev/null +++ b/test/week_day_collection_model_all_of_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WeekDayCollectionModelAllOfLinksSelf +void main() { + // final instance = WeekDayCollectionModelAllOfLinksSelf(); + + group('test WeekDayCollectionModelAllOfLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/week_day_collection_model_all_of_links_test.dart b/test/week_day_collection_model_all_of_links_test.dart new file mode 100644 index 0000000..1b78fb7 --- /dev/null +++ b/test/week_day_collection_model_all_of_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WeekDayCollectionModelAllOfLinks +void main() { + // final instance = WeekDayCollectionModelAllOfLinks(); + + group('test WeekDayCollectionModelAllOfLinks', () { + // WeekDayCollectionModelAllOfLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/week_day_collection_model_test.dart b/test/week_day_collection_model_test.dart new file mode 100644 index 0000000..aad4a59 --- /dev/null +++ b/test/week_day_collection_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WeekDayCollectionModel +void main() { + // final instance = WeekDayCollectionModel(); + + group('test WeekDayCollectionModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // WeekDayCollectionModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // WeekDayCollectionModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/week_day_collection_write_model_embedded_test.dart b/test/week_day_collection_write_model_embedded_test.dart new file mode 100644 index 0000000..c08650c --- /dev/null +++ b/test/week_day_collection_write_model_embedded_test.dart @@ -0,0 +1,28 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WeekDayCollectionWriteModelEmbedded +void main() { + // final instance = WeekDayCollectionWriteModelEmbedded(); + + group('test WeekDayCollectionWriteModelEmbedded', () { + // The array of week days. + // Object elements + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/week_day_collection_write_model_test.dart b/test/week_day_collection_write_model_test.dart new file mode 100644 index 0000000..9424a55 --- /dev/null +++ b/test/week_day_collection_write_model_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WeekDayCollectionWriteModel +void main() { + // final instance = WeekDayCollectionWriteModel(); + + group('test WeekDayCollectionWriteModel', () { + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // WeekDayCollectionWriteModelEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/week_day_model_test.dart b/test/week_day_model_test.dart new file mode 100644 index 0000000..9ab1d07 --- /dev/null +++ b/test/week_day_model_test.dart @@ -0,0 +1,50 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WeekDayModel +void main() { + // final instance = WeekDayModel(); + + group('test WeekDayModel', () { + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // The week day from 1 to 7. 1 is Monday. 7 is Sunday. + // Object day + test('to test the property `day`', () async { + // TODO + }); + + // The week day name. + // Object name + test('to test the property `name`', () async { + // TODO + }); + + // `true` for a working week day, `false` otherwise. + // Object working + test('to test the property `working`', () async { + // TODO + }); + + // WeekDaySelfLinkModel links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/week_day_self_link_model_self_test.dart b/test/week_day_self_link_model_self_test.dart new file mode 100644 index 0000000..ea19621 --- /dev/null +++ b/test/week_day_self_link_model_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WeekDaySelfLinkModelSelf +void main() { + // final instance = WeekDaySelfLinkModelSelf(); + + group('test WeekDaySelfLinkModelSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/week_day_self_link_model_test.dart b/test/week_day_self_link_model_test.dart new file mode 100644 index 0000000..d6cceba --- /dev/null +++ b/test/week_day_self_link_model_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WeekDaySelfLinkModel +void main() { + // final instance = WeekDaySelfLinkModel(); + + group('test WeekDaySelfLinkModel', () { + // WeekDaySelfLinkModelSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/week_day_write_model_test.dart b/test/week_day_write_model_test.dart new file mode 100644 index 0000000..7f567b3 --- /dev/null +++ b/test/week_day_write_model_test.dart @@ -0,0 +1,33 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WeekDayWriteModel +void main() { + // final instance = WeekDayWriteModel(); + + group('test WeekDayWriteModel', () { + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // `true` for a working day. `false` for a weekend day. + // Object working + test('to test the property `working`', () async { + // TODO + }); + + + }); + +} diff --git a/test/wiki_page_model_links_add_attachment_test.dart b/test/wiki_page_model_links_add_attachment_test.dart new file mode 100644 index 0000000..871525c --- /dev/null +++ b/test/wiki_page_model_links_add_attachment_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WikiPageModelLinksAddAttachment +void main() { + // final instance = WikiPageModelLinksAddAttachment(); + + group('test WikiPageModelLinksAddAttachment', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/wiki_page_model_links_test.dart b/test/wiki_page_model_links_test.dart new file mode 100644 index 0000000..77368f5 --- /dev/null +++ b/test/wiki_page_model_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WikiPageModelLinks +void main() { + // final instance = WikiPageModelLinks(); + + group('test WikiPageModelLinks', () { + // WikiPageModelLinksAddAttachment addAttachment + test('to test the property `addAttachment`', () async { + // TODO + }); + + + }); + +} diff --git a/test/wiki_page_model_test.dart b/test/wiki_page_model_test.dart new file mode 100644 index 0000000..65e8100 --- /dev/null +++ b/test/wiki_page_model_test.dart @@ -0,0 +1,39 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WikiPageModel +void main() { + // final instance = WikiPageModel(); + + group('test WikiPageModel', () { + // Identifier of this wiki page + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // The wiki page's title + // Object title + test('to test the property `title`', () async { + // TODO + }); + + // WikiPageModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/wiki_pages_api_test.dart b/test/wiki_pages_api_test.dart new file mode 100644 index 0000000..2e16009 --- /dev/null +++ b/test/wiki_pages_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for WikiPagesApi +void main() { + // final instance = WikiPagesApi(); + + group('tests for WikiPagesApi', () { + // View Wiki Page + // + // Retrieve an individual wiki page as identified by the id parameter + // + //Future viewWikiPage(int id) async + test('test viewWikiPage', () async { + // TODO + }); + + }); +} diff --git a/test/work_package_model_description_test.dart b/test/work_package_model_description_test.dart new file mode 100644 index 0000000..ac8e631 --- /dev/null +++ b/test/work_package_model_description_test.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelDescription +void main() { + // final instance = WorkPackageModelDescription(); + + group('test WorkPackageModelDescription', () { + // Indicates the formatting language of the raw text + // String format + test('to test the property `format`', () async { + // TODO + }); + + // The raw text, as entered by the user + // String raw + test('to test the property `raw`', () async { + // TODO + }); + + // The text converted to HTML according to the format + // String html + test('to test the property `html`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_add_attachment_test.dart b/test/work_package_model_links_add_attachment_test.dart new file mode 100644 index 0000000..0522b6a --- /dev/null +++ b/test/work_package_model_links_add_attachment_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksAddAttachment +void main() { + // final instance = WorkPackageModelLinksAddAttachment(); + + group('test WorkPackageModelLinksAddAttachment', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_add_comment_test.dart b/test/work_package_model_links_add_comment_test.dart new file mode 100644 index 0000000..7abcb2d --- /dev/null +++ b/test/work_package_model_links_add_comment_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksAddComment +void main() { + // final instance = WorkPackageModelLinksAddComment(); + + group('test WorkPackageModelLinksAddComment', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_add_file_link_test.dart b/test/work_package_model_links_add_file_link_test.dart new file mode 100644 index 0000000..e44b852 --- /dev/null +++ b/test/work_package_model_links_add_file_link_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksAddFileLink +void main() { + // final instance = WorkPackageModelLinksAddFileLink(); + + group('test WorkPackageModelLinksAddFileLink', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_add_relation_test.dart b/test/work_package_model_links_add_relation_test.dart new file mode 100644 index 0000000..a1c13d3 --- /dev/null +++ b/test/work_package_model_links_add_relation_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksAddRelation +void main() { + // final instance = WorkPackageModelLinksAddRelation(); + + group('test WorkPackageModelLinksAddRelation', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_add_watcher_test.dart b/test/work_package_model_links_add_watcher_test.dart new file mode 100644 index 0000000..6915e06 --- /dev/null +++ b/test/work_package_model_links_add_watcher_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksAddWatcher +void main() { + // final instance = WorkPackageModelLinksAddWatcher(); + + group('test WorkPackageModelLinksAddWatcher', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_assignee_test.dart b/test/work_package_model_links_assignee_test.dart new file mode 100644 index 0000000..9d7c1d2 --- /dev/null +++ b/test/work_package_model_links_assignee_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksAssignee +void main() { + // final instance = WorkPackageModelLinksAssignee(); + + group('test WorkPackageModelLinksAssignee', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_attachments_test.dart b/test/work_package_model_links_attachments_test.dart new file mode 100644 index 0000000..a8084f4 --- /dev/null +++ b/test/work_package_model_links_attachments_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksAttachments +void main() { + // final instance = WorkPackageModelLinksAttachments(); + + group('test WorkPackageModelLinksAttachments', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_author_test.dart b/test/work_package_model_links_author_test.dart new file mode 100644 index 0000000..f068a75 --- /dev/null +++ b/test/work_package_model_links_author_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksAuthor +void main() { + // final instance = WorkPackageModelLinksAuthor(); + + group('test WorkPackageModelLinksAuthor', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_available_watchers_test.dart b/test/work_package_model_links_available_watchers_test.dart new file mode 100644 index 0000000..dacd280 --- /dev/null +++ b/test/work_package_model_links_available_watchers_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksAvailableWatchers +void main() { + // final instance = WorkPackageModelLinksAvailableWatchers(); + + group('test WorkPackageModelLinksAvailableWatchers', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_budget_test.dart b/test/work_package_model_links_budget_test.dart new file mode 100644 index 0000000..035f722 --- /dev/null +++ b/test/work_package_model_links_budget_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksBudget +void main() { + // final instance = WorkPackageModelLinksBudget(); + + group('test WorkPackageModelLinksBudget', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_category_test.dart b/test/work_package_model_links_category_test.dart new file mode 100644 index 0000000..3d6479a --- /dev/null +++ b/test/work_package_model_links_category_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksCategory +void main() { + // final instance = WorkPackageModelLinksCategory(); + + group('test WorkPackageModelLinksCategory', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_file_links_test.dart b/test/work_package_model_links_file_links_test.dart new file mode 100644 index 0000000..f438f1a --- /dev/null +++ b/test/work_package_model_links_file_links_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksFileLinks +void main() { + // final instance = WorkPackageModelLinksFileLinks(); + + group('test WorkPackageModelLinksFileLinks', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_parent_test.dart b/test/work_package_model_links_parent_test.dart new file mode 100644 index 0000000..38f92ba --- /dev/null +++ b/test/work_package_model_links_parent_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksParent +void main() { + // final instance = WorkPackageModelLinksParent(); + + group('test WorkPackageModelLinksParent', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_preview_markup_test.dart b/test/work_package_model_links_preview_markup_test.dart new file mode 100644 index 0000000..595e399 --- /dev/null +++ b/test/work_package_model_links_preview_markup_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksPreviewMarkup +void main() { + // final instance = WorkPackageModelLinksPreviewMarkup(); + + group('test WorkPackageModelLinksPreviewMarkup', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_priority_test.dart b/test/work_package_model_links_priority_test.dart new file mode 100644 index 0000000..5e0d7ce --- /dev/null +++ b/test/work_package_model_links_priority_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksPriority +void main() { + // final instance = WorkPackageModelLinksPriority(); + + group('test WorkPackageModelLinksPriority', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_project_test.dart b/test/work_package_model_links_project_test.dart new file mode 100644 index 0000000..14129af --- /dev/null +++ b/test/work_package_model_links_project_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksProject +void main() { + // final instance = WorkPackageModelLinksProject(); + + group('test WorkPackageModelLinksProject', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_relations_test.dart b/test/work_package_model_links_relations_test.dart new file mode 100644 index 0000000..44784a7 --- /dev/null +++ b/test/work_package_model_links_relations_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksRelations +void main() { + // final instance = WorkPackageModelLinksRelations(); + + group('test WorkPackageModelLinksRelations', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_remove_watcher_test.dart b/test/work_package_model_links_remove_watcher_test.dart new file mode 100644 index 0000000..893b43e --- /dev/null +++ b/test/work_package_model_links_remove_watcher_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksRemoveWatcher +void main() { + // final instance = WorkPackageModelLinksRemoveWatcher(); + + group('test WorkPackageModelLinksRemoveWatcher', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_responsible_test.dart b/test/work_package_model_links_responsible_test.dart new file mode 100644 index 0000000..8878f2f --- /dev/null +++ b/test/work_package_model_links_responsible_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksResponsible +void main() { + // final instance = WorkPackageModelLinksResponsible(); + + group('test WorkPackageModelLinksResponsible', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_revisions_test.dart b/test/work_package_model_links_revisions_test.dart new file mode 100644 index 0000000..ddbbfdb --- /dev/null +++ b/test/work_package_model_links_revisions_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksRevisions +void main() { + // final instance = WorkPackageModelLinksRevisions(); + + group('test WorkPackageModelLinksRevisions', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_schema_test.dart b/test/work_package_model_links_schema_test.dart new file mode 100644 index 0000000..2976b5a --- /dev/null +++ b/test/work_package_model_links_schema_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksSchema +void main() { + // final instance = WorkPackageModelLinksSchema(); + + group('test WorkPackageModelLinksSchema', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_self_test.dart b/test/work_package_model_links_self_test.dart new file mode 100644 index 0000000..6b4a423 --- /dev/null +++ b/test/work_package_model_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksSelf +void main() { + // final instance = WorkPackageModelLinksSelf(); + + group('test WorkPackageModelLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_status_test.dart b/test/work_package_model_links_status_test.dart new file mode 100644 index 0000000..a6e01df --- /dev/null +++ b/test/work_package_model_links_status_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksStatus +void main() { + // final instance = WorkPackageModelLinksStatus(); + + group('test WorkPackageModelLinksStatus', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_test.dart b/test/work_package_model_links_test.dart new file mode 100644 index 0000000..871a1cf --- /dev/null +++ b/test/work_package_model_links_test.dart @@ -0,0 +1,192 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinks +void main() { + // final instance = WorkPackageModelLinks(); + + group('test WorkPackageModelLinks', () { + // WorkPackageModelLinksAddAttachment addAttachment + test('to test the property `addAttachment`', () async { + // TODO + }); + + // WorkPackageModelLinksAddComment addComment + test('to test the property `addComment`', () async { + // TODO + }); + + // WorkPackageModelLinksAddRelation addRelation + test('to test the property `addRelation`', () async { + // TODO + }); + + // WorkPackageModelLinksAddWatcher addWatcher + test('to test the property `addWatcher`', () async { + // TODO + }); + + // Object customActions + test('to test the property `customActions`', () async { + // TODO + }); + + // WorkPackageModelLinksPreviewMarkup previewMarkup + test('to test the property `previewMarkup`', () async { + // TODO + }); + + // WorkPackageModelLinksRemoveWatcher removeWatcher + test('to test the property `removeWatcher`', () async { + // TODO + }); + + // WorkPackageModelLinksUnwatch unwatch + test('to test the property `unwatch`', () async { + // TODO + }); + + // WorkPackageModelLinksUpdate update + test('to test the property `update`', () async { + // TODO + }); + + // WorkPackageModelLinksUpdateImmediately updateImmediately + test('to test the property `updateImmediately`', () async { + // TODO + }); + + // WorkPackageModelLinksWatch watch + test('to test the property `watch`', () async { + // TODO + }); + + // WorkPackageModelLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + // WorkPackageModelLinksSchema schema + test('to test the property `schema`', () async { + // TODO + }); + + // Object ancestors + test('to test the property `ancestors`', () async { + // TODO + }); + + // WorkPackageModelLinksAttachments attachments + test('to test the property `attachments`', () async { + // TODO + }); + + // WorkPackageModelLinksAuthor author + test('to test the property `author`', () async { + // TODO + }); + + // WorkPackageModelLinksAssignee assignee + test('to test the property `assignee`', () async { + // TODO + }); + + // WorkPackageModelLinksAvailableWatchers availableWatchers + test('to test the property `availableWatchers`', () async { + // TODO + }); + + // WorkPackageModelLinksBudget budget + test('to test the property `budget`', () async { + // TODO + }); + + // WorkPackageModelLinksCategory category + test('to test the property `category`', () async { + // TODO + }); + + // Object children + test('to test the property `children`', () async { + // TODO + }); + + // WorkPackageModelLinksAddFileLink addFileLink + test('to test the property `addFileLink`', () async { + // TODO + }); + + // WorkPackageModelLinksFileLinks fileLinks + test('to test the property `fileLinks`', () async { + // TODO + }); + + // WorkPackageModelLinksParent parent + test('to test the property `parent`', () async { + // TODO + }); + + // WorkPackageModelLinksPriority priority + test('to test the property `priority`', () async { + // TODO + }); + + // WorkPackageModelLinksProject project + test('to test the property `project`', () async { + // TODO + }); + + // WorkPackageModelLinksResponsible responsible + test('to test the property `responsible`', () async { + // TODO + }); + + // WorkPackageModelLinksRelations relations + test('to test the property `relations`', () async { + // TODO + }); + + // WorkPackageModelLinksRevisions revisions + test('to test the property `revisions`', () async { + // TODO + }); + + // WorkPackageModelLinksStatus status + test('to test the property `status`', () async { + // TODO + }); + + // WorkPackageModelLinksTimeEntries timeEntries + test('to test the property `timeEntries`', () async { + // TODO + }); + + // WorkPackageModelLinksType type + test('to test the property `type`', () async { + // TODO + }); + + // WorkPackageModelLinksVersion version + test('to test the property `version`', () async { + // TODO + }); + + // WorkPackageModelLinksWatchers watchers + test('to test the property `watchers`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_time_entries_test.dart b/test/work_package_model_links_time_entries_test.dart new file mode 100644 index 0000000..1701070 --- /dev/null +++ b/test/work_package_model_links_time_entries_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksTimeEntries +void main() { + // final instance = WorkPackageModelLinksTimeEntries(); + + group('test WorkPackageModelLinksTimeEntries', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_type_test.dart b/test/work_package_model_links_type_test.dart new file mode 100644 index 0000000..9fb9ab8 --- /dev/null +++ b/test/work_package_model_links_type_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksType +void main() { + // final instance = WorkPackageModelLinksType(); + + group('test WorkPackageModelLinksType', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_unwatch_test.dart b/test/work_package_model_links_unwatch_test.dart new file mode 100644 index 0000000..85b3c0f --- /dev/null +++ b/test/work_package_model_links_unwatch_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksUnwatch +void main() { + // final instance = WorkPackageModelLinksUnwatch(); + + group('test WorkPackageModelLinksUnwatch', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_update_immediately_test.dart b/test/work_package_model_links_update_immediately_test.dart new file mode 100644 index 0000000..9eb14f8 --- /dev/null +++ b/test/work_package_model_links_update_immediately_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksUpdateImmediately +void main() { + // final instance = WorkPackageModelLinksUpdateImmediately(); + + group('test WorkPackageModelLinksUpdateImmediately', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_update_test.dart b/test/work_package_model_links_update_test.dart new file mode 100644 index 0000000..1bf710c --- /dev/null +++ b/test/work_package_model_links_update_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksUpdate +void main() { + // final instance = WorkPackageModelLinksUpdate(); + + group('test WorkPackageModelLinksUpdate', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_version_test.dart b/test/work_package_model_links_version_test.dart new file mode 100644 index 0000000..5dc21ae --- /dev/null +++ b/test/work_package_model_links_version_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksVersion +void main() { + // final instance = WorkPackageModelLinksVersion(); + + group('test WorkPackageModelLinksVersion', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_watch_test.dart b/test/work_package_model_links_watch_test.dart new file mode 100644 index 0000000..984fc46 --- /dev/null +++ b/test/work_package_model_links_watch_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksWatch +void main() { + // final instance = WorkPackageModelLinksWatch(); + + group('test WorkPackageModelLinksWatch', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_links_watchers_test.dart b/test/work_package_model_links_watchers_test.dart new file mode 100644 index 0000000..dcb21c6 --- /dev/null +++ b/test/work_package_model_links_watchers_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModelLinksWatchers +void main() { + // final instance = WorkPackageModelLinksWatchers(); + + group('test WorkPackageModelLinksWatchers', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_model_test.dart b/test/work_package_model_test.dart new file mode 100644 index 0000000..8613d15 --- /dev/null +++ b/test/work_package_model_test.dart @@ -0,0 +1,145 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackageModel +void main() { + // final instance = WorkPackageModel(); + + group('test WorkPackageModel', () { + // Work package id + // Object id + test('to test the property `id`', () async { + // TODO + }); + + // The version of the item as used for optimistic locking + // Object lockVersion + test('to test the property `lockVersion`', () async { + // TODO + }); + + // Work package subject + // Object subject + test('to test the property `subject`', () async { + // TODO + }); + + // Object type + test('to test the property `type`', () async { + // TODO + }); + + // WorkPackageModelDescription description + test('to test the property `description`', () async { + // TODO + }); + + // If false (default) schedule automatically. + // Object scheduleManually + test('to test the property `scheduleManually`', () async { + // TODO + }); + + // If true, the work package is in a readonly status so with the exception of the status, no other property can be altered. + // Object readonly + test('to test the property `readonly`', () async { + // TODO + }); + + // Scheduled beginning of a work package + // Object startDate + test('to test the property `startDate`', () async { + // TODO + }); + + // Scheduled end of a work package + // Object dueDate + test('to test the property `dueDate`', () async { + // TODO + }); + + // Date on which a milestone is achieved + // Object date + test('to test the property `date`', () async { + // TODO + }); + + // Similar to start date but is not set by a client but rather deduced by the work packages' descendants. If manual scheduleManually is active, the two dates can deviate. + // Object derivedStartDate + test('to test the property `derivedStartDate`', () async { + // TODO + }); + + // Similar to due date but is not set by a client but rather deduced by the work packages' descendants. If manual scheduleManually is active, the two dates can deviate. + // Object derivedDueDate + test('to test the property `derivedDueDate`', () async { + // TODO + }); + + // **(NOT IMPLEMENTED)** The amount of time in hours the work package needs to be completed. Not available for milestone type of work packages. + // Object duration + test('to test the property `duration`', () async { + // TODO + }); + + // Time a work package likely needs to be completed excluding its descendants + // Object estimatedTime + test('to test the property `estimatedTime`', () async { + // TODO + }); + + // Time a work package likely needs to be completed including its descendants + // Object derivedEstimatedTime + test('to test the property `derivedEstimatedTime`', () async { + // TODO + }); + + // **(NOT IMPLEMENTED)** When scheduling, whether or not to ignore the non working days being defined. A work package with the flag set to true will be allowed to be scheduled to a non working day. + // Object ignoreNonWorkingDays + test('to test the property `ignoreNonWorkingDays`', () async { + // TODO + }); + + // The time booked for this work package by users working on it # Conditions **Permission** view time entries + // Object spentTime + test('to test the property `spentTime`', () async { + // TODO + }); + + // Amount of total completion for a work package + // Object percentageDone + test('to test the property `percentageDone`', () async { + // TODO + }); + + // Time of creation + // Object createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Time of the most recent change to the work package + // Object updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // WorkPackageModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_patch_model_links_test.dart b/test/work_package_patch_model_links_test.dart new file mode 100644 index 0000000..67c31b0 --- /dev/null +++ b/test/work_package_patch_model_links_test.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackagePatchModelLinks +void main() { + // final instance = WorkPackagePatchModelLinks(); + + group('test WorkPackagePatchModelLinks', () { + // WorkPackageModelLinksAssignee assignee + test('to test the property `assignee`', () async { + // TODO + }); + + // WorkPackageModelLinksBudget budget + test('to test the property `budget`', () async { + // TODO + }); + + // WorkPackageModelLinksCategory category + test('to test the property `category`', () async { + // TODO + }); + + // WorkPackageModelLinksParent parent + test('to test the property `parent`', () async { + // TODO + }); + + // WorkPackageModelLinksPriority priority + test('to test the property `priority`', () async { + // TODO + }); + + // WorkPackageModelLinksProject project + test('to test the property `project`', () async { + // TODO + }); + + // WorkPackageModelLinksResponsible responsible + test('to test the property `responsible`', () async { + // TODO + }); + + // WorkPackageModelLinksStatus status + test('to test the property `status`', () async { + // TODO + }); + + // WorkPackageModelLinksType type + test('to test the property `type`', () async { + // TODO + }); + + // WorkPackageModelLinksVersion version + test('to test the property `version`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_package_patch_model_test.dart b/test/work_package_patch_model_test.dart new file mode 100644 index 0000000..d827623 --- /dev/null +++ b/test/work_package_patch_model_test.dart @@ -0,0 +1,104 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackagePatchModel +void main() { + // final instance = WorkPackagePatchModel(); + + group('test WorkPackagePatchModel', () { + // The version of the item as used for optimistic locking + // Object lockVersion + test('to test the property `lockVersion`', () async { + // TODO + }); + + // Work package subject + // Object subject + test('to test the property `subject`', () async { + // TODO + }); + + // WorkPackageModelDescription description + test('to test the property `description`', () async { + // TODO + }); + + // If false (default) schedule automatically. + // Object scheduleManually + test('to test the property `scheduleManually`', () async { + // TODO + }); + + // Scheduled beginning of a work package + // Object startDate + test('to test the property `startDate`', () async { + // TODO + }); + + // Scheduled end of a work package + // Object dueDate + test('to test the property `dueDate`', () async { + // TODO + }); + + // Date on which a milestone is achieved + // Object date + test('to test the property `date`', () async { + // TODO + }); + + // Time a work package likely needs to be completed excluding its descendants + // Object estimatedTime + test('to test the property `estimatedTime`', () async { + // TODO + }); + + // **(NOT IMPLEMENTED)** When scheduling, whether or not to ignore the non working days being defined. A work package with the flag set to true will be allowed to be scheduled to a non working day. + // Object ignoreNonWorkingDays + test('to test the property `ignoreNonWorkingDays`', () async { + // TODO + }); + + // The time booked for this work package by users working on it # Conditions **Permission** view time entries + // Object spentTime + test('to test the property `spentTime`', () async { + // TODO + }); + + // Amount of total completion for a work package + // Object percentageDone + test('to test the property `percentageDone`', () async { + // TODO + }); + + // Time of creation + // Object createdAt + test('to test the property `createdAt`', () async { + // TODO + }); + + // Time of the most recent change to the work package + // Object updatedAt + test('to test the property `updatedAt`', () async { + // TODO + }); + + // WorkPackagePatchModelLinks links + test('to test the property `links`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_packages_api_test.dart b/test/work_packages_api_test.dart new file mode 100644 index 0000000..97cd748 --- /dev/null +++ b/test/work_packages_api_test.dart @@ -0,0 +1,264 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for WorkPackagesApi +void main() { + // final instance = WorkPackagesApi(); + + group('tests for WorkPackagesApi', () { + // Add watcher + // + // Adds a watcher to the specified work package. The request is expected to contain a single JSON object, that contains a link object under the `user` key. The response will be user added as watcher. In case the user was already watching the work package an `HTTP 200` is returned, an `HTTP 201` if the user was added as a new watcher. + // + //Future addWatcher(int id, { AddWatcherRequest addWatcherRequest }) async + test('test addWatcher', () async { + // TODO + }); + + // Available assignees + // + // Gets a list of users that can be assigned to work packages in the given project. + // + //Future availableAssignees(int id) async + test('test availableAssignees', () async { + // TODO + }); + + // Available projects for work package + // + // Gets a list of projects that are available as projects to which the work package can be moved. + // + //Future availableProjectsForWorkPackage(int id) async + test('test availableProjectsForWorkPackage', () async { + // TODO + }); + + // Available responsibles + // + // Gets a list of users that can be assigned as the responsible of a work package in the given project. + // + //Future availableResponsibles(int id) async + test('test availableResponsibles', () async { + // TODO + }); + + // Available watchers + // + // Gets a list of users that are able to be watchers of the specified work package. + // + //Future availableWatchers(int id) async + test('test availableWatchers', () async { + // TODO + }); + + // Comment work package + // + // Creates an activity for the selected work package and, on success, returns the updated activity. + // + //Future commentWorkPackage(int id, { bool notify, CommentWorkPackageRequest commentWorkPackageRequest }) async + test('test commentWorkPackage', () async { + // TODO + }); + + // Create work package in project + // + // When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a WorkPackage can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. + // + //Future createProjectWorkPackage(int id, { bool notify }) async + test('test createProjectWorkPackage', () async { + // TODO + }); + + // Create Relation + // + // When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a Relation can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. + // + //Future createRelation(int id) async + test('test createRelation', () async { + // TODO + }); + + // Create Work Package + // + // When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. The required fields of a WorkPackage can be found in its schema, which is embedded in the respective form. Note that it is only allowed to provide properties or links supporting the write operation. A project link must be set when creating work packages through this route. When setting start date, finish date, and duration together, their correctness will be checked and a 422 error will be returned if one value does not match with the two others. You can make the server compute a value: set only two values in the request and the third one will be computed and returned in the response. For instance, when sending `{ \"startDate\": \"2022-08-23\", duration: \"P2D\" }`, the response will include `{ \"dueDate\": \"2022-08-24\" }`. + // + //Future createWorkPackage({ bool notify, WorkPackageModel workPackageModel }) async + test('test createWorkPackage', () async { + // TODO + }); + + // Creates file links. + // + // Creates file links on a work package. The request is interpreted as a bulk insert, where every element of the collection is validated separately. Each element contains the origin meta data and a link to the storage, the file link is about to point to. The storage link can be provided as a resource link with id or as the host url. The file's id and name are considered mandatory information. The rest of the origin meta data SHOULD be provided by the client. The _mimeType_ SHOULD be a standard mime type. An empty mime type will be handled as unknown. To link a folder, the custom mime type `application/x-op-directory` MUST be used. Up to 20 file links can be submitted at once. If any element data is invalid, no file links will be created. If a file link with matching origin id, work package, and storage already exists, then it will not create an additional file link or update the meta data. Instead the information from the existing file link will be returned. + // + //Future createWorkPackageFileLink(int id, { FileLinkCollectionWriteModel fileLinkCollectionWriteModel }) async + test('test createWorkPackageFileLink', () async { + // TODO + }); + + // Delete Work Package + // + // Deletes the work package, as well as: - all associated time entries - its hierarchy of child work packages + // + //Future deleteWorkPackage(int id) async + test('test deleteWorkPackage', () async { + // TODO + }); + + // Get work packages of project + // + // Returns the collection of work packages that are related to the given project. + // + //Future getProjectWorkPackageCollection(int id, { int offset, int pageSize, String filters, String sortBy, String groupBy, bool showSums, String select }) async + test('test getProjectWorkPackageCollection', () async { + // TODO + }); + + // Available relation candidates + // + // + // + //Future listAvailableRelationCandidates(int id, { int pageSize, String filters, String query, String type, String sortBy }) async + test('test listAvailableRelationCandidates', () async { + // TODO + }); + + // List relations + // + // Lists all relations this work package is involved in. + // + //Future listRelations(int id) async + test('test listRelations', () async { + // TODO + }); + + // List watchers + // + // + // + //Future listWatchers(int id) async + test('test listWatchers', () async { + // TODO + }); + + // List work package activities + // + // + // + //Future listWorkPackageActivities(int id) async + test('test listWorkPackageActivities', () async { + // TODO + }); + + // Gets all file links of a work package + // + // Gets all file links of a work package. As a side effect, for every file link a request is sent to the storage's origin to fetch live data and patch the file link's data before returning, as well as retrieving permissions of the user on this origin file. + // + //Future listWorkPackageFileLinks(int id, { String filters }) async + test('test listWorkPackageFileLinks', () async { + // TODO + }); + + // List Work Package Schemas + // + // List work package schemas. + // + //Future listWorkPackageSchemas(String filters) async + test('test listWorkPackageSchemas', () async { + // TODO + }); + + // List work packages + // + // Returns a collection of work packages. + // + //Future listWorkPackages({ int offset, int pageSize, String filters, String sortBy, String groupBy, bool showSums, String select, String timestamps }) async + test('test listWorkPackages', () async { + // TODO + }); + + // Remove watcher + // + // Removes the specified user from the list of watchers for the given work package. If the request succeeds, the specified user is not watching the work package anymore. *Note: This might also be the case, if the specified user did not watch the work package prior to the request.* + // + //Future removeWatcher(int id, int userId) async + test('test removeWatcher', () async { + // TODO + }); + + // Revisions + // + // Gets a list of revisions that are linked to this work package, e.g., because it is referenced in the commit message of the revision. Only linked revisions from repositories are shown if the user has the view changesets permission in the defining project. + // + //Future revisions(int id) async + test('test revisions', () async { + // TODO + }); + + // Update a Work Package + // + // When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body. Note that it is only allowed to provide properties or links supporting the **write** operation. Additionally to the fields the client wants to change, it is mandatory to provide the value of `lockVersion` which was received by the `GET` request this change originates from. The value of `lockVersion` is used to implement [optimistic locking](https://en.wikipedia.org/wiki/Optimistic_concurrency_control). + // + //Future updateWorkPackage(int id, { bool notify, WorkPackageModel workPackageModel }) async + test('test updateWorkPackage', () async { + // TODO + }); + + // View Work Package + // + // Returns the specified work package. + // + //Future viewWorkPackage(int id, { String timestamps }) async + test('test viewWorkPackage', () async { + // TODO + }); + + // View Work Package Schema + // + // + // + //Future viewWorkPackageSchema(String identifier) async + test('test viewWorkPackageSchema', () async { + // TODO + }); + + // Work Package Create Form + // + // + // + //Future workPackageCreateForm() async + test('test workPackageCreateForm', () async { + // TODO + }); + + // Work Package Create Form For Project + // + // + // + //Future workPackageCreateFormForProject(int id) async + test('test workPackageCreateFormForProject', () async { + // TODO + }); + + // Work Package Edit Form + // + // When calling this endpoint, the client provides a single object containing the properties and links to be edited, in the body. Note that it is only allowed to provide properties or links supporting the write operation. When setting start date, finish date, and duration together, their correctness will be checked and a 422 error will be returned if one value does not match with the two others. You can make the server compute a value: set only two values in the request and the third one will be computed and returned in the response. For instance, when sending `{ \"startDate\": \"2022-08-23\", duration: \"P2D\" }`, the response will include `{ \"dueDate\": \"2022-08-24\" }`. + // + //Future workPackageEditForm(int id, { WorkPackageModel workPackageModel }) async + test('test workPackageEditForm', () async { + // TODO + }); + + }); +} diff --git a/test/work_packages_model_all_of_embedded_test.dart b/test/work_packages_model_all_of_embedded_test.dart new file mode 100644 index 0000000..acbe206 --- /dev/null +++ b/test/work_packages_model_all_of_embedded_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackagesModelAllOfEmbedded +void main() { + // final instance = WorkPackagesModelAllOfEmbedded(); + + group('test WorkPackagesModelAllOfEmbedded', () { + // Object elements + test('to test the property `elements`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_packages_model_all_of_links_self_test.dart b/test/work_packages_model_all_of_links_self_test.dart new file mode 100644 index 0000000..958e311 --- /dev/null +++ b/test/work_packages_model_all_of_links_self_test.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackagesModelAllOfLinksSelf +void main() { + // final instance = WorkPackagesModelAllOfLinksSelf(); + + group('test WorkPackagesModelAllOfLinksSelf', () { + // URL to the referenced resource (might be relative) + // String href + test('to test the property `href`', () async { + // TODO + }); + + // Representative label for the resource + // String title + test('to test the property `title`', () async { + // TODO + }); + + // If true the href contains parts that need to be replaced by the client + // bool templated (default value: false) + test('to test the property `templated`', () async { + // TODO + }); + + // The HTTP verb to use when requesting the resource + // String method (default value: 'GET') + test('to test the property `method`', () async { + // TODO + }); + + // The payload to send in the request to achieve the desired result + // Object payload + test('to test the property `payload`', () async { + // TODO + }); + + // An optional unique identifier to the link object + // String identifier + test('to test the property `identifier`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_packages_model_all_of_links_test.dart b/test/work_packages_model_all_of_links_test.dart new file mode 100644 index 0000000..ce68963 --- /dev/null +++ b/test/work_packages_model_all_of_links_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackagesModelAllOfLinks +void main() { + // final instance = WorkPackagesModelAllOfLinks(); + + group('test WorkPackagesModelAllOfLinks', () { + // WorkPackagesModelAllOfLinksSelf self + test('to test the property `self`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_packages_model_test.dart b/test/work_packages_model_test.dart new file mode 100644 index 0000000..359d25c --- /dev/null +++ b/test/work_packages_model_test.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for WorkPackagesModel +void main() { + // final instance = WorkPackagesModel(); + + group('test WorkPackagesModel', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // The total amount of elements available in the collection. + // int total + test('to test the property `total`', () async { + // TODO + }); + + // Actual amount of elements in this response. + // int count + test('to test the property `count`', () async { + // TODO + }); + + // WorkPackagesModelAllOfLinks links + test('to test the property `links`', () async { + // TODO + }); + + // WorkPackagesModelAllOfEmbedded embedded + test('to test the property `embedded`', () async { + // TODO + }); + + + }); + +} diff --git a/test/work_schedule_api_test.dart b/test/work_schedule_api_test.dart new file mode 100644 index 0000000..00c3d1d --- /dev/null +++ b/test/work_schedule_api_test.dart @@ -0,0 +1,120 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for WorkScheduleApi +void main() { + // final instance = WorkScheduleApi(); + + group('tests for WorkScheduleApi', () { + // Creates a non-working day (NOT IMPLEMENTED) + // + // **(NOT IMPLEMENTED)** Marks a day as being a non-working day. Note: creating a non-working day will not affect the start and finish dates of work packages but will affect their duration. + // + //Future createNonWorkingDay({ NonWorkingDayModel nonWorkingDayModel }) async + test('test createNonWorkingDay', () async { + // TODO + }); + + // Removes a non-working day (NOT IMPLEMENTED) + // + // **(NOT IMPLEMENTED)** Removes the non-working day at the given date. Note: deleting a non-working day will not affect the start and finish dates of work packages but will affect their duration. + // + //Future deleteNonWorkingDay(DateTime date) async + test('test deleteNonWorkingDay', () async { + // TODO + }); + + // Lists days + // + // Lists days information for a given date interval. All days from the beginning of current month to the end of following month are returned by default. + // + //Future listDays({ String filters }) async + test('test listDays', () async { + // TODO + }); + + // Lists all non working days + // + // Lists all one-time non working days, such as holidays. It does not lists the non working weekdays, such as each Saturday, Sunday. For listing the weekends, the `/api/v3/days` endpoint should be used. All days from current year are returned by default. + // + //Future listNonWorkingDays({ String filters }) async + test('test listNonWorkingDays', () async { + // TODO + }); + + // Lists week days + // + // Lists week days with work schedule information. + // + //Future listWeekDays() async + test('test listWeekDays', () async { + // TODO + }); + + // Update a non-working day attributes (NOT IMPLEMENTED) + // + // **(NOT IMPLEMENTED)** Update the non-working day information for a given date. + // + //Future updateNonWorkingDay(DateTime date, { NonWorkingDayModel nonWorkingDayModel }) async + test('test updateNonWorkingDay', () async { + // TODO + }); + + // Update a week day attributes (NOT IMPLEMENTED) + // + // **(NOT IMPLEMENTED)** Makes a week day a working or non-working day. Note: changing a week day working attribute will not affect the start and finish dates of work packages but will affect their duration attribute. + // + //Future updateWeekDay(int day, { WeekDayWriteModel weekDayWriteModel }) async + test('test updateWeekDay', () async { + // TODO + }); + + // Update week days (NOT IMPLEMENTED) + // + // **(NOT IMPLEMENTED)** Update multiple week days with work schedule information. + // + //Future updateWeekDays({ WeekDayCollectionWriteModel weekDayCollectionWriteModel }) async + test('test updateWeekDays', () async { + // TODO + }); + + // View day + // + // View the day information for a given date. + // + //Future viewDay(DateTime date) async + test('test viewDay', () async { + // TODO + }); + + // View a non-working day + // + // Returns the non-working day information for a given date. + // + //Future viewNonWorkingDay(DateTime date) async + test('test viewNonWorkingDay', () async { + // TODO + }); + + // View a week day + // + // View a week day and its attributes. + // + //Future viewWeekDay(int day) async + test('test viewWeekDay', () async { + // TODO + }); + + }); +}