chore: bump libregraph api

This commit is contained in:
Michael Barz
2023-11-28 14:56:12 +01:00
committed by Florian Schade
parent 580e8aeb46
commit fdb3572cc0
6 changed files with 81 additions and 5 deletions
@@ -27,6 +27,8 @@ type DriveItemCreateLink struct {
Password *string `json:"password,omitempty"`
// Provides a user-visible display name of the link. Optional. Libregraph only.
DisplayName *string `json:"displayName,omitempty"`
// The quicklink property can be assigned to only one link per resource. A quicklink can be used in the clients to provide a one-click copy to clipboard action. Optional. Libregraph only.
LibreGraphQuickLink *bool `json:"@libre.graph.quickLink,omitempty"`
}
// NewDriveItemCreateLink instantiates a new DriveItemCreateLink object
@@ -174,6 +176,38 @@ func (o *DriveItemCreateLink) SetDisplayName(v string) {
o.DisplayName = &v
}
// GetLibreGraphQuickLink returns the LibreGraphQuickLink field value if set, zero value otherwise.
func (o *DriveItemCreateLink) GetLibreGraphQuickLink() bool {
if o == nil || IsNil(o.LibreGraphQuickLink) {
var ret bool
return ret
}
return *o.LibreGraphQuickLink
}
// GetLibreGraphQuickLinkOk returns a tuple with the LibreGraphQuickLink field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItemCreateLink) GetLibreGraphQuickLinkOk() (*bool, bool) {
if o == nil || IsNil(o.LibreGraphQuickLink) {
return nil, false
}
return o.LibreGraphQuickLink, true
}
// HasLibreGraphQuickLink returns a boolean if a field has been set.
func (o *DriveItemCreateLink) HasLibreGraphQuickLink() bool {
if o != nil && !IsNil(o.LibreGraphQuickLink) {
return true
}
return false
}
// SetLibreGraphQuickLink gets a reference to the given bool and assigns it to the LibreGraphQuickLink field.
func (o *DriveItemCreateLink) SetLibreGraphQuickLink(v bool) {
o.LibreGraphQuickLink = &v
}
func (o DriveItemCreateLink) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
@@ -196,6 +230,9 @@ func (o DriveItemCreateLink) ToMap() (map[string]interface{}, error) {
if !IsNil(o.DisplayName) {
toSerialize["displayName"] = o.DisplayName
}
if !IsNil(o.LibreGraphQuickLink) {
toSerialize["@libre.graph.quickLink"] = o.LibreGraphQuickLink
}
return toSerialize, nil
}
+37
View File
@@ -26,6 +26,8 @@ type SharingLink struct {
WebUrl *string `json:"webUrl,omitempty"`
// Provides a user-visible display name of the link. Optional. Libregraph only.
LibreGraphDisplayName *string `json:"@libre.graph.displayName,omitempty"`
// The quicklink property can be assigned to only one link per resource. A quicklink can be used in the clients to provide a one-click copy to clipboard action. Optional. Libregraph only.
LibreGraphQuickLink *bool `json:"@libre.graph.quickLink,omitempty"`
}
// NewSharingLink instantiates a new SharingLink object
@@ -173,6 +175,38 @@ func (o *SharingLink) SetLibreGraphDisplayName(v string) {
o.LibreGraphDisplayName = &v
}
// GetLibreGraphQuickLink returns the LibreGraphQuickLink field value if set, zero value otherwise.
func (o *SharingLink) GetLibreGraphQuickLink() bool {
if o == nil || IsNil(o.LibreGraphQuickLink) {
var ret bool
return ret
}
return *o.LibreGraphQuickLink
}
// GetLibreGraphQuickLinkOk returns a tuple with the LibreGraphQuickLink field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SharingLink) GetLibreGraphQuickLinkOk() (*bool, bool) {
if o == nil || IsNil(o.LibreGraphQuickLink) {
return nil, false
}
return o.LibreGraphQuickLink, true
}
// HasLibreGraphQuickLink returns a boolean if a field has been set.
func (o *SharingLink) HasLibreGraphQuickLink() bool {
if o != nil && !IsNil(o.LibreGraphQuickLink) {
return true
}
return false
}
// SetLibreGraphQuickLink gets a reference to the given bool and assigns it to the LibreGraphQuickLink field.
func (o *SharingLink) SetLibreGraphQuickLink(v bool) {
o.LibreGraphQuickLink = &v
}
func (o SharingLink) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
@@ -195,6 +229,9 @@ func (o SharingLink) ToMap() (map[string]interface{}, error) {
if !IsNil(o.LibreGraphDisplayName) {
toSerialize["@libre.graph.displayName"] = o.LibreGraphDisplayName
}
if !IsNil(o.LibreGraphQuickLink) {
toSerialize["@libre.graph.quickLink"] = o.LibreGraphQuickLink
}
return toSerialize, nil
}
+3 -1
View File
@@ -15,11 +15,12 @@ import (
"fmt"
)
// SharingLinkType The type of the link created. | Value | Display name | Description | | -------------- | ----------------- | --------------------------------------------------------------- | | view | View | Creates a read-only link to the driveItem. | | upload | Upload | Creates a read-write link to the folder driveItem. | | edit | Edit | Creates a read-write link to the driveItem. | | createOnly | File Drop | Creates an upload-only link to the folder driveItem. | | blocksDownload | Secure View | Creates a read-only link that blocks download to the driveItem. |
// SharingLinkType The type of the link created. | Value | Display name | Description | | -------------- | ----------------- | --------------------------------------------------------------- | | internal | Internal | Creates an internal link without any permissions. | | view | View | Creates a read-only link to the driveItem. | | upload | Upload | Creates a read-write link to the folder driveItem. | | edit | Edit | Creates a read-write link to the driveItem. | | createOnly | File Drop | Creates an upload-only link to the folder driveItem. | | blocksDownload | Secure View | Creates a read-only link that blocks download to the driveItem. |
type SharingLinkType string
// List of sharingLinkType
const (
INTERNAL SharingLinkType = "internal"
VIEW SharingLinkType = "view"
UPLOAD SharingLinkType = "upload"
EDIT SharingLinkType = "edit"
@@ -29,6 +30,7 @@ const (
// All allowed values of SharingLinkType enum
var AllowedSharingLinkTypeEnumValues = []SharingLinkType{
"internal",
"view",
"upload",
"edit",