Skip to content

Commit

Permalink
use correct response code for personalDataExport
Browse files Browse the repository at this point in the history
Signed-off-by: jkoberg <[email protected]>
  • Loading branch information
kobergj committed Mar 30, 2023
1 parent ff71ba8 commit cad20d4
Show file tree
Hide file tree
Showing 7 changed files with 387 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ docs/EducationUser.md
docs/EducationUserApi.md
docs/EducationUserReference.md
docs/Entity.md
docs/ExportPersonalDataRequest.md
docs/FileSystemInfo.md
docs/Folder.md
docs/FolderView.md
Expand Down Expand Up @@ -133,6 +134,7 @@ model_education_school.go
model_education_user.go
model_education_user_reference.go
model_entity.go
model_export_personal_data_request.go
model_file_system_info.go
model_folder.go
model_folder_view.go
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Class | Method | HTTP request | Description
*TagsApi* | [**GetTags**](docs/TagsApi.md#gettags) | **Get** /extensions/org.libregraph/tags | Get all known tags
*TagsApi* | [**UnassignTags**](docs/TagsApi.md#unassigntags) | **Delete** /extensions/org.libregraph/tags | Unassign tags from a resource
*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **Delete** /users/{user-id} | Delete entity from users
*UserApi* | [**ExportPersonalData**](docs/UserApi.md#exportpersonaldata) | **Post** /users/{user-id}/exportPersonalData | export personal data of a user
*UserApi* | [**GetUser**](docs/UserApi.md#getuser) | **Get** /users/{user-id} | Get entity from users by key
*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **Patch** /users/{user-id} | Update entity in users
*UserAppRoleAssignmentApi* | [**UserCreateAppRoleAssignments**](docs/UserAppRoleAssignmentApi.md#usercreateapproleassignments) | **Post** /users/{user-id}/appRoleAssignments | Grant an appRoleAssignment to a user
Expand Down Expand Up @@ -172,6 +173,7 @@ Class | Method | HTTP request | Description
- [EducationUser](docs/EducationUser.md)
- [EducationUserReference](docs/EducationUserReference.md)
- [Entity](docs/Entity.md)
- [ExportPersonalDataRequest](docs/ExportPersonalDataRequest.md)
- [FileSystemInfo](docs/FileSystemInfo.md)
- [Folder](docs/Folder.md)
- [FolderView](docs/FolderView.md)
Expand Down
38 changes: 38 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,38 @@ paths:
tags:
- user
x-ms-docs-operation-type: operation
/users/{user-id}/exportPersonalData:
post:
operationId: ExportPersonalData
parameters:
- description: "key: id or name of user"
explode: false
in: path
name: user-id
required: true
schema:
type: string
style: simple
x-ms-docs-key-type: user
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExportPersonalData_request'
description: destination the file should be created at
responses:
"202":
description: success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/odata.error'
description: error
summary: export personal data of a user
tags:
- user
x-ms-docs-operation-type: operation
/users/{user-id}/appRoleAssignments:
description: Provides operations to manage assignments of roles to users.
get:
Expand Down Expand Up @@ -77060,6 +77092,12 @@ components:
type: string
title: Collection of user
type: object
ExportPersonalData_request:
properties:
storageLocation:
description: the path where the file should be created in the users personal
space
type: string
Collection_of_appRoleAssignments:
example:
'@odata.nextLink': '@odata.nextLink'
Expand Down
106 changes: 106 additions & 0 deletions api_user.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions docs/ExportPersonalDataRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# ExportPersonalDataRequest

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**StorageLocation** | Pointer to **string** | the path where the file should be created in the users personal space | [optional]

## Methods

### NewExportPersonalDataRequest

`func NewExportPersonalDataRequest() *ExportPersonalDataRequest`

NewExportPersonalDataRequest instantiates a new ExportPersonalDataRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed

### NewExportPersonalDataRequestWithDefaults

`func NewExportPersonalDataRequestWithDefaults() *ExportPersonalDataRequest`

NewExportPersonalDataRequestWithDefaults instantiates a new ExportPersonalDataRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set

### GetStorageLocation

`func (o *ExportPersonalDataRequest) GetStorageLocation() string`

GetStorageLocation returns the StorageLocation field if non-nil, zero value otherwise.

### GetStorageLocationOk

`func (o *ExportPersonalDataRequest) GetStorageLocationOk() (*string, bool)`

GetStorageLocationOk returns a tuple with the StorageLocation field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetStorageLocation

`func (o *ExportPersonalDataRequest) SetStorageLocation(v string)`

SetStorageLocation sets StorageLocation field to given value.

### HasStorageLocation

`func (o *ExportPersonalDataRequest) HasStorageLocation() bool`

HasStorageLocation returns a boolean if a field has been set.


[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


69 changes: 69 additions & 0 deletions docs/UserApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All URIs are relative to *https://ocis.ocis-traefik.latest.owncloud.works/graph/
Method | HTTP request | Description
------------- | ------------- | -------------
[**DeleteUser**](UserApi.md#DeleteUser) | **Delete** /users/{user-id} | Delete entity from users
[**ExportPersonalData**](UserApi.md#ExportPersonalData) | **Post** /users/{user-id}/exportPersonalData | export personal data of a user
[**GetUser**](UserApi.md#GetUser) | **Get** /users/{user-id} | Get entity from users by key
[**UpdateUser**](UserApi.md#UpdateUser) | **Patch** /users/{user-id} | Update entity in users

Expand Down Expand Up @@ -78,6 +79,74 @@ No authorization required
[[Back to README]](../README.md)


## ExportPersonalData

> ExportPersonalData(ctx, userId).ExportPersonalDataRequest(exportPersonalDataRequest).Execute()
export personal data of a user

### Example

```go
package main

import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)

func main() {
userId := "userId_example" // string | key: id or name of user
exportPersonalDataRequest := *openapiclient.NewExportPersonalDataRequest() // ExportPersonalDataRequest | destination the file should be created at (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.ExportPersonalData(context.Background(), userId).ExportPersonalDataRequest(exportPersonalDataRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.ExportPersonalData``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
```

### Path Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**userId** | **string** | key: id or name of user |

### Other Parameters

Other parameters are passed through a pointer to a apiExportPersonalDataRequest struct via the builder pattern


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------

**exportPersonalDataRequest** | [**ExportPersonalDataRequest**](ExportPersonalDataRequest.md) | destination the file should be created at |

### Return type

(empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/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)


## GetUser

> User GetUser(ctx, userId).Select_(select_).Expand(expand).Execute()
Expand Down
Loading

0 comments on commit cad20d4

Please sign in to comment.