/
storage_onedrive_config.go
115 lines (85 loc) · 3.3 KB
/
storage_onedrive_config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// StorageOnedriveConfig storage onedrive config
//
// swagger:model storage.onedriveConfig
type StorageOnedriveConfig struct {
// Set scopes to be requested by rclone.
// Example: Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access
AccessScopes *string `json:"accessScopes,omitempty"`
// Auth server URL.
AuthURL string `json:"authUrl,omitempty"`
// Chunk size to upload files with - must be multiple of 320k (327,680 bytes).
ChunkSize *string `json:"chunkSize,omitempty"`
// OAuth Client Id.
ClientID string `json:"clientId,omitempty"`
// OAuth Client Secret.
ClientSecret string `json:"clientSecret,omitempty"`
// Disable the request for Sites.Read.All permission.
DisableSitePermission *bool `json:"disableSitePermission,omitempty"`
// The ID of the drive to use.
DriveID string `json:"driveId,omitempty"`
// The type of the drive (personal | business | documentLibrary).
DriveType string `json:"driveType,omitempty"`
// The encoding for the backend.
Encoding *string `json:"encoding,omitempty"`
// Set to make OneNote files show up in directory listings.
ExposeOnenoteFiles *bool `json:"exposeOnenoteFiles,omitempty"`
// Specify the hash in use for the backend.
// Example: auto
HashType *string `json:"hashType,omitempty"`
// Set the password for links created by the link command.
LinkPassword string `json:"linkPassword,omitempty"`
// Set the scope of the links created by the link command.
// Example: anonymous
LinkScope *string `json:"linkScope,omitempty"`
// Set the type of the links created by the link command.
// Example: view
LinkType *string `json:"linkType,omitempty"`
// Size of listing chunk.
ListChunk *int64 `json:"listChunk,omitempty"`
// Remove all versions on modifying operations.
NoVersions *bool `json:"noVersions,omitempty"`
// Choose national cloud region for OneDrive.
// Example: global
Region *string `json:"region,omitempty"`
// ID of the root folder.
RootFolderID string `json:"rootFolderId,omitempty"`
// Allow server-side operations (e.g. copy) to work across different onedrive configs.
ServerSideAcrossConfigs *bool `json:"serverSideAcrossConfigs,omitempty"`
// OAuth Access Token as a JSON blob.
Token string `json:"token,omitempty"`
// Token server url.
TokenURL string `json:"tokenUrl,omitempty"`
}
// Validate validates this storage onedrive config
func (m *StorageOnedriveConfig) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this storage onedrive config based on context it is used
func (m *StorageOnedriveConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *StorageOnedriveConfig) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *StorageOnedriveConfig) UnmarshalBinary(b []byte) error {
var res StorageOnedriveConfig
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}