diff --git a/go.mod b/go.mod index 4bf841a186..7191b66142 100644 --- a/go.mod +++ b/go.mod @@ -69,7 +69,7 @@ require ( github.com/onsi/gomega v1.30.0 github.com/open-policy-agent/opa v0.60.0 github.com/orcaman/concurrent-map v1.0.0 - github.com/owncloud/libre-graph-api-go v1.0.5-0.20231201125350-a08244876423 + github.com/owncloud/libre-graph-api-go v1.0.5-0.20240115110609-b018a896364e github.com/pkg/errors v0.9.1 github.com/pkg/xattr v0.4.9 github.com/prometheus/client_golang v1.18.0 diff --git a/go.sum b/go.sum index 7875677cda..8dd0c246a9 100644 --- a/go.sum +++ b/go.sum @@ -1789,8 +1789,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.20231201125350-a08244876423 h1:G3i2n+lY6cTEerVEearRliEGeAxFuFQN0qM/1mdCQvs= -github.com/owncloud/libre-graph-api-go v1.0.5-0.20231201125350-a08244876423/go.mod h1:v2aAl5IwEI8t+GmcWvBd+bvJMYp9Vf1hekLuRf0UnEs= +github.com/owncloud/libre-graph-api-go v1.0.5-0.20240115110609-b018a896364e h1:Y7MEJYsPe+UGlmU7oR9LaBIsQQYTwCq4a/p0JCia2cA= +github.com/owncloud/libre-graph-api-go v1.0.5-0.20240115110609-b018a896364e/go.mod h1:v2aAl5IwEI8t+GmcWvBd+bvJMYp9Vf1hekLuRf0UnEs= 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/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= 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 322d7a4658..e574cacf04 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/README.md +++ b/vendor/github.com/owncloud/libre-graph-api-go/README.md @@ -79,6 +79,7 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *ApplicationsApi* | [**GetApplication**](docs/ApplicationsApi.md#getapplication) | **Get** /v1.0/applications/{application-id} | Get application by id *ApplicationsApi* | [**ListApplications**](docs/ApplicationsApi.md#listapplications) | **Get** /v1.0/applications | Get all applications +*DriveItemApi* | [**DeleteDriveItem**](docs/DriveItemApi.md#deletedriveitem) | **Delete** /v1beta1/drives/{drive-id}/items/{item-id} | Delete a DriveItem. *DrivesApi* | [**CreateDrive**](docs/DrivesApi.md#createdrive) | **Post** /v1.0/drives | Create a new drive of a specific type *DrivesApi* | [**DeleteDrive**](docs/DrivesApi.md#deletedrive) | **Delete** /v1.0/drives/{drive-id} | Delete a specific space *DrivesApi* | [**GetDrive**](docs/DrivesApi.md#getdrive) | **Get** /v1.0/drives/{drive-id} | Get drive by id @@ -92,6 +93,7 @@ Class | Method | HTTP request | Description *DrivesPermissionsApi* | [**ListPermissions**](docs/DrivesPermissionsApi.md#listpermissions) | **Get** /v1beta1/drives/{drive-id}/items/{item-id}/permissions | List the effective sharing permissions on a driveItem. *DrivesPermissionsApi* | [**SetPermissionPassword**](docs/DrivesPermissionsApi.md#setpermissionpassword) | **Post** /v1beta1/drives/{drive-id}/items/{item-id}/permissions/{perm-id}/setPassword | Set sharing link password *DrivesPermissionsApi* | [**UpdatePermission**](docs/DrivesPermissionsApi.md#updatepermission) | **Patch** /v1beta1/drives/{drive-id}/items/{item-id}/permissions/{perm-id} | Update sharing permission +*DrivesRootApi* | [**CreateDriveItem**](docs/DrivesRootApi.md#createdriveitem) | **Post** /v1beta1/drives/{drive-id}/root/children | Create a drive item *DrivesRootApi* | [**GetRoot**](docs/DrivesRootApi.md#getroot) | **Get** /v1.0/drives/{drive-id}/root | Get root from arbitrary space *EducationClassApi* | [**AddUserToClass**](docs/EducationClassApi.md#addusertoclass) | **Post** /v1.0/education/classes/{class-id}/members/$ref | Assign a user to a class *EducationClassApi* | [**CreateClass**](docs/EducationClassApi.md#createclass) | **Post** /v1.0/education/classes | Add new education class @@ -180,18 +182,15 @@ Class | Method | HTTP request | Description - [CollectionOfUser](docs/CollectionOfUser.md) - [CollectionOfUsers](docs/CollectionOfUsers.md) - [Deleted](docs/Deleted.md) - - [DirectoryObject](docs/DirectoryObject.md) - [Drive](docs/Drive.md) - [DriveItem](docs/DriveItem.md) - [DriveItemCreateLink](docs/DriveItemCreateLink.md) - [DriveItemInvite](docs/DriveItemInvite.md) - [DriveRecipient](docs/DriveRecipient.md) - [EducationClass](docs/EducationClass.md) - - [EducationOrganization](docs/EducationOrganization.md) - [EducationSchool](docs/EducationSchool.md) - [EducationUser](docs/EducationUser.md) - [EducationUserReference](docs/EducationUserReference.md) - - [Entity](docs/Entity.md) - [ExportPersonalDataRequest](docs/ExportPersonalDataRequest.md) - [FileSystemInfo](docs/FileSystemInfo.md) - [Folder](docs/Folder.md) @@ -227,6 +226,7 @@ Class | Method | HTTP request | Description - [UnifiedRoleDefinition](docs/UnifiedRoleDefinition.md) - [UnifiedRolePermission](docs/UnifiedRolePermission.md) - [User](docs/User.md) + - [Video](docs/Video.md) ## Documentation For Authorization diff --git a/vendor/github.com/owncloud/libre-graph-api-go/api_drive_item.go b/vendor/github.com/owncloud/libre-graph-api-go/api_drive_item.go new file mode 100644 index 0000000000..aa152a84ac --- /dev/null +++ b/vendor/github.com/owncloud/libre-graph-api-go/api_drive_item.go @@ -0,0 +1,132 @@ +/* +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 ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// DriveItemApiService DriveItemApi service +type DriveItemApiService service + +type ApiDeleteDriveItemRequest struct { + ctx context.Context + ApiService *DriveItemApiService + driveId string + itemId string +} + +func (r ApiDeleteDriveItemRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteDriveItemExecute(r) +} + +/* +DeleteDriveItem Delete a DriveItem. + +Delete a DriveItem by using its ID. + +Deleting items using this method moves the items to the recycle bin instead of permanently deleting the item. + +Mounted shares in the share jail are unmounted. The `@client.synchronize` property of the `remoteItem` in the [sharedWithMe](#/me.drive/ListSharedWithMe) endpoint will change to false. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId key: id of drive + @param itemId key: id of item + @return ApiDeleteDriveItemRequest +*/ +func (a *DriveItemApiService) DeleteDriveItem(ctx context.Context, driveId string, itemId string) ApiDeleteDriveItemRequest { + return ApiDeleteDriveItemRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + itemId: itemId, + } +} + +// Execute executes the request +func (a *DriveItemApiService) DeleteDriveItemExecute(r ApiDeleteDriveItemRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DriveItemApiService.DeleteDriveItem") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/drives/{drive-id}/items/{item-id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive-id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"item-id"+"}", url.PathEscape(parameterValueToString(r.itemId, "itemId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v OdataError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} 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 fcb4f104ae..82314a3116 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 @@ -22,6 +22,127 @@ import ( // DrivesRootApiService DrivesRootApi service type DrivesRootApiService service +type ApiCreateDriveItemRequest struct { + ctx context.Context + ApiService *DrivesRootApiService + driveId string + driveItem *DriveItem +} + +// In the request body, provide a JSON object with the following parameters. For mounting a share the necessary remoteItem id and permission id can be taken from the [sharedWithMe](#/me.drive/ListSharedWithMe) endpoint. +func (r ApiCreateDriveItemRequest) DriveItem(driveItem DriveItem) ApiCreateDriveItemRequest { + r.driveItem = &driveItem + return r +} + +func (r ApiCreateDriveItemRequest) Execute() (*DriveItem, *http.Response, error) { + return r.ApiService.CreateDriveItemExecute(r) +} + +/* +CreateDriveItem Create a drive item + +You can use the root childrens endpoint to mount a remoteItem in the share jail. The `@client.synchronize` property of the `remoteItem` in the [sharedWithMe](#/me.drive/ListSharedWithMe) endpoint will change to true. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId key: id of drive + @return ApiCreateDriveItemRequest +*/ +func (a *DrivesRootApiService) CreateDriveItem(ctx context.Context, driveId string) ApiCreateDriveItemRequest { + return ApiCreateDriveItemRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + } +} + +// Execute executes the request +// @return DriveItem +func (a *DrivesRootApiService) CreateDriveItemExecute(r ApiCreateDriveItemRequest) (*DriveItem, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DriveItem + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesRootApiService.CreateDriveItem") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1beta1/drives/{drive-id}/root/children" + localVarPath = strings.Replace(localVarPath, "{"+"drive-id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.driveItem + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v OdataError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiGetRootRequest struct { ctx context.Context ApiService *DrivesRootApiService 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 1f07d0a65d..0d0a430c1a 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/client.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/client.go @@ -50,6 +50,8 @@ type APIClient struct { ApplicationsApi *ApplicationsApiService + DriveItemApi *DriveItemApiService + DrivesApi *DrivesApiService DrivesGetDrivesApi *DrivesGetDrivesApiService @@ -110,6 +112,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { // API Services c.ApplicationsApi = (*ApplicationsApiService)(&c.common) + c.DriveItemApi = (*DriveItemApiService)(&c.common) c.DrivesApi = (*DrivesApiService)(&c.common) c.DrivesGetDrivesApi = (*DrivesGetDrivesApiService)(&c.common) c.DrivesPermissionsApi = (*DrivesPermissionsApiService)(&c.common) diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_directory_object.go b/vendor/github.com/owncloud/libre-graph-api-go/model_directory_object.go deleted file mode 100644 index 12171cb033..0000000000 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_directory_object.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -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 DirectoryObject type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DirectoryObject{} - -// DirectoryObject Represents a Directory object. Read-only. -type DirectoryObject 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"` -} - -// NewDirectoryObject instantiates a new DirectoryObject 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 NewDirectoryObject() *DirectoryObject { - this := DirectoryObject{} - return &this -} - -// NewDirectoryObjectWithDefaults instantiates a new DirectoryObject 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 NewDirectoryObjectWithDefaults() *DirectoryObject { - this := DirectoryObject{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *DirectoryObject) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DirectoryObject) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *DirectoryObject) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *DirectoryObject) SetId(v string) { - o.Id = &v -} - -// GetDeletedDateTime returns the DeletedDateTime field value if set, zero value otherwise. -func (o *DirectoryObject) GetDeletedDateTime() time.Time { - if o == nil || IsNil(o.DeletedDateTime) { - var ret time.Time - return ret - } - return *o.DeletedDateTime -} - -// GetDeletedDateTimeOk returns a tuple with the DeletedDateTime field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DirectoryObject) GetDeletedDateTimeOk() (*time.Time, bool) { - if o == nil || IsNil(o.DeletedDateTime) { - return nil, false - } - return o.DeletedDateTime, true -} - -// HasDeletedDateTime returns a boolean if a field has been set. -func (o *DirectoryObject) HasDeletedDateTime() bool { - if o != nil && !IsNil(o.DeletedDateTime) { - return true - } - - return false -} - -// SetDeletedDateTime gets a reference to the given time.Time and assigns it to the DeletedDateTime field. -func (o *DirectoryObject) SetDeletedDateTime(v time.Time) { - o.DeletedDateTime = &v -} - -func (o DirectoryObject) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DirectoryObject) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.DeletedDateTime) { - toSerialize["deletedDateTime"] = o.DeletedDateTime - } - return toSerialize, nil -} - -type NullableDirectoryObject struct { - value *DirectoryObject - isSet bool -} - -func (v NullableDirectoryObject) Get() *DirectoryObject { - return v.value -} - -func (v *NullableDirectoryObject) Set(val *DirectoryObject) { - v.value = val - v.isSet = true -} - -func (v NullableDirectoryObject) IsSet() bool { - return v.isSet -} - -func (v *NullableDirectoryObject) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDirectoryObject(val *DirectoryObject) *NullableDirectoryObject { - return &NullableDirectoryObject{value: val, isSet: true} -} - -func (v NullableDirectoryObject) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDirectoryObject) 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_drive_item.go b/vendor/github.com/owncloud/libre-graph-api-go/model_drive_item.go index 52750b1fea..061a4f8473 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 @@ -62,6 +62,7 @@ type DriveItem struct { // The set of permissions for the item. Read-only. Nullable. Permissions []Permission `json:"permissions,omitempty"` Audio *Audio `json:"audio,omitempty"` + Video *Video `json:"video,omitempty"` } // NewDriveItem instantiates a new DriveItem object @@ -977,6 +978,38 @@ func (o *DriveItem) SetAudio(v Audio) { o.Audio = &v } +// GetVideo returns the Video field value if set, zero value otherwise. +func (o *DriveItem) GetVideo() Video { + if o == nil || IsNil(o.Video) { + var ret Video + return ret + } + return *o.Video +} + +// GetVideoOk returns a tuple with the Video field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DriveItem) GetVideoOk() (*Video, bool) { + if o == nil || IsNil(o.Video) { + return nil, false + } + return o.Video, true +} + +// HasVideo returns a boolean if a field has been set. +func (o *DriveItem) HasVideo() bool { + if o != nil && !IsNil(o.Video) { + return true + } + + return false +} + +// SetVideo gets a reference to the given Video and assigns it to the Video field. +func (o *DriveItem) SetVideo(v Video) { + o.Video = &v +} + func (o DriveItem) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -1071,6 +1104,9 @@ func (o DriveItem) ToMap() (map[string]interface{}, error) { if !IsNil(o.Audio) { toSerialize["audio"] = o.Audio } + if !IsNil(o.Video) { + toSerialize["video"] = o.Video + } return toSerialize, nil } diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_education_organization.go b/vendor/github.com/owncloud/libre-graph-api-go/model_education_organization.go deleted file mode 100644 index 15ddb74f7c..0000000000 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_education_organization.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -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" -) - -// checks if the EducationOrganization type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &EducationOrganization{} - -// EducationOrganization Abstract. Represents an organization in educational context -type EducationOrganization struct { - // The unique idenfier for an entity. Read-only. - Id *string `json:"id,omitempty"` - // The organization name - DisplayName *string `json:"displayName,omitempty"` -} - -// NewEducationOrganization instantiates a new EducationOrganization 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 NewEducationOrganization() *EducationOrganization { - this := EducationOrganization{} - return &this -} - -// NewEducationOrganizationWithDefaults instantiates a new EducationOrganization 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 NewEducationOrganizationWithDefaults() *EducationOrganization { - this := EducationOrganization{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *EducationOrganization) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EducationOrganization) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *EducationOrganization) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *EducationOrganization) SetId(v string) { - o.Id = &v -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise. -func (o *EducationOrganization) GetDisplayName() string { - if o == nil || IsNil(o.DisplayName) { - var ret string - return ret - } - return *o.DisplayName -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EducationOrganization) GetDisplayNameOk() (*string, bool) { - if o == nil || IsNil(o.DisplayName) { - return nil, false - } - return o.DisplayName, true -} - -// HasDisplayName returns a boolean if a field has been set. -func (o *EducationOrganization) HasDisplayName() bool { - if o != nil && !IsNil(o.DisplayName) { - return true - } - - return false -} - -// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -func (o *EducationOrganization) SetDisplayName(v string) { - o.DisplayName = &v -} - -func (o EducationOrganization) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o EducationOrganization) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.DisplayName) { - toSerialize["displayName"] = o.DisplayName - } - return toSerialize, nil -} - -type NullableEducationOrganization struct { - value *EducationOrganization - isSet bool -} - -func (v NullableEducationOrganization) Get() *EducationOrganization { - return v.value -} - -func (v *NullableEducationOrganization) Set(val *EducationOrganization) { - v.value = val - v.isSet = true -} - -func (v NullableEducationOrganization) IsSet() bool { - return v.isSet -} - -func (v *NullableEducationOrganization) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEducationOrganization(val *EducationOrganization) *NullableEducationOrganization { - return &NullableEducationOrganization{value: val, isSet: true} -} - -func (v NullableEducationOrganization) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEducationOrganization) 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_entity.go b/vendor/github.com/owncloud/libre-graph-api-go/model_entity.go deleted file mode 100644 index fa4264021a..0000000000 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_entity.go +++ /dev/null @@ -1,125 +0,0 @@ -/* -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" -) - -// checks if the Entity type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Entity{} - -// Entity Represents an entity. -type Entity struct { - // The unique idenfier for an entity. Read-only. - Id *string `json:"id,omitempty"` -} - -// NewEntity instantiates a new Entity 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 NewEntity() *Entity { - this := Entity{} - return &this -} - -// NewEntityWithDefaults instantiates a new Entity 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 NewEntityWithDefaults() *Entity { - this := Entity{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Entity) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Entity) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Entity) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *Entity) SetId(v string) { - o.Id = &v -} - -func (o Entity) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Entity) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - return toSerialize, nil -} - -type NullableEntity struct { - value *Entity - isSet bool -} - -func (v NullableEntity) Get() *Entity { - return v.value -} - -func (v *NullableEntity) Set(val *Entity) { - v.value = val - v.isSet = true -} - -func (v NullableEntity) IsSet() bool { - return v.isSet -} - -func (v *NullableEntity) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEntity(val *Entity) *NullableEntity { - return &NullableEntity{value: val, isSet: true} -} - -func (v NullableEntity) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEntity) 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_permission.go b/vendor/github.com/owncloud/libre-graph-api-go/model_permission.go index 6dd9880d11..546369acfb 100644 --- a/vendor/github.com/owncloud/libre-graph-api-go/model_permission.go +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_permission.go @@ -34,8 +34,10 @@ type Permission struct { GrantedToIdentities []IdentitySet `json:"grantedToIdentities,omitempty"` // Use this to create a permission with custom actions. LibreGraphPermissionsActions []string `json:"@libre.graph.permissions.actions,omitempty"` + // Indicates if the item is synchronized with the underlying storage provider. Read-only. + ClientSynchronize *bool `json:"@client.synchronize,omitempty"` // Properties or facets (see UI.Facet) annotated with this term will not be rendered if the annotation evaluates to true. Users can set this to hide permissons. - UIHidden *bool `json:"@UI.Hidden,omitempty"` + UiHidden *bool `json:"@ui.hidden,omitempty"` } // NewPermission instantiates a new Permission object @@ -325,36 +327,68 @@ func (o *Permission) SetLibreGraphPermissionsActions(v []string) { o.LibreGraphPermissionsActions = v } -// GetUIHidden returns the UIHidden field value if set, zero value otherwise. -func (o *Permission) GetUIHidden() bool { - if o == nil || IsNil(o.UIHidden) { +// GetClientSynchronize returns the ClientSynchronize field value if set, zero value otherwise. +func (o *Permission) GetClientSynchronize() bool { + if o == nil || IsNil(o.ClientSynchronize) { var ret bool return ret } - return *o.UIHidden + return *o.ClientSynchronize } -// GetUIHiddenOk returns a tuple with the UIHidden field value if set, nil otherwise +// GetClientSynchronizeOk returns a tuple with the ClientSynchronize field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Permission) GetUIHiddenOk() (*bool, bool) { - if o == nil || IsNil(o.UIHidden) { +func (o *Permission) GetClientSynchronizeOk() (*bool, bool) { + if o == nil || IsNil(o.ClientSynchronize) { return nil, false } - return o.UIHidden, true + return o.ClientSynchronize, true } -// HasUIHidden returns a boolean if a field has been set. -func (o *Permission) HasUIHidden() bool { - if o != nil && !IsNil(o.UIHidden) { +// HasClientSynchronize returns a boolean if a field has been set. +func (o *Permission) HasClientSynchronize() bool { + if o != nil && !IsNil(o.ClientSynchronize) { return true } return false } -// SetUIHidden gets a reference to the given bool and assigns it to the UIHidden field. -func (o *Permission) SetUIHidden(v bool) { - o.UIHidden = &v +// SetClientSynchronize gets a reference to the given bool and assigns it to the ClientSynchronize field. +func (o *Permission) SetClientSynchronize(v bool) { + o.ClientSynchronize = &v +} + +// GetUiHidden returns the UiHidden field value if set, zero value otherwise. +func (o *Permission) GetUiHidden() bool { + if o == nil || IsNil(o.UiHidden) { + var ret bool + return ret + } + return *o.UiHidden +} + +// GetUiHiddenOk returns a tuple with the UiHidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Permission) GetUiHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.UiHidden) { + return nil, false + } + return o.UiHidden, true +} + +// HasUiHidden returns a boolean if a field has been set. +func (o *Permission) HasUiHidden() bool { + if o != nil && !IsNil(o.UiHidden) { + return true + } + + return false +} + +// SetUiHidden gets a reference to the given bool and assigns it to the UiHidden field. +func (o *Permission) SetUiHidden(v bool) { + o.UiHidden = &v } func (o Permission) MarshalJSON() ([]byte, error) { @@ -391,8 +425,11 @@ func (o Permission) ToMap() (map[string]interface{}, error) { if !IsNil(o.LibreGraphPermissionsActions) { toSerialize["@libre.graph.permissions.actions"] = o.LibreGraphPermissionsActions } - if !IsNil(o.UIHidden) { - toSerialize["@UI.Hidden"] = o.UIHidden + if !IsNil(o.ClientSynchronize) { + toSerialize["@client.synchronize"] = o.ClientSynchronize + } + if !IsNil(o.UiHidden) { + toSerialize["@ui.hidden"] = o.UiHidden } return toSerialize, nil } 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 b3bd05c324..a188a36a6f 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 @@ -46,6 +46,8 @@ type RemoteItem struct { CTag *string `json:"cTag,omitempty"` ParentReference *ItemReference `json:"parentReference,omitempty"` Shared *Shared `json:"shared,omitempty"` + // The set of permissions for the item. Read-only. Nullable. + Permissions []Permission `json:"permissions,omitempty"` // Size of the remote item. Read-only. Size *int64 `json:"size,omitempty"` SpecialFolder *SpecialFolder `json:"specialFolder,omitempty"` @@ -616,6 +618,38 @@ func (o *RemoteItem) SetShared(v Shared) { o.Shared = &v } +// GetPermissions returns the Permissions field value if set, zero value otherwise. +func (o *RemoteItem) GetPermissions() []Permission { + if o == nil || IsNil(o.Permissions) { + var ret []Permission + return ret + } + return o.Permissions +} + +// GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RemoteItem) GetPermissionsOk() ([]Permission, bool) { + if o == nil || IsNil(o.Permissions) { + return nil, false + } + return o.Permissions, true +} + +// HasPermissions returns a boolean if a field has been set. +func (o *RemoteItem) HasPermissions() bool { + if o != nil && !IsNil(o.Permissions) { + return true + } + + return false +} + +// SetPermissions gets a reference to the given []Permission and assigns it to the Permissions field. +func (o *RemoteItem) SetPermissions(v []Permission) { + o.Permissions = v +} + // GetSize returns the Size field value if set, zero value otherwise. func (o *RemoteItem) GetSize() int64 { if o == nil || IsNil(o.Size) { @@ -805,6 +839,9 @@ func (o RemoteItem) ToMap() (map[string]interface{}, error) { if !IsNil(o.Shared) { toSerialize["shared"] = o.Shared } + if !IsNil(o.Permissions) { + toSerialize["permissions"] = o.Permissions + } if !IsNil(o.Size) { toSerialize["size"] = o.Size } diff --git a/vendor/github.com/owncloud/libre-graph-api-go/model_video.go b/vendor/github.com/owncloud/libre-graph-api-go/model_video.go new file mode 100644 index 0000000000..b3882f3a2f --- /dev/null +++ b/vendor/github.com/owncloud/libre-graph-api-go/model_video.go @@ -0,0 +1,458 @@ +/* +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" +) + +// checks if the Video type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Video{} + +// Video The video resource groups video-related data items into a single structure. If a driveItem has a non-null video facet, the item represents a video file. The properties of the video resource are populated by extracting metadata from the file. +type Video struct { + // Number of audio bits per sample. + AudioBitsPerSample *int32 `json:"audioBitsPerSample,omitempty"` + // Number of audio channels. + AudioChannels *int32 `json:"audioChannels,omitempty"` + // Name of the audio format (AAC, MP3, etc.). + AudioFormat *string `json:"audioFormat,omitempty"` + // Number of audio samples per second. + AudioSamplesPerSecond *int32 `json:"audioSamplesPerSecond,omitempty"` + // Bit rate of the video in bits per second. + Bitrate *int32 `json:"bitrate,omitempty"` + // Duration of the file in milliseconds. + Duration *int64 `json:"duration,omitempty"` + // \\\"Four character code\\\" name of the video format. + FourCC *string `json:"fourCC,omitempty"` + // Frame rate of the video. + FrameRate *float64 `json:"frameRate,omitempty"` + // Height of the video, in pixels. + Height *int32 `json:"height,omitempty"` + // Width of the video, in pixels. + Width *int32 `json:"width,omitempty"` +} + +// NewVideo instantiates a new Video 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 NewVideo() *Video { + this := Video{} + return &this +} + +// NewVideoWithDefaults instantiates a new Video 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 NewVideoWithDefaults() *Video { + this := Video{} + return &this +} + +// GetAudioBitsPerSample returns the AudioBitsPerSample field value if set, zero value otherwise. +func (o *Video) GetAudioBitsPerSample() int32 { + if o == nil || IsNil(o.AudioBitsPerSample) { + var ret int32 + return ret + } + return *o.AudioBitsPerSample +} + +// GetAudioBitsPerSampleOk returns a tuple with the AudioBitsPerSample field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Video) GetAudioBitsPerSampleOk() (*int32, bool) { + if o == nil || IsNil(o.AudioBitsPerSample) { + return nil, false + } + return o.AudioBitsPerSample, true +} + +// HasAudioBitsPerSample returns a boolean if a field has been set. +func (o *Video) HasAudioBitsPerSample() bool { + if o != nil && !IsNil(o.AudioBitsPerSample) { + return true + } + + return false +} + +// SetAudioBitsPerSample gets a reference to the given int32 and assigns it to the AudioBitsPerSample field. +func (o *Video) SetAudioBitsPerSample(v int32) { + o.AudioBitsPerSample = &v +} + +// GetAudioChannels returns the AudioChannels field value if set, zero value otherwise. +func (o *Video) GetAudioChannels() int32 { + if o == nil || IsNil(o.AudioChannels) { + var ret int32 + return ret + } + return *o.AudioChannels +} + +// GetAudioChannelsOk returns a tuple with the AudioChannels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Video) GetAudioChannelsOk() (*int32, bool) { + if o == nil || IsNil(o.AudioChannels) { + return nil, false + } + return o.AudioChannels, true +} + +// HasAudioChannels returns a boolean if a field has been set. +func (o *Video) HasAudioChannels() bool { + if o != nil && !IsNil(o.AudioChannels) { + return true + } + + return false +} + +// SetAudioChannels gets a reference to the given int32 and assigns it to the AudioChannels field. +func (o *Video) SetAudioChannels(v int32) { + o.AudioChannels = &v +} + +// GetAudioFormat returns the AudioFormat field value if set, zero value otherwise. +func (o *Video) GetAudioFormat() string { + if o == nil || IsNil(o.AudioFormat) { + var ret string + return ret + } + return *o.AudioFormat +} + +// GetAudioFormatOk returns a tuple with the AudioFormat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Video) GetAudioFormatOk() (*string, bool) { + if o == nil || IsNil(o.AudioFormat) { + return nil, false + } + return o.AudioFormat, true +} + +// HasAudioFormat returns a boolean if a field has been set. +func (o *Video) HasAudioFormat() bool { + if o != nil && !IsNil(o.AudioFormat) { + return true + } + + return false +} + +// SetAudioFormat gets a reference to the given string and assigns it to the AudioFormat field. +func (o *Video) SetAudioFormat(v string) { + o.AudioFormat = &v +} + +// GetAudioSamplesPerSecond returns the AudioSamplesPerSecond field value if set, zero value otherwise. +func (o *Video) GetAudioSamplesPerSecond() int32 { + if o == nil || IsNil(o.AudioSamplesPerSecond) { + var ret int32 + return ret + } + return *o.AudioSamplesPerSecond +} + +// GetAudioSamplesPerSecondOk returns a tuple with the AudioSamplesPerSecond field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Video) GetAudioSamplesPerSecondOk() (*int32, bool) { + if o == nil || IsNil(o.AudioSamplesPerSecond) { + return nil, false + } + return o.AudioSamplesPerSecond, true +} + +// HasAudioSamplesPerSecond returns a boolean if a field has been set. +func (o *Video) HasAudioSamplesPerSecond() bool { + if o != nil && !IsNil(o.AudioSamplesPerSecond) { + return true + } + + return false +} + +// SetAudioSamplesPerSecond gets a reference to the given int32 and assigns it to the AudioSamplesPerSecond field. +func (o *Video) SetAudioSamplesPerSecond(v int32) { + o.AudioSamplesPerSecond = &v +} + +// GetBitrate returns the Bitrate field value if set, zero value otherwise. +func (o *Video) GetBitrate() int32 { + if o == nil || IsNil(o.Bitrate) { + var ret int32 + return ret + } + return *o.Bitrate +} + +// GetBitrateOk returns a tuple with the Bitrate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Video) GetBitrateOk() (*int32, bool) { + if o == nil || IsNil(o.Bitrate) { + return nil, false + } + return o.Bitrate, true +} + +// HasBitrate returns a boolean if a field has been set. +func (o *Video) HasBitrate() bool { + if o != nil && !IsNil(o.Bitrate) { + return true + } + + return false +} + +// SetBitrate gets a reference to the given int32 and assigns it to the Bitrate field. +func (o *Video) SetBitrate(v int32) { + o.Bitrate = &v +} + +// GetDuration returns the Duration field value if set, zero value otherwise. +func (o *Video) GetDuration() int64 { + if o == nil || IsNil(o.Duration) { + var ret int64 + return ret + } + return *o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Video) GetDurationOk() (*int64, bool) { + if o == nil || IsNil(o.Duration) { + return nil, false + } + return o.Duration, true +} + +// HasDuration returns a boolean if a field has been set. +func (o *Video) HasDuration() bool { + if o != nil && !IsNil(o.Duration) { + return true + } + + return false +} + +// SetDuration gets a reference to the given int64 and assigns it to the Duration field. +func (o *Video) SetDuration(v int64) { + o.Duration = &v +} + +// GetFourCC returns the FourCC field value if set, zero value otherwise. +func (o *Video) GetFourCC() string { + if o == nil || IsNil(o.FourCC) { + var ret string + return ret + } + return *o.FourCC +} + +// GetFourCCOk returns a tuple with the FourCC field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Video) GetFourCCOk() (*string, bool) { + if o == nil || IsNil(o.FourCC) { + return nil, false + } + return o.FourCC, true +} + +// HasFourCC returns a boolean if a field has been set. +func (o *Video) HasFourCC() bool { + if o != nil && !IsNil(o.FourCC) { + return true + } + + return false +} + +// SetFourCC gets a reference to the given string and assigns it to the FourCC field. +func (o *Video) SetFourCC(v string) { + o.FourCC = &v +} + +// GetFrameRate returns the FrameRate field value if set, zero value otherwise. +func (o *Video) GetFrameRate() float64 { + if o == nil || IsNil(o.FrameRate) { + var ret float64 + return ret + } + return *o.FrameRate +} + +// GetFrameRateOk returns a tuple with the FrameRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Video) GetFrameRateOk() (*float64, bool) { + if o == nil || IsNil(o.FrameRate) { + return nil, false + } + return o.FrameRate, true +} + +// HasFrameRate returns a boolean if a field has been set. +func (o *Video) HasFrameRate() bool { + if o != nil && !IsNil(o.FrameRate) { + return true + } + + return false +} + +// SetFrameRate gets a reference to the given float64 and assigns it to the FrameRate field. +func (o *Video) SetFrameRate(v float64) { + o.FrameRate = &v +} + +// GetHeight returns the Height field value if set, zero value otherwise. +func (o *Video) GetHeight() int32 { + if o == nil || IsNil(o.Height) { + var ret int32 + return ret + } + return *o.Height +} + +// GetHeightOk returns a tuple with the Height field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Video) GetHeightOk() (*int32, bool) { + if o == nil || IsNil(o.Height) { + return nil, false + } + return o.Height, true +} + +// HasHeight returns a boolean if a field has been set. +func (o *Video) HasHeight() bool { + if o != nil && !IsNil(o.Height) { + return true + } + + return false +} + +// SetHeight gets a reference to the given int32 and assigns it to the Height field. +func (o *Video) SetHeight(v int32) { + o.Height = &v +} + +// GetWidth returns the Width field value if set, zero value otherwise. +func (o *Video) GetWidth() int32 { + if o == nil || IsNil(o.Width) { + var ret int32 + return ret + } + return *o.Width +} + +// GetWidthOk returns a tuple with the Width field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Video) GetWidthOk() (*int32, bool) { + if o == nil || IsNil(o.Width) { + return nil, false + } + return o.Width, true +} + +// HasWidth returns a boolean if a field has been set. +func (o *Video) HasWidth() bool { + if o != nil && !IsNil(o.Width) { + return true + } + + return false +} + +// SetWidth gets a reference to the given int32 and assigns it to the Width field. +func (o *Video) SetWidth(v int32) { + o.Width = &v +} + +func (o Video) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Video) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AudioBitsPerSample) { + toSerialize["audioBitsPerSample"] = o.AudioBitsPerSample + } + if !IsNil(o.AudioChannels) { + toSerialize["audioChannels"] = o.AudioChannels + } + if !IsNil(o.AudioFormat) { + toSerialize["audioFormat"] = o.AudioFormat + } + if !IsNil(o.AudioSamplesPerSecond) { + toSerialize["audioSamplesPerSecond"] = o.AudioSamplesPerSecond + } + if !IsNil(o.Bitrate) { + toSerialize["bitrate"] = o.Bitrate + } + if !IsNil(o.Duration) { + toSerialize["duration"] = o.Duration + } + if !IsNil(o.FourCC) { + toSerialize["fourCC"] = o.FourCC + } + if !IsNil(o.FrameRate) { + toSerialize["frameRate"] = o.FrameRate + } + if !IsNil(o.Height) { + toSerialize["height"] = o.Height + } + if !IsNil(o.Width) { + toSerialize["width"] = o.Width + } + return toSerialize, nil +} + +type NullableVideo struct { + value *Video + isSet bool +} + +func (v NullableVideo) Get() *Video { + return v.value +} + +func (v *NullableVideo) Set(val *Video) { + v.value = val + v.isSet = true +} + +func (v NullableVideo) IsSet() bool { + return v.isSet +} + +func (v *NullableVideo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVideo(val *Video) *NullableVideo { + return &NullableVideo{value: val, isSet: true} +} + +func (v NullableVideo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVideo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 3f0e58bf44..22c1a082b7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1590,7 +1590,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.20231201125350-a08244876423 +# github.com/owncloud/libre-graph-api-go v1.0.5-0.20240115110609-b018a896364e ## explicit; go 1.18 github.com/owncloud/libre-graph-api-go # github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c