bump github.com/owncloud/libre-graph-api-go@main

This commit is contained in:
Ralf Haferkamp
2024-01-30 17:16:02 +01:00
committed by Ralf Haferkamp
parent 857125577f
commit a44cf4a6ea
11 changed files with 224 additions and 335 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ require (
github.com/onsi/gomega v1.31.1
github.com/open-policy-agent/opa v0.61.0
github.com/orcaman/concurrent-map v1.0.0
github.com/owncloud/libre-graph-api-go v1.0.5-0.20240115110609-b018a896364e
github.com/owncloud/libre-graph-api-go v1.0.5-0.20240130152355-ac663a9002a1
github.com/pkg/errors v0.9.1
github.com/pkg/xattr v0.4.9
github.com/prometheus/client_golang v1.18.0
+2 -2
View File
@@ -1790,8 +1790,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.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/owncloud/libre-graph-api-go v1.0.5-0.20240130152355-ac663a9002a1 h1:QLEERCsKv9VhkQaCP5zMEPdAqJLp/iuyogrg/eTfISg=
github.com/owncloud/libre-graph-api-go v1.0.5-0.20240130152355-ac663a9002a1/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=
+1 -1
View File
@@ -215,7 +215,7 @@ Class | Method | HTTP request | Description
- [Quota](docs/Quota.md)
- [RemoteItem](docs/RemoteItem.md)
- [SharePointIdentitySet](docs/SharePointIdentitySet.md)
- [Shared](docs/Shared.md)
- [SharingInvitation](docs/SharingInvitation.md)
- [SharingLink](docs/SharingLink.md)
- [SharingLinkPassword](docs/SharingLinkPassword.md)
- [SharingLinkType](docs/SharingLinkType.md)
+1 -1
View File
@@ -40,7 +40,7 @@ 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.
Mounted shares in the share jail are unmounted. The `@client.synchronize` property of the `driveItem` 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().
+1 -1
View File
@@ -42,7 +42,7 @@ func (r ApiCreateDriveItemRequest) Execute() (*DriveItem, *http.Response, error)
/*
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.
You can use the root childrens endpoint to mount a remoteItem in the share jail. The `@client.synchronize` property of the `driveItem` 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().
+74
View File
@@ -63,6 +63,10 @@ type DriveItem struct {
Permissions []Permission `json:"permissions,omitempty"`
Audio *Audio `json:"audio,omitempty"`
Video *Video `json:"video,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"`
}
// NewDriveItem instantiates a new DriveItem object
@@ -1010,6 +1014,70 @@ func (o *DriveItem) SetVideo(v Video) {
o.Video = &v
}
// GetClientSynchronize returns the ClientSynchronize field value if set, zero value otherwise.
func (o *DriveItem) GetClientSynchronize() bool {
if o == nil || IsNil(o.ClientSynchronize) {
var ret bool
return ret
}
return *o.ClientSynchronize
}
// 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 *DriveItem) GetClientSynchronizeOk() (*bool, bool) {
if o == nil || IsNil(o.ClientSynchronize) {
return nil, false
}
return o.ClientSynchronize, true
}
// HasClientSynchronize returns a boolean if a field has been set.
func (o *DriveItem) HasClientSynchronize() bool {
if o != nil && !IsNil(o.ClientSynchronize) {
return true
}
return false
}
// SetClientSynchronize gets a reference to the given bool and assigns it to the ClientSynchronize field.
func (o *DriveItem) SetClientSynchronize(v bool) {
o.ClientSynchronize = &v
}
// GetUIHidden returns the UIHidden field value if set, zero value otherwise.
func (o *DriveItem) 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 *DriveItem) 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 *DriveItem) 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 *DriveItem) SetUIHidden(v bool) {
o.UIHidden = &v
}
func (o DriveItem) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
@@ -1107,6 +1175,12 @@ func (o DriveItem) ToMap() (map[string]interface{}, error) {
if !IsNil(o.Video) {
toSerialize["video"] = o.Video
}
if !IsNil(o.ClientSynchronize) {
toSerialize["@client.synchronize"] = o.ClientSynchronize
}
if !IsNil(o.UIHidden) {
toSerialize["@UI.Hidden"] = o.UIHidden
}
return toSerialize, nil
}
+19 -57
View File
@@ -33,11 +33,8 @@ type Permission struct {
// Deprecated
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"`
LibreGraphPermissionsActions []string `json:"@libre.graph.permissions.actions,omitempty"`
Invitation *SharingInvitation `json:"invitation,omitempty"`
}
// NewPermission instantiates a new Permission object
@@ -327,68 +324,36 @@ func (o *Permission) SetLibreGraphPermissionsActions(v []string) {
o.LibreGraphPermissionsActions = v
}
// 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
// GetInvitation returns the Invitation field value if set, zero value otherwise.
func (o *Permission) GetInvitation() SharingInvitation {
if o == nil || IsNil(o.Invitation) {
var ret SharingInvitation
return ret
}
return *o.ClientSynchronize
return *o.Invitation
}
// GetClientSynchronizeOk returns a tuple with the ClientSynchronize field value if set, nil otherwise
// GetInvitationOk returns a tuple with the Invitation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Permission) GetClientSynchronizeOk() (*bool, bool) {
if o == nil || IsNil(o.ClientSynchronize) {
func (o *Permission) GetInvitationOk() (*SharingInvitation, bool) {
if o == nil || IsNil(o.Invitation) {
return nil, false
}
return o.ClientSynchronize, true
return o.Invitation, true
}
// HasClientSynchronize returns a boolean if a field has been set.
func (o *Permission) HasClientSynchronize() bool {
if o != nil && !IsNil(o.ClientSynchronize) {
// HasInvitation returns a boolean if a field has been set.
func (o *Permission) HasInvitation() bool {
if o != nil && !IsNil(o.Invitation) {
return true
}
return false
}
// 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
// SetInvitation gets a reference to the given SharingInvitation and assigns it to the Invitation field.
func (o *Permission) SetInvitation(v SharingInvitation) {
o.Invitation = &v
}
func (o Permission) MarshalJSON() ([]byte, error) {
@@ -425,11 +390,8 @@ func (o Permission) ToMap() (map[string]interface{}, error) {
if !IsNil(o.LibreGraphPermissionsActions) {
toSerialize["@libre.graph.permissions.actions"] = o.LibreGraphPermissionsActions
}
if !IsNil(o.ClientSynchronize) {
toSerialize["@client.synchronize"] = o.ClientSynchronize
}
if !IsNil(o.UiHidden) {
toSerialize["@ui.hidden"] = o.UiHidden
if !IsNil(o.Invitation) {
toSerialize["invitation"] = o.Invitation
}
return toSerialize, nil
}
-36
View File
@@ -45,7 +45,6 @@ type RemoteItem struct {
// An eTag for the content of the item. This eTag is not changed if only the metadata is changed. Note This property is not returned if the item is a folder. Read-only.
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.
@@ -586,38 +585,6 @@ func (o *RemoteItem) SetParentReference(v ItemReference) {
o.ParentReference = &v
}
// GetShared returns the Shared field value if set, zero value otherwise.
func (o *RemoteItem) GetShared() Shared {
if o == nil || IsNil(o.Shared) {
var ret Shared
return ret
}
return *o.Shared
}
// GetSharedOk returns a tuple with the Shared field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RemoteItem) GetSharedOk() (*Shared, bool) {
if o == nil || IsNil(o.Shared) {
return nil, false
}
return o.Shared, true
}
// HasShared returns a boolean if a field has been set.
func (o *RemoteItem) HasShared() bool {
if o != nil && !IsNil(o.Shared) {
return true
}
return false
}
// SetShared gets a reference to the given Shared and assigns it to the Shared field.
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) {
@@ -836,9 +803,6 @@ func (o RemoteItem) ToMap() (map[string]interface{}, error) {
if !IsNil(o.ParentReference) {
toSerialize["parentReference"] = o.ParentReference
}
if !IsNil(o.Shared) {
toSerialize["shared"] = o.Shared
}
if !IsNil(o.Permissions) {
toSerialize["permissions"] = o.Permissions
}
-235
View File
@@ -1,235 +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 Shared type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Shared{}
// Shared struct for Shared
type Shared struct {
Owner *IdentitySet `json:"owner,omitempty"`
// Indicates the scope of how the item is shared: anonymous, organization, or users. Read-only.
Scope *string `json:"scope,omitempty"`
SharedBy *IdentitySet `json:"sharedBy,omitempty"`
// The UTC date and time when the item was shared. Read-only.
SharedDateTime *time.Time `json:"sharedDateTime,omitempty"`
}
// NewShared instantiates a new Shared 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 NewShared() *Shared {
this := Shared{}
return &this
}
// NewSharedWithDefaults instantiates a new Shared 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 NewSharedWithDefaults() *Shared {
this := Shared{}
return &this
}
// GetOwner returns the Owner field value if set, zero value otherwise.
func (o *Shared) GetOwner() IdentitySet {
if o == nil || IsNil(o.Owner) {
var ret IdentitySet
return ret
}
return *o.Owner
}
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Shared) GetOwnerOk() (*IdentitySet, bool) {
if o == nil || IsNil(o.Owner) {
return nil, false
}
return o.Owner, true
}
// HasOwner returns a boolean if a field has been set.
func (o *Shared) HasOwner() bool {
if o != nil && !IsNil(o.Owner) {
return true
}
return false
}
// SetOwner gets a reference to the given IdentitySet and assigns it to the Owner field.
func (o *Shared) SetOwner(v IdentitySet) {
o.Owner = &v
}
// GetScope returns the Scope field value if set, zero value otherwise.
func (o *Shared) GetScope() string {
if o == nil || IsNil(o.Scope) {
var ret string
return ret
}
return *o.Scope
}
// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Shared) GetScopeOk() (*string, bool) {
if o == nil || IsNil(o.Scope) {
return nil, false
}
return o.Scope, true
}
// HasScope returns a boolean if a field has been set.
func (o *Shared) HasScope() bool {
if o != nil && !IsNil(o.Scope) {
return true
}
return false
}
// SetScope gets a reference to the given string and assigns it to the Scope field.
func (o *Shared) SetScope(v string) {
o.Scope = &v
}
// GetSharedBy returns the SharedBy field value if set, zero value otherwise.
func (o *Shared) GetSharedBy() IdentitySet {
if o == nil || IsNil(o.SharedBy) {
var ret IdentitySet
return ret
}
return *o.SharedBy
}
// GetSharedByOk returns a tuple with the SharedBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Shared) GetSharedByOk() (*IdentitySet, bool) {
if o == nil || IsNil(o.SharedBy) {
return nil, false
}
return o.SharedBy, true
}
// HasSharedBy returns a boolean if a field has been set.
func (o *Shared) HasSharedBy() bool {
if o != nil && !IsNil(o.SharedBy) {
return true
}
return false
}
// SetSharedBy gets a reference to the given IdentitySet and assigns it to the SharedBy field.
func (o *Shared) SetSharedBy(v IdentitySet) {
o.SharedBy = &v
}
// GetSharedDateTime returns the SharedDateTime field value if set, zero value otherwise.
func (o *Shared) GetSharedDateTime() time.Time {
if o == nil || IsNil(o.SharedDateTime) {
var ret time.Time
return ret
}
return *o.SharedDateTime
}
// GetSharedDateTimeOk returns a tuple with the SharedDateTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Shared) GetSharedDateTimeOk() (*time.Time, bool) {
if o == nil || IsNil(o.SharedDateTime) {
return nil, false
}
return o.SharedDateTime, true
}
// HasSharedDateTime returns a boolean if a field has been set.
func (o *Shared) HasSharedDateTime() bool {
if o != nil && !IsNil(o.SharedDateTime) {
return true
}
return false
}
// SetSharedDateTime gets a reference to the given time.Time and assigns it to the SharedDateTime field.
func (o *Shared) SetSharedDateTime(v time.Time) {
o.SharedDateTime = &v
}
func (o Shared) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Shared) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Owner) {
toSerialize["owner"] = o.Owner
}
if !IsNil(o.Scope) {
toSerialize["scope"] = o.Scope
}
if !IsNil(o.SharedBy) {
toSerialize["sharedBy"] = o.SharedBy
}
if !IsNil(o.SharedDateTime) {
toSerialize["sharedDateTime"] = o.SharedDateTime
}
return toSerialize, nil
}
type NullableShared struct {
value *Shared
isSet bool
}
func (v NullableShared) Get() *Shared {
return v.value
}
func (v *NullableShared) Set(val *Shared) {
v.value = val
v.isSet = true
}
func (v NullableShared) IsSet() bool {
return v.isSet
}
func (v *NullableShared) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableShared(val *Shared) *NullableShared {
return &NullableShared{value: val, isSet: true}
}
func (v NullableShared) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableShared) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
@@ -0,0 +1,124 @@
/*
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 SharingInvitation type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SharingInvitation{}
// SharingInvitation invitation-related data items
type SharingInvitation struct {
InvitedBy *IdentitySet `json:"invitedBy,omitempty"`
}
// NewSharingInvitation instantiates a new SharingInvitation 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 NewSharingInvitation() *SharingInvitation {
this := SharingInvitation{}
return &this
}
// NewSharingInvitationWithDefaults instantiates a new SharingInvitation 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 NewSharingInvitationWithDefaults() *SharingInvitation {
this := SharingInvitation{}
return &this
}
// GetInvitedBy returns the InvitedBy field value if set, zero value otherwise.
func (o *SharingInvitation) GetInvitedBy() IdentitySet {
if o == nil || IsNil(o.InvitedBy) {
var ret IdentitySet
return ret
}
return *o.InvitedBy
}
// GetInvitedByOk returns a tuple with the InvitedBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SharingInvitation) GetInvitedByOk() (*IdentitySet, bool) {
if o == nil || IsNil(o.InvitedBy) {
return nil, false
}
return o.InvitedBy, true
}
// HasInvitedBy returns a boolean if a field has been set.
func (o *SharingInvitation) HasInvitedBy() bool {
if o != nil && !IsNil(o.InvitedBy) {
return true
}
return false
}
// SetInvitedBy gets a reference to the given IdentitySet and assigns it to the InvitedBy field.
func (o *SharingInvitation) SetInvitedBy(v IdentitySet) {
o.InvitedBy = &v
}
func (o SharingInvitation) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SharingInvitation) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.InvitedBy) {
toSerialize["invitedBy"] = o.InvitedBy
}
return toSerialize, nil
}
type NullableSharingInvitation struct {
value *SharingInvitation
isSet bool
}
func (v NullableSharingInvitation) Get() *SharingInvitation {
return v.value
}
func (v *NullableSharingInvitation) Set(val *SharingInvitation) {
v.value = val
v.isSet = true
}
func (v NullableSharingInvitation) IsSet() bool {
return v.isSet
}
func (v *NullableSharingInvitation) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSharingInvitation(val *SharingInvitation) *NullableSharingInvitation {
return &NullableSharingInvitation{value: val, isSet: true}
}
func (v NullableSharingInvitation) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSharingInvitation) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
+1 -1
View File
@@ -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.20240115110609-b018a896364e
# github.com/owncloud/libre-graph-api-go v1.0.5-0.20240130152355-ac663a9002a1
## explicit; go 1.18
github.com/owncloud/libre-graph-api-go
# github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c