From fa023ab43adeb6a97615375ca6c8691daf625415 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Tue, 17 Sep 2024 17:32:49 +0200 Subject: [PATCH] chore: bump libre-graph-api-go --- go.mod | 2 +- go.sum | 4 +- .../owncloud/libre-graph-api-go/README.md | 3 +- .../libre-graph-api-go/api_activities.go | 2 +- .../owncloud/libre-graph-api-go/api_drives.go | 2 +- .../api_drives_get_drives.go | 8 +- .../api_drives_permissions.go | 4 +- .../libre-graph-api-go/api_drives_root.go | 4 +- .../libre-graph-api-go/api_education_user.go | 6 +- .../owncloud/libre-graph-api-go/api_group.go | 8 +- .../owncloud/libre-graph-api-go/api_groups.go | 8 +- .../libre-graph-api-go/api_me_drives.go | 8 +- .../libre-graph-api-go/api_me_user.go | 2 +- .../owncloud/libre-graph-api-go/api_user.go | 6 +- .../api_user_app_role_assignment.go | 2 +- .../owncloud/libre-graph-api-go/api_users.go | 10 +- .../owncloud/libre-graph-api-go/client.go | 28 ++-- .../libre-graph-api-go/model_app_role.go | 2 +- .../model_app_role_assignment.go | 10 +- .../libre-graph-api-go/model_drive.go | 4 +- .../libre-graph-api-go/model_drive_item.go | 4 +- .../libre-graph-api-go/model_drive_update.go | 4 +- .../model_file_system_info.go | 6 +- .../libre-graph-api-go/model_photo.go | 2 +- .../libre-graph-api-go/model_remote_item.go | 4 +- .../model_sign_in_activity.go | 126 ++++++++++++++++++ .../libre-graph-api-go/model_trash.go | 2 +- .../owncloud/libre-graph-api-go/model_user.go | 38 +++++- .../libre-graph-api-go/model_user_update.go | 38 +++++- .../owncloud/libre-graph-api-go/utils.go | 14 ++ vendor/modules.txt | 2 +- 31 files changed, 284 insertions(+), 79 deletions(-) create mode 100644 vendor/github.com/owncloud/libre-graph-api-go/model_sign_in_activity.go diff --git a/go.mod b/go.mod index 3bb85e73b..f6f8a6322 100644 --- a/go.mod +++ b/go.mod @@ -71,7 +71,7 @@ require ( github.com/onsi/gomega v1.34.1 github.com/open-policy-agent/opa v0.68.0 github.com/orcaman/concurrent-map v1.0.0 - github.com/owncloud/libre-graph-api-go v1.0.5-0.20240820135012-5fac8096ce9c + github.com/owncloud/libre-graph-api-go v1.0.5-0.20240829135935-80dc00d6f5ea github.com/pkg/errors v0.9.1 github.com/pkg/xattr v0.4.10 github.com/prometheus/client_golang v1.20.2 diff --git a/go.sum b/go.sum index f4796878b..75490e504 100644 --- a/go.sum +++ b/go.sum @@ -940,8 +940,8 @@ github.com/oracle/oci-go-sdk v24.3.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35uk github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HDbW65HOY= github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= github.com/ovh/go-ovh v1.1.0/go.mod h1:AxitLZ5HBRPyUd+Zl60Ajaag+rNTdVXWIkzfrVuTXWA= -github.com/owncloud/libre-graph-api-go v1.0.5-0.20240820135012-5fac8096ce9c h1:vWUozQREEAnxNMaN+ZRlp7BFXohJr2H8tc0M2oYoAEw= -github.com/owncloud/libre-graph-api-go v1.0.5-0.20240820135012-5fac8096ce9c/go.mod h1:yXI+rmE8yYx+ZsGVrnCpprw/gZMcxjwntnX2y2+VKxY= +github.com/owncloud/libre-graph-api-go v1.0.5-0.20240829135935-80dc00d6f5ea h1:ClVthQOjKb7uI2DhHFzIPy+adc6plptGaryH20KOoxQ= +github.com/owncloud/libre-graph-api-go v1.0.5-0.20240829135935-80dc00d6f5ea/go.mod h1:yXI+rmE8yYx+ZsGVrnCpprw/gZMcxjwntnX2y2+VKxY= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= github.com/pablodz/inotifywaitgo v0.0.7 h1:1ii49dGBnRn0t1Sz7RGZS6/NberPEDQprwKHN49Bv6U= diff --git a/vendor/github.com/owncloud/libre-graph-api-go/README.md b/vendor/github.com/owncloud/libre-graph-api-go/README.md index 6e01ebb09..24eec7c89 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/README.md +++ b/vendor/github.com/owncloud/libre-graph-api-go/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: v1.0.4 - Package version: 1.0.0 -- Generator version: 7.6.0 +- Generator version: 7.8.0 - Build package: org.openapitools.codegen.languages.GoClientCodegen ## Installation @@ -235,6 +235,7 @@ Class | Method | HTTP request | Description - [SharingLink](docs/SharingLink.md) - [SharingLinkPassword](docs/SharingLinkPassword.md) - [SharingLinkType](docs/SharingLinkType.md) + - [SignInActivity](docs/SignInActivity.md) - [SpecialFolder](docs/SpecialFolder.md) - [TagAssignment](docs/TagAssignment.md) - [TagUnassignment](docs/TagUnassignment.md) diff --git a/vendor/github.com/owncloud/libre-graph-api-go/api_activities.go b/vendor/github.com/owncloud/libre-graph-api-go/api_activities.go index 7b859a7b2..e20fa0efa 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/api_activities.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/api_activities.go @@ -72,7 +72,7 @@ func (a *ActivitiesApiService) GetActivitiesExecute(r ApiGetActivitiesRequest) ( localVarFormParams := url.Values{} if r.kql != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "kql", r.kql, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "kql", r.kql, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/github.com/owncloud/libre-graph-api-go/api_drives.go b/vendor/github.com/owncloud/libre-graph-api-go/api_drives.go index b3d778469..a13d47a8e 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/api_drives.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/api_drives.go @@ -210,7 +210,7 @@ func (a *DrivesApiService) DeleteDriveExecute(r ApiDeleteDriveRequest) (*http.Re localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { diff --git a/vendor/github.com/owncloud/libre-graph-api-go/api_drives_get_drives.go b/vendor/github.com/owncloud/libre-graph-api-go/api_drives_get_drives.go index ff341244b..1a4bf5f56 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/api_drives_get_drives.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/api_drives_get_drives.go @@ -80,10 +80,10 @@ func (a *DrivesGetDrivesApiService) ListAllDrivesExecute(r ApiListAllDrivesReque localVarFormParams := url.Values{} if r.orderby != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$orderby", r.orderby, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "$orderby", r.orderby, "form", "") } if r.filter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$filter", r.filter, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "$filter", r.filter, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -206,10 +206,10 @@ func (a *DrivesGetDrivesApiService) ListAllDrivesBetaExecute(r ApiListAllDrivesB localVarFormParams := url.Values{} if r.orderby != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$orderby", r.orderby, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "$orderby", r.orderby, "form", "") } if r.filter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$filter", r.filter, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "$filter", r.filter, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/github.com/owncloud/libre-graph-api-go/api_drives_permissions.go b/vendor/github.com/owncloud/libre-graph-api-go/api_drives_permissions.go index 0fb240160..eb5004851 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/api_drives_permissions.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/api_drives_permissions.go @@ -610,10 +610,10 @@ func (a *DrivesPermissionsApiService) ListPermissionsExecute(r ApiListPermission localVarFormParams := url.Values{} if r.filter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$filter", r.filter, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "$filter", r.filter, "form", "") } if r.select_ != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "form", "csv") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/github.com/owncloud/libre-graph-api-go/api_drives_root.go b/vendor/github.com/owncloud/libre-graph-api-go/api_drives_root.go index 3c3b33a65..6412f1a57 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/api_drives_root.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/api_drives_root.go @@ -821,10 +821,10 @@ func (a *DrivesRootApiService) ListPermissionsSpaceRootExecute(r ApiListPermissi localVarFormParams := url.Values{} if r.filter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$filter", r.filter, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "$filter", r.filter, "form", "") } if r.select_ != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "form", "csv") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/github.com/owncloud/libre-graph-api-go/api_education_user.go b/vendor/github.com/owncloud/libre-graph-api-go/api_education_user.go index a390e90e7..eb38732c7 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/api_education_user.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/api_education_user.go @@ -294,7 +294,7 @@ func (a *EducationUserApiService) GetEducationUserExecute(r ApiGetEducationUserR localVarFormParams := url.Values{} if r.expand != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "form", "csv") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -417,10 +417,10 @@ func (a *EducationUserApiService) ListEducationUsersExecute(r ApiListEducationUs localVarFormParams := url.Values{} if r.orderby != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$orderby", r.orderby, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$orderby", r.orderby, "form", "csv") } if r.expand != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "form", "csv") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/github.com/owncloud/libre-graph-api-go/api_group.go b/vendor/github.com/owncloud/libre-graph-api-go/api_group.go index 350375514..4edb60561 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/api_group.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/api_group.go @@ -202,7 +202,7 @@ func (a *GroupApiService) DeleteGroupExecute(r ApiDeleteGroupRequest) (*http.Res localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { @@ -314,7 +314,7 @@ func (a *GroupApiService) DeleteMemberExecute(r ApiDeleteMemberRequest) (*http.R localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { @@ -415,10 +415,10 @@ func (a *GroupApiService) GetGroupExecute(r ApiGetGroupRequest) (*Group, *http.R localVarFormParams := url.Values{} if r.select_ != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "form", "csv") } if r.expand != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "form", "csv") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/github.com/owncloud/libre-graph-api-go/api_groups.go b/vendor/github.com/owncloud/libre-graph-api-go/api_groups.go index 2ae907f57..b9fd78fa3 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/api_groups.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/api_groups.go @@ -212,16 +212,16 @@ func (a *GroupsApiService) ListGroupsExecute(r ApiListGroupsRequest) (*Collectio localVarFormParams := url.Values{} if r.search != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$search", r.search, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "$search", r.search, "form", "") } if r.orderby != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$orderby", r.orderby, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$orderby", r.orderby, "form", "csv") } if r.select_ != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "form", "csv") } if r.expand != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "form", "csv") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/github.com/owncloud/libre-graph-api-go/api_me_drives.go b/vendor/github.com/owncloud/libre-graph-api-go/api_me_drives.go index 4dd9bb800..67843c065 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/api_me_drives.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/api_me_drives.go @@ -80,10 +80,10 @@ func (a *MeDrivesApiService) ListMyDrivesExecute(r ApiListMyDrivesRequest) (*Col localVarFormParams := url.Values{} if r.orderby != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$orderby", r.orderby, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "$orderby", r.orderby, "form", "") } if r.filter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$filter", r.filter, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "$filter", r.filter, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -206,10 +206,10 @@ func (a *MeDrivesApiService) ListMyDrivesBetaExecute(r ApiListMyDrivesBetaReques localVarFormParams := url.Values{} if r.orderby != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$orderby", r.orderby, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "$orderby", r.orderby, "form", "") } if r.filter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$filter", r.filter, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "$filter", r.filter, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/github.com/owncloud/libre-graph-api-go/api_me_user.go b/vendor/github.com/owncloud/libre-graph-api-go/api_me_user.go index 06d1b563b..92583e876 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/api_me_user.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/api_me_user.go @@ -73,7 +73,7 @@ func (a *MeUserApiService) GetOwnUserExecute(r ApiGetOwnUserRequest) (*User, *ht localVarFormParams := url.Values{} if r.expand != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "form", "csv") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/github.com/owncloud/libre-graph-api-go/api_user.go b/vendor/github.com/owncloud/libre-graph-api-go/api_user.go index 84f698e8d..cd1930d64 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/api_user.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/api_user.go @@ -92,7 +92,7 @@ func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Respon localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { @@ -300,10 +300,10 @@ func (a *UserApiService) GetUserExecute(r ApiGetUserRequest) (*User, *http.Respo localVarFormParams := url.Values{} if r.select_ != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "form", "csv") } if r.expand != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "form", "csv") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/github.com/owncloud/libre-graph-api-go/api_user_app_role_assignment.go b/vendor/github.com/owncloud/libre-graph-api-go/api_user_app_role_assignment.go index 3a81782db..8340a5fe7 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/api_user_app_role_assignment.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/api_user_app_role_assignment.go @@ -223,7 +223,7 @@ func (a *UserAppRoleAssignmentApiService) UserDeleteAppRoleAssignmentsExecute(r localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { diff --git a/vendor/github.com/owncloud/libre-graph-api-go/api_users.go b/vendor/github.com/owncloud/libre-graph-api-go/api_users.go index b0bc152ed..a15344677 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/api_users.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/api_users.go @@ -219,19 +219,19 @@ func (a *UsersApiService) ListUsersExecute(r ApiListUsersRequest) (*CollectionOf localVarFormParams := url.Values{} if r.search != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$search", r.search, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "$search", r.search, "form", "") } if r.filter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$filter", r.filter, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "$filter", r.filter, "form", "") } if r.orderby != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$orderby", r.orderby, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$orderby", r.orderby, "form", "csv") } if r.select_ != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$select", r.select_, "form", "csv") } if r.expand != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "$expand", r.expand, "form", "csv") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/vendor/github.com/owncloud/libre-graph-api-go/client.go b/vendor/github.com/owncloud/libre-graph-api-go/client.go index 285f371c1..2164ac97c 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/client.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/client.go @@ -210,7 +210,7 @@ func parameterValueToString(obj interface{}, key string) string { // parameterAddToHeaderOrQuery adds the provided object to the request header or url query // supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { var v = reflect.ValueOf(obj) var value = "" if v == reflect.ValueOf(nil) { @@ -226,11 +226,11 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri if err != nil { return } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) return } if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) return } value = v.Type().String() + " value" @@ -242,7 +242,11 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri var lenIndValue = indValue.Len() for i := 0; i < lenIndValue; i++ { var arrayValue = indValue.Index(i) - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType) + var keyPrefixForCollectionType = keyPrefix + if style == "deepObject" { + keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, collectionType) } return @@ -254,14 +258,14 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri iter := indValue.MapRange() for iter.Next() { k, v := iter.Key(), iter.Value() - parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), style, collectionType) } return case reflect.Interface: fallthrough case reflect.Ptr: - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType) return case reflect.Int, reflect.Int8, reflect.Int16, @@ -571,18 +575,6 @@ func addFile(w *multipart.Writer, fieldName, path string) error { return err } -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - // Set request body from an interface{} func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { if bodyBuf == nil { diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_app_role.go b/vendor/github.com/owncloud/libre-graph-api-go/model_app_role.go index 4c660555f..56fddfd49 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_app_role.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_app_role.go @@ -28,7 +28,7 @@ type AppRole struct { // Display name for the permission that appears in the app role assignment and consent experiences. DisplayName NullableString `json:"displayName,omitempty"` // Unique role identifier inside the appRoles collection. When creating a new app role, a new GUID identifier must be provided. - Id string `json:"id"` + Id string `json:"id" validate:"regexp=^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"` } type _AppRole AppRole diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_app_role_assignment.go b/vendor/github.com/owncloud/libre-graph-api-go/model_app_role_assignment.go index 5150c2d34..910cedd39 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_app_role_assignment.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_app_role_assignment.go @@ -24,21 +24,21 @@ var _ MappedNullable = &AppRoleAssignment{} type AppRoleAssignment struct { // The unique identifier for the object. 12345678-9abc-def0-1234-56789abcde. The value of the ID property is often, but not exclusively, in the form of a GUID. The value should be treated as an opaque identifier and not based in being a GUID. Null values are not allowed. Read-only. Id *string `json:"id,omitempty"` - DeletedDateTime *time.Time `json:"deletedDateTime,omitempty"` + DeletedDateTime *time.Time `json:"deletedDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$"` // The identifier (id) for the app role which is assigned to the user. Required on create. - AppRoleId string `json:"appRoleId"` + AppRoleId string `json:"appRoleId" validate:"regexp=^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"` // The time when the app role assignment was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. - CreatedDateTime NullableTime `json:"createdDateTime,omitempty"` + CreatedDateTime NullableTime `json:"createdDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$"` // The display name of the user, group, or service principal that was granted the app role assignment. Read-only. PrincipalDisplayName NullableString `json:"principalDisplayName,omitempty"` // The unique identifier (id) for the user, security group, or service principal being granted the app role. Security groups with dynamic memberships are supported. Required on create. - PrincipalId NullableString `json:"principalId"` + PrincipalId NullableString `json:"principalId" validate:"regexp=^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"` // The type of the assigned principal. This can either be User, Group, or ServicePrincipal. Read-only. PrincipalType NullableString `json:"principalType,omitempty"` // The display name of the resource app's service principal to which the assignment is made. ResourceDisplayName NullableString `json:"resourceDisplayName,omitempty"` // The unique identifier (id) for the resource service principal for which the assignment is made. Required on create. - ResourceId NullableString `json:"resourceId"` + ResourceId NullableString `json:"resourceId" validate:"regexp=^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"` } type _AppRoleAssignment AppRoleAssignment diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_drive.go b/vendor/github.com/owncloud/libre-graph-api-go/model_drive.go index 35ee1b273..45685043b 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_drive.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_drive.go @@ -26,14 +26,14 @@ type Drive struct { Id *string `json:"id,omitempty"` CreatedBy *IdentitySet `json:"createdBy,omitempty"` // Date and time of item creation. Read-only. - CreatedDateTime *time.Time `json:"createdDateTime,omitempty"` + CreatedDateTime *time.Time `json:"createdDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$"` // Provides a user-visible description of the item. Optional. Description *string `json:"description,omitempty"` // ETag for the item. Read-only. ETag *string `json:"eTag,omitempty"` LastModifiedBy *IdentitySet `json:"lastModifiedBy,omitempty"` // Date and time the item was last modified. Read-only. - LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"` + LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$"` // The name of the item. Read-write. Name string `json:"name"` ParentReference *ItemReference `json:"parentReference,omitempty"` diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_drive_item.go b/vendor/github.com/owncloud/libre-graph-api-go/model_drive_item.go index 0570f044d..7b4491650 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_drive_item.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_drive_item.go @@ -24,14 +24,14 @@ type DriveItem struct { Id *string `json:"id,omitempty"` CreatedBy *IdentitySet `json:"createdBy,omitempty"` // Date and time of item creation. Read-only. - CreatedDateTime *time.Time `json:"createdDateTime,omitempty"` + CreatedDateTime *time.Time `json:"createdDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$"` // Provides a user-visible description of the item. Optional. Description *string `json:"description,omitempty"` // ETag for the item. Read-only. ETag *string `json:"eTag,omitempty"` LastModifiedBy *IdentitySet `json:"lastModifiedBy,omitempty"` // Date and time the item was last modified. Read-only. - LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"` + LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$"` // The name of the item. Read-write. Name *string `json:"name,omitempty"` ParentReference *ItemReference `json:"parentReference,omitempty"` diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_drive_update.go b/vendor/github.com/owncloud/libre-graph-api-go/model_drive_update.go index 7e7a528fd..a9e9dd092 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_drive_update.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_drive_update.go @@ -24,14 +24,14 @@ type DriveUpdate struct { Id *string `json:"id,omitempty"` CreatedBy *IdentitySet `json:"createdBy,omitempty"` // Date and time of item creation. Read-only. - CreatedDateTime *time.Time `json:"createdDateTime,omitempty"` + CreatedDateTime *time.Time `json:"createdDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$"` // Provides a user-visible description of the item. Optional. Description *string `json:"description,omitempty"` // ETag for the item. Read-only. ETag *string `json:"eTag,omitempty"` LastModifiedBy *IdentitySet `json:"lastModifiedBy,omitempty"` // Date and time the item was last modified. Read-only. - LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"` + LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$"` // The name of the item. Read-write. Name *string `json:"name,omitempty"` ParentReference *ItemReference `json:"parentReference,omitempty"` diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_file_system_info.go b/vendor/github.com/owncloud/libre-graph-api-go/model_file_system_info.go index fe439c98f..94638c12e 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_file_system_info.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_file_system_info.go @@ -21,11 +21,11 @@ var _ MappedNullable = &FileSystemInfo{} // FileSystemInfo File system information on client. Read-write. type FileSystemInfo struct { // The UTC date and time the file was created on a client. - CreatedDateTime *time.Time `json:"createdDateTime,omitempty"` + CreatedDateTime *time.Time `json:"createdDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$"` // The UTC date and time the file was last accessed. Available for the recent file list only. - LastAccessedDateTime *time.Time `json:"lastAccessedDateTime,omitempty"` + LastAccessedDateTime *time.Time `json:"lastAccessedDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$"` // The UTC date and time the file was last modified on a client. - LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"` + LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$"` } // NewFileSystemInfo instantiates a new FileSystemInfo object diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_photo.go b/vendor/github.com/owncloud/libre-graph-api-go/model_photo.go index 5247d2efd..a5d21a9c3 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_photo.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_photo.go @@ -37,7 +37,7 @@ type Photo struct { // The orientation value from the camera. Read-only. Orientation *int32 `json:"orientation,omitempty"` // Represents the date and time the photo was taken. Read-only. - TakenDateTime *time.Time `json:"takenDateTime,omitempty"` + TakenDateTime *time.Time `json:"takenDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$"` } // NewPhoto instantiates a new Photo object diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_remote_item.go b/vendor/github.com/owncloud/libre-graph-api-go/model_remote_item.go index 53c2d50a8..b940338e2 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_remote_item.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_remote_item.go @@ -22,7 +22,7 @@ var _ MappedNullable = &RemoteItem{} type RemoteItem struct { CreatedBy *IdentitySet `json:"createdBy,omitempty"` // Date and time of item creation. Read-only. - CreatedDateTime *time.Time `json:"createdDateTime,omitempty"` + CreatedDateTime *time.Time `json:"createdDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$"` File *OpenGraphFile `json:"file,omitempty"` FileSystemInfo *FileSystemInfo `json:"fileSystemInfo,omitempty"` Folder *Folder `json:"folder,omitempty"` @@ -37,7 +37,7 @@ type RemoteItem struct { Image *Image `json:"image,omitempty"` LastModifiedBy *IdentitySet `json:"lastModifiedBy,omitempty"` // Date and time the item was last modified. Read-only. - LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"` + LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$"` // Optional. Filename of the remote item. Read-only. Name *string `json:"name,omitempty"` // ETag for the item. Read-only. diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_sign_in_activity.go b/vendor/github.com/owncloud/libre-graph-api-go/model_sign_in_activity.go new file mode 100644 index 000000000..5764d92b5 --- /dev/null +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_sign_in_activity.go @@ -0,0 +1,126 @@ +/* +Libre Graph API + +Libre Graph is a free API for cloud collaboration inspired by the MS Graph API. + +API version: v1.0.4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package libregraph + +import ( + "encoding/json" + "time" +) + +// checks if the SignInActivity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SignInActivity{} + +// SignInActivity Provides the last successful sign-in attempt for a user +type SignInActivity struct { + // The date and time of the last successful sign-in for the user. + LastSuccessfulSignInDateTime *time.Time `json:"lastSuccessfulSignInDateTime,omitempty"` +} + +// NewSignInActivity instantiates a new SignInActivity 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 +func NewSignInActivity() *SignInActivity { + this := SignInActivity{} + return &this +} + +// NewSignInActivityWithDefaults instantiates a new SignInActivity 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 +func NewSignInActivityWithDefaults() *SignInActivity { + this := SignInActivity{} + return &this +} + +// GetLastSuccessfulSignInDateTime returns the LastSuccessfulSignInDateTime field value if set, zero value otherwise. +func (o *SignInActivity) GetLastSuccessfulSignInDateTime() time.Time { + if o == nil || IsNil(o.LastSuccessfulSignInDateTime) { + var ret time.Time + return ret + } + return *o.LastSuccessfulSignInDateTime +} + +// GetLastSuccessfulSignInDateTimeOk returns a tuple with the LastSuccessfulSignInDateTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SignInActivity) GetLastSuccessfulSignInDateTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastSuccessfulSignInDateTime) { + return nil, false + } + return o.LastSuccessfulSignInDateTime, true +} + +// HasLastSuccessfulSignInDateTime returns a boolean if a field has been set. +func (o *SignInActivity) HasLastSuccessfulSignInDateTime() bool { + if o != nil && !IsNil(o.LastSuccessfulSignInDateTime) { + return true + } + + return false +} + +// SetLastSuccessfulSignInDateTime gets a reference to the given time.Time and assigns it to the LastSuccessfulSignInDateTime field. +func (o *SignInActivity) SetLastSuccessfulSignInDateTime(v time.Time) { + o.LastSuccessfulSignInDateTime = &v +} + +func (o SignInActivity) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SignInActivity) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LastSuccessfulSignInDateTime) { + toSerialize["lastSuccessfulSignInDateTime"] = o.LastSuccessfulSignInDateTime + } + return toSerialize, nil +} + +type NullableSignInActivity struct { + value *SignInActivity + isSet bool +} + +func (v NullableSignInActivity) Get() *SignInActivity { + return v.value +} + +func (v *NullableSignInActivity) Set(val *SignInActivity) { + v.value = val + v.isSet = true +} + +func (v NullableSignInActivity) IsSet() bool { + return v.isSet +} + +func (v *NullableSignInActivity) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSignInActivity(val *SignInActivity) *NullableSignInActivity { + return &NullableSignInActivity{value: val, isSet: true} +} + +func (v NullableSignInActivity) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSignInActivity) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_trash.go b/vendor/github.com/owncloud/libre-graph-api-go/model_trash.go index ac1e4e026..e24670154 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_trash.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_trash.go @@ -22,7 +22,7 @@ var _ MappedNullable = &Trash{} type Trash struct { TrashedBy *IdentitySet `json:"trashedBy,omitempty"` // The UTC date and time the folder was marked as trashed. - TrashedDateTime *time.Time `json:"trashedDateTime,omitempty"` + TrashedDateTime *time.Time `json:"trashedDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$"` } // NewTrash instantiates a new Trash object diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_user.go b/vendor/github.com/owncloud/libre-graph-api-go/model_user.go index 995728311..2c84e0a4c 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_user.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_user.go @@ -48,7 +48,8 @@ type User struct { // The user`s type. This can be either \"Member\" for regular user, \"Guest\" for guest users or \"Federated\" for users imported from a federated instance. UserType *string `json:"userType,omitempty"` // Represents the users language setting, ISO-639-1 Code - PreferredLanguage *string `json:"preferredLanguage,omitempty"` + PreferredLanguage *string `json:"preferredLanguage,omitempty"` + SignInActivity *SignInActivity `json:"signInActivity,omitempty"` } type _User User @@ -536,6 +537,38 @@ func (o *User) SetPreferredLanguage(v string) { o.PreferredLanguage = &v } +// GetSignInActivity returns the SignInActivity field value if set, zero value otherwise. +func (o *User) GetSignInActivity() SignInActivity { + if o == nil || IsNil(o.SignInActivity) { + var ret SignInActivity + return ret + } + return *o.SignInActivity +} + +// GetSignInActivityOk returns a tuple with the SignInActivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetSignInActivityOk() (*SignInActivity, bool) { + if o == nil || IsNil(o.SignInActivity) { + return nil, false + } + return o.SignInActivity, true +} + +// HasSignInActivity returns a boolean if a field has been set. +func (o *User) HasSignInActivity() bool { + if o != nil && !IsNil(o.SignInActivity) { + return true + } + + return false +} + +// SetSignInActivity gets a reference to the given SignInActivity and assigns it to the SignInActivity field. +func (o *User) SetSignInActivity(v SignInActivity) { + o.SignInActivity = &v +} + func (o User) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -587,6 +620,9 @@ func (o User) ToMap() (map[string]interface{}, error) { if !IsNil(o.PreferredLanguage) { toSerialize["preferredLanguage"] = o.PreferredLanguage } + if !IsNil(o.SignInActivity) { + toSerialize["signInActivity"] = o.SignInActivity + } return toSerialize, nil } diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_user_update.go b/vendor/github.com/owncloud/libre-graph-api-go/model_user_update.go index 9afdf3f0a..387cf6be4 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_user_update.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_user_update.go @@ -46,7 +46,8 @@ type UserUpdate struct { // The user`s type. This can be either \"Member\" for regular user, \"Guest\" for guest users or \"Federated\" for users imported from a federated instance. UserType *string `json:"userType,omitempty"` // Represents the users language setting, ISO-639-1 Code - PreferredLanguage *string `json:"preferredLanguage,omitempty"` + PreferredLanguage *string `json:"preferredLanguage,omitempty"` + SignInActivity *SignInActivity `json:"signInActivity,omitempty"` } // NewUserUpdate instantiates a new UserUpdate object @@ -546,6 +547,38 @@ func (o *UserUpdate) SetPreferredLanguage(v string) { o.PreferredLanguage = &v } +// GetSignInActivity returns the SignInActivity field value if set, zero value otherwise. +func (o *UserUpdate) GetSignInActivity() SignInActivity { + if o == nil || IsNil(o.SignInActivity) { + var ret SignInActivity + return ret + } + return *o.SignInActivity +} + +// GetSignInActivityOk returns a tuple with the SignInActivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserUpdate) GetSignInActivityOk() (*SignInActivity, bool) { + if o == nil || IsNil(o.SignInActivity) { + return nil, false + } + return o.SignInActivity, true +} + +// HasSignInActivity returns a boolean if a field has been set. +func (o *UserUpdate) HasSignInActivity() bool { + if o != nil && !IsNil(o.SignInActivity) { + return true + } + + return false +} + +// SetSignInActivity gets a reference to the given SignInActivity and assigns it to the SignInActivity field. +func (o *UserUpdate) SetSignInActivity(v SignInActivity) { + o.SignInActivity = &v +} + func (o UserUpdate) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -601,6 +634,9 @@ func (o UserUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.PreferredLanguage) { toSerialize["preferredLanguage"] = o.PreferredLanguage } + if !IsNil(o.SignInActivity) { + toSerialize["signInActivity"] = o.SignInActivity + } return toSerialize, nil } diff --git a/vendor/github.com/owncloud/libre-graph-api-go/utils.go b/vendor/github.com/owncloud/libre-graph-api-go/utils.go index bed6e2cce..43345aab8 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/utils.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/utils.go @@ -11,7 +11,9 @@ API version: v1.0.4 package libregraph import ( + "bytes" "encoding/json" + "fmt" "reflect" "time" ) @@ -345,3 +347,15 @@ func IsNil(i interface{}) bool { type MappedNullable interface { ToMap() (map[string]interface{}, error) } + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 91659cf47..c5faa5123 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1633,7 +1633,7 @@ github.com/opentracing/opentracing-go/log # github.com/orcaman/concurrent-map v1.0.0 ## explicit github.com/orcaman/concurrent-map -# github.com/owncloud/libre-graph-api-go v1.0.5-0.20240820135012-5fac8096ce9c +# github.com/owncloud/libre-graph-api-go v1.0.5-0.20240829135935-80dc00d6f5ea ## explicit; go 1.18 github.com/owncloud/libre-graph-api-go # github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c