Switch to opencloud-eu fork of libre-graph-api-go

This commit is contained in:
Ralf Haferkamp
2025-05-15 14:11:35 +02:00
parent fee393a6ab
commit 3dc9c0cb9a
196 changed files with 2486 additions and 2353 deletions

2
go.mod
View File

@@ -63,9 +63,9 @@ require (
github.com/onsi/ginkgo/v2 v2.23.4
github.com/onsi/gomega v1.37.0
github.com/open-policy-agent/opa v1.4.2
github.com/opencloud-eu/libre-graph-api-go v1.0.5
github.com/opencloud-eu/reva/v2 v2.32.0
github.com/orcaman/concurrent-map v1.0.0
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.22.0

4
go.sum
View File

@@ -860,6 +860,8 @@ github.com/open-policy-agent/opa v1.4.2 h1:ag4upP7zMsa4WE2p1pwAFeG4Pn3mNwfAx9DLh
github.com/open-policy-agent/opa v1.4.2/go.mod h1:DNzZPKqKh4U0n0ANxcCVlw8lCSv2c+h5G/3QvSYdWZ8=
github.com/opencloud-eu/go-micro-plugins/v4/store/nats-js-kv v0.0.0-20250512152754-23325793059a h1:Sakl76blJAaM6NxylVkgSzktjo2dS504iDotEFJsh3M=
github.com/opencloud-eu/go-micro-plugins/v4/store/nats-js-kv v0.0.0-20250512152754-23325793059a/go.mod h1:pjcozWijkNPbEtX5SIQaxEW/h8VAVZYTLx+70bmB3LY=
github.com/opencloud-eu/libre-graph-api-go v1.0.5 h1:Wv09oIjCF8zRN8roPzjXXo6ORp2h87/YhmdXE9N4p/A=
github.com/opencloud-eu/libre-graph-api-go v1.0.5/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q=
github.com/opencloud-eu/reva/v2 v2.32.0 h1:JRWPleHiEl0film95Gkh1iBEhc6eikEsx5FKLfVx6l8=
github.com/opencloud-eu/reva/v2 v2.32.0/go.mod h1:FDhGVC+ZsRRWdC3am4EbuILBtviTbCDVrTUjFECOqvg=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
@@ -870,8 +872,6 @@ 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.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.9 h1:njquRbBU7fuwIe5rEvtaniVBjwWzcpdUVptSgzFqZsw=

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"testing"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/pkg/conversions"
)

View File

@@ -7,7 +7,7 @@ import (
"fmt"
"github.com/Nerzal/gocloak/v13"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
// Some attribute constants.

View File

@@ -4,7 +4,7 @@ import (
"context"
"github.com/Nerzal/gocloak/v13"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
// UserAction defines a type for user actions

View File

@@ -23,7 +23,7 @@ import (
"github.com/opencloud-eu/opencloud/pkg/l10n"
ehmsg "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/messages/eventhistory/v0"
ehsvc "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/eventhistory/v0"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
var (

View File

@@ -14,7 +14,7 @@ import (
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/opencloud-eu/reva/v2/pkg/storagespace"
"github.com/opencloud-eu/reva/v2/pkg/utils"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/pkg/l10n"
)

View File

@@ -7,7 +7,7 @@ import (
collaborationv1beta1 "github.com/cs3org/go-cs3apis/cs3/sharing/collaboration/v1beta1"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
mock "github.com/stretchr/testify/mock"

View File

@@ -5,7 +5,7 @@ package mocks
import (
context "context"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
mock "github.com/stretchr/testify/mock"
providerv1beta1 "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"

View File

@@ -9,7 +9,7 @@ import (
"github.com/go-chi/chi/v5/middleware"
"github.com/go-chi/render"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
// Error defines a custom error struct, containing and MS Graph error code and a textual error message

View File

@@ -8,7 +8,7 @@ import (
"github.com/CiscoM31/godata"
cs3group "github.com/cs3org/go-cs3apis/cs3/identity/group/v1beta1"
cs3user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
)

View File

@@ -12,7 +12,7 @@ import (
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
revautils "github.com/opencloud-eu/reva/v2/pkg/utils"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
// IdentityCache implements a simple ttl based cache for looking up users and groups by ID

View File

@@ -14,7 +14,7 @@ import (
"github.com/opencloud-eu/opencloud/pkg/shared"
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
var (

View File

@@ -3,7 +3,7 @@ package identity
import (
"context"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
// ErrEducationBackend is a dummy EducationBackend, doing nothing

View File

@@ -14,7 +14,7 @@ import (
"github.com/go-ldap/ldap/v3"
"github.com/google/uuid"
"github.com/libregraph/idm/pkg/ldapdn"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/pkg/log"
"github.com/opencloud-eu/opencloud/services/graph/pkg/config"

View File

@@ -8,7 +8,7 @@ import (
"github.com/go-ldap/ldap/v3"
"github.com/libregraph/idm/pkg/ldapdn"
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
type educationClassAttributeMap struct {

View File

@@ -7,7 +7,7 @@ import (
"github.com/go-ldap/ldap/v3"
"github.com/opencloud-eu/opencloud/services/graph/pkg/identity/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
)

View File

@@ -11,7 +11,7 @@ import (
"github.com/opencloud-eu/opencloud/pkg/log"
"github.com/opencloud-eu/opencloud/services/graph/pkg/config"
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
type educationConfig struct {

View File

@@ -10,7 +10,7 @@ import (
"github.com/opencloud-eu/opencloud/services/graph/pkg/config"
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
"github.com/opencloud-eu/opencloud/services/graph/pkg/identity/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
)

View File

@@ -6,7 +6,7 @@ import (
"fmt"
"github.com/go-ldap/ldap/v3"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
)

View File

@@ -6,7 +6,7 @@ import (
"github.com/go-ldap/ldap/v3"
"github.com/opencloud-eu/opencloud/services/graph/pkg/identity/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
)

View File

@@ -12,7 +12,7 @@ import (
"github.com/go-ldap/ldap/v3"
"github.com/gofrs/uuid"
"github.com/libregraph/idm/pkg/ldapdn"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
)

View File

@@ -12,7 +12,7 @@ import (
"github.com/opencloud-eu/opencloud/pkg/log"
"github.com/opencloud-eu/opencloud/services/graph/pkg/config"
"github.com/opencloud-eu/opencloud/services/graph/pkg/identity/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
)

View File

@@ -7,7 +7,7 @@ import (
godata "github.com/CiscoM31/godata"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
mock "github.com/stretchr/testify/mock"

View File

@@ -5,7 +5,7 @@ package mocks
import (
context "context"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
mock "github.com/stretchr/testify/mock"
)

View File

@@ -6,7 +6,7 @@ import (
linkv1beta1 "github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/opencloud-eu/reva/v2/pkg/storage/utils/grants"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/services/graph/pkg/unifiedrole"
)

View File

@@ -7,7 +7,7 @@ import (
. "github.com/onsi/gomega"
"github.com/opencloud-eu/opencloud/services/graph/pkg/linktype"
"github.com/opencloud-eu/reva/v2/pkg/storage/utils/grants"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
var _ = Describe("LinktypeFromPermission", func() {

View File

@@ -18,7 +18,7 @@ import (
types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
"github.com/go-chi/chi/v5"
"github.com/go-chi/render"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
revactx "github.com/opencloud-eu/reva/v2/pkg/ctx"
"github.com/opencloud-eu/reva/v2/pkg/publicshare"

View File

@@ -17,7 +17,7 @@ import (
"github.com/opencloud-eu/opencloud/services/graph/pkg/linktype"
"github.com/opencloud-eu/reva/v2/pkg/storagespace"
"github.com/opencloud-eu/reva/v2/pkg/utils"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
func (s DriveItemPermissionsService) CreateLink(ctx context.Context, driveItemID *storageprovider.ResourceId, createLink libregraph.DriveItemCreateLink) (libregraph.Permission, error) {

View File

@@ -22,7 +22,7 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/status"
"github.com/opencloud-eu/reva/v2/pkg/utils"
cs3mocks "github.com/opencloud-eu/reva/v2/tests/cs3mocks/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/mock"
)

View File

@@ -21,7 +21,7 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/opencloud-eu/opencloud/services/graph/pkg/config"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/mock"
"github.com/tidwall/gjson"
"google.golang.org/grpc"

View File

@@ -11,7 +11,7 @@ import (
ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1"
storageprovider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/go-chi/render"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"google.golang.org/protobuf/types/known/fieldmaskpb"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"

View File

@@ -14,7 +14,7 @@ import (
"github.com/go-chi/chi/v5"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/mock"
"github.com/tidwall/gjson"
"google.golang.org/grpc"

View File

@@ -8,7 +8,7 @@ import (
"github.com/go-chi/render"
settingssvc "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/settings/v0"
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
// ListApplications implements the Service interface.

View File

@@ -21,7 +21,7 @@ import (
service "github.com/opencloud-eu/opencloud/services/graph/pkg/service/v0"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
cs3mocks "github.com/opencloud-eu/reva/v2/tests/cs3mocks/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc"
)

View File

@@ -12,7 +12,7 @@ import (
revactx "github.com/opencloud-eu/reva/v2/pkg/ctx"
"github.com/opencloud-eu/reva/v2/pkg/events"
"github.com/opencloud-eu/reva/v2/pkg/utils"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
merrors "go-micro.dev/v4/errors"
)

View File

@@ -25,7 +25,7 @@ import (
revactx "github.com/opencloud-eu/reva/v2/pkg/ctx"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
cs3mocks "github.com/opencloud-eu/reva/v2/tests/cs3mocks/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc"
)

View File

@@ -16,7 +16,7 @@ import (
ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1"
storageprovider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"golang.org/x/sync/errgroup"
"google.golang.org/protobuf/types/known/fieldmaskpb"

View File

@@ -21,7 +21,7 @@ import (
storageprovider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
"github.com/go-chi/render"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"golang.org/x/crypto/sha3"
revactx "github.com/opencloud-eu/reva/v2/pkg/ctx"

View File

@@ -15,7 +15,7 @@ import (
"github.com/go-chi/chi/v5"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc"

View File

@@ -22,7 +22,7 @@ import (
revactx "github.com/opencloud-eu/reva/v2/pkg/ctx"
"github.com/opencloud-eu/reva/v2/pkg/storagespace"
"github.com/opencloud-eu/reva/v2/pkg/utils"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/pkg/errors"
merrors "go-micro.dev/v4/errors"
"golang.org/x/sync/errgroup"

View File

@@ -5,7 +5,7 @@ import (
"time"
"github.com/CiscoM31/godata"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

View File

@@ -11,7 +11,7 @@ import (
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
revactx "github.com/opencloud-eu/reva/v2/pkg/ctx"
"github.com/opencloud-eu/reva/v2/pkg/events"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/go-chi/chi/v5"
"github.com/go-chi/render"

View File

@@ -24,7 +24,7 @@ import (
revactx "github.com/opencloud-eu/reva/v2/pkg/ctx"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
cs3mocks "github.com/opencloud-eu/reva/v2/tests/cs3mocks/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc"
)

View File

@@ -10,7 +10,7 @@ import (
"time"
"github.com/CiscoM31/godata"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
"github.com/opencloud-eu/opencloud/services/graph/pkg/identity"

View File

@@ -27,7 +27,7 @@ import (
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
identitymocks "github.com/opencloud-eu/opencloud/services/graph/pkg/identity/mocks"
service "github.com/opencloud-eu/opencloud/services/graph/pkg/service/v0"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
type schoolList struct {

View File

@@ -11,7 +11,7 @@ import (
storageprovider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/go-chi/chi/v5"
"github.com/go-chi/render"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
revactx "github.com/opencloud-eu/reva/v2/pkg/ctx"

View File

@@ -26,7 +26,7 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/status"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
cs3mocks "github.com/opencloud-eu/reva/v2/tests/cs3mocks/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc"
)

View File

@@ -23,7 +23,7 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
"github.com/opencloud-eu/reva/v2/pkg/utils"
cs3mocks "github.com/opencloud-eu/reva/v2/tests/cs3mocks/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/pkg/errors"
"github.com/stretchr/testify/mock"
"github.com/tidwall/gjson"

View File

@@ -10,7 +10,7 @@ import (
"github.com/CiscoM31/godata"
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/go-chi/chi/v5"
"github.com/go-chi/render"

View File

@@ -26,7 +26,7 @@ import (
revactx "github.com/opencloud-eu/reva/v2/pkg/ctx"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
cs3mocks "github.com/opencloud-eu/reva/v2/tests/cs3mocks/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc"
)

View File

@@ -3,7 +3,7 @@ package svc
import (
"strings"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
// lessSpacesByLastModifiedDateTime reports whether the element i

View File

@@ -8,7 +8,7 @@ import (
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
cs3rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
"github.com/go-chi/render"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
revactx "github.com/opencloud-eu/reva/v2/pkg/ctx"

View File

@@ -25,7 +25,7 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/status"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
cs3mocks "github.com/opencloud-eu/reva/v2/tests/cs3mocks/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc"
)

View File

@@ -5,7 +5,7 @@ import (
rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
"github.com/go-chi/render"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
)

View File

@@ -31,7 +31,7 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/storagespace"
"github.com/opencloud-eu/reva/v2/pkg/utils"
cs3mocks "github.com/opencloud-eu/reva/v2/tests/cs3mocks/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/mock"
"google.golang.org/grpc"
)

View File

@@ -7,7 +7,7 @@ import (
collaboration "github.com/cs3org/go-cs3apis/cs3/sharing/collaboration/v1beta1"
ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1"
"github.com/go-chi/render"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
)

View File

@@ -32,7 +32,7 @@ import (
"github.com/opencloud-eu/opencloud/services/graph/pkg/errorcode"
identitymocks "github.com/opencloud-eu/opencloud/services/graph/pkg/identity/mocks"
service "github.com/opencloud-eu/opencloud/services/graph/pkg/service/v0"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
// "github.com/opencloud-eu/opencloud/services/graph/pkg/unifiedrole"
)

View File

@@ -13,7 +13,7 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/events"
"github.com/opencloud-eu/reva/v2/pkg/storagespace"
"github.com/opencloud-eu/reva/v2/pkg/tags"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"go-micro.dev/v4/metadata"
)

View File

@@ -30,7 +30,7 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/events"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/status"
"github.com/opencloud-eu/reva/v2/pkg/utils"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
// GetMe implements the Service interface.

View File

@@ -7,7 +7,7 @@ import (
"github.com/CiscoM31/godata"
settingsmsg "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/messages/settings/v0"
settingssvc "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/settings/v0"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
const (

View File

@@ -21,7 +21,7 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/status"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
cs3mocks "github.com/opencloud-eu/reva/v2/tests/cs3mocks/mocks"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/mock"
"go-micro.dev/v4/client"
"google.golang.org/grpc"

View File

@@ -15,7 +15,7 @@ import (
storageprovider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/opencloud-eu/reva/v2/pkg/storagespace"
"github.com/opencloud-eu/reva/v2/pkg/utils"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"golang.org/x/sync/errgroup"
"github.com/opencloud-eu/opencloud/pkg/log"

View File

@@ -11,7 +11,7 @@ import (
. "github.com/onsi/gomega"
rConversions "github.com/opencloud-eu/reva/v2/pkg/conversions"
"github.com/opencloud-eu/reva/v2/pkg/utils"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/opencloud-eu/reva/v2/pkg/storagespace"

View File

@@ -5,7 +5,7 @@ import (
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/opencloud-eu/reva/v2/pkg/conversions"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
// PermissionsToCS3ResourcePermissions converts the provided libregraph UnifiedRolePermissions to a cs3 ResourcePermissions

View File

@@ -7,7 +7,7 @@ import (
. "github.com/onsi/gomega"
"github.com/onsi/gomega/types"
cs3Conversions "github.com/opencloud-eu/reva/v2/pkg/conversions"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/pkg/conversions"
"github.com/opencloud-eu/opencloud/services/graph/pkg/unifiedrole"

View File

@@ -3,7 +3,7 @@ package unifiedrole
import (
"slices"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
type (

View File

@@ -4,7 +4,7 @@ import (
"testing"
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/services/graph/pkg/unifiedrole"
)

View File

@@ -5,7 +5,7 @@ import (
"slices"
"strings"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"google.golang.org/protobuf/proto"
"github.com/opencloud-eu/reva/v2/pkg/conversions"

View File

@@ -5,7 +5,7 @@ import (
"testing"
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"google.golang.org/protobuf/proto"
"github.com/opencloud-eu/opencloud/services/graph/pkg/unifiedrole"

View File

@@ -3,7 +3,7 @@ package unifiedrole_test
import (
"slices"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
func getRoleActions(definitions ...*libregraph.UnifiedRoleDefinition) []string {

View File

@@ -5,7 +5,7 @@ import (
"slices"
"github.com/go-playground/validator/v10"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/services/graph/pkg/unifiedrole"
)

View File

@@ -6,7 +6,7 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/pkg/conversions"
"github.com/opencloud-eu/opencloud/services/graph/pkg/unifiedrole"

View File

@@ -8,7 +8,7 @@ import (
"github.com/opencloud-eu/opencloud/pkg/keycloak"
"github.com/opencloud-eu/opencloud/pkg/log"
"github.com/opencloud-eu/opencloud/services/invitations/pkg/invitations"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
const (

View File

@@ -6,7 +6,7 @@ import (
context "context"
keycloak "github.com/opencloud-eu/opencloud/pkg/keycloak"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
mock "github.com/stretchr/testify/mock"
)

View File

@@ -1,6 +1,6 @@
package invitations
import libregraph "github.com/owncloud/libre-graph-api-go"
import libregraph "github.com/opencloud-eu/libre-graph-api-go"
// Invitation represents an invitation as per https://learn.microsoft.com/en-us/graph/api/resources/invitation?view=graph-rest-1.0
type Invitation struct {

View File

@@ -18,7 +18,7 @@ import (
revactx "github.com/opencloud-eu/reva/v2/pkg/ctx"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
utils "github.com/opencloud-eu/reva/v2/pkg/utils"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"go-micro.dev/v4/selector"
)

View File

@@ -4,7 +4,7 @@ import (
"strings"
"github.com/bbalet/stopwords"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
)
func init() {

View File

@@ -12,7 +12,7 @@ import (
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/google/go-tika/tika"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/opencloud-eu/opencloud/pkg/log"
"github.com/opencloud-eu/opencloud/services/search/pkg/config"

View File

@@ -12,7 +12,7 @@ import (
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"github.com/stretchr/testify/mock"
"github.com/opencloud-eu/opencloud/pkg/log"

View File

@@ -23,7 +23,7 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/errtypes"
"github.com/opencloud-eu/reva/v2/pkg/storagespace"
"github.com/opencloud-eu/reva/v2/pkg/utils"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"google.golang.org/protobuf/types/known/timestamppb"
searchMessage "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/messages/search/v0"

View File

@@ -9,7 +9,7 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/opencloud-eu/reva/v2/pkg/storagespace"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
searchmsg "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/messages/search/v0"
searchsvc "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/search/v0"

View File

@@ -21,7 +21,7 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/storage/utils/walker"
"github.com/opencloud-eu/reva/v2/pkg/storagespace"
"github.com/opencloud-eu/reva/v2/pkg/utils"
libregraph "github.com/owncloud/libre-graph-api-go"
libregraph "github.com/opencloud-eu/libre-graph-api-go"
"golang.org/x/sync/errgroup"
"google.golang.org/protobuf/types/known/fieldmaskpb"

View File

@@ -1,3 +1,4 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -186,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2023 ownCloud GmbH
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -198,4 +199,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.

View File

@@ -5,9 +5,9 @@ Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
- API version: v1.0.4
- API version: v1.0.5
- Package version: 1.0.0
- Generator version: 7.8.0
- Generator version: 7.13.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
## Installation
@@ -22,7 +22,7 @@ go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
```go
import libregraph "github.com/owncloud/libre-graph-api-go"
import libregraph "github.com/opencloud-eu/libre-graph-api-go"
```
To use a proxy, set the environment variable `HTTP_PROXY`:
@@ -74,7 +74,7 @@ ctx = context.WithValue(context.Background(), libregraph.ContextOperationServerV
## Documentation for API Endpoints
All URIs are relative to *https://ocis.ocis.rolling.owncloud.works/graph*
All URIs are relative to *https://localhost:9200/graph*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------

View File

@@ -3,7 +3,7 @@ Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.4
API version: v1.0.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@@ -18,13 +18,14 @@ import (
"net/url"
)
// ActivitiesApiService ActivitiesApi service
type ActivitiesApiService service
type ApiGetActivitiesRequest struct {
ctx context.Context
ctx context.Context
ApiService *ActivitiesApiService
kql *string
kql *string
}
func (r ApiGetActivitiesRequest) Kql(kql string) ApiGetActivitiesRequest {
@@ -39,25 +40,24 @@ func (r ApiGetActivitiesRequest) Execute() (*CollectionOfActivities, *http.Respo
/*
GetActivities Get activities
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetActivitiesRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetActivitiesRequest
*/
func (a *ActivitiesApiService) GetActivities(ctx context.Context) ApiGetActivitiesRequest {
return ApiGetActivitiesRequest{
ApiService: a,
ctx: ctx,
ctx: ctx,
}
}
// Execute executes the request
//
// @return CollectionOfActivities
// @return CollectionOfActivities
func (a *ActivitiesApiService) GetActivitiesExecute(r ApiGetActivitiesRequest) (*CollectionOfActivities, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfActivities
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfActivities
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActivitiesApiService.GetActivities")
@@ -113,14 +113,14 @@ func (a *ActivitiesApiService) GetActivitiesExecute(r ApiGetActivitiesRequest) (
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
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
}

View File

@@ -3,7 +3,7 @@ Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.4
API version: v1.0.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@@ -19,12 +19,13 @@ import (
"strings"
)
// ApplicationsApiService ApplicationsApi service
type ApplicationsApiService service
type ApiGetApplicationRequest struct {
ctx context.Context
ApiService *ApplicationsApiService
ctx context.Context
ApiService *ApplicationsApiService
applicationId string
}
@@ -35,27 +36,26 @@ func (r ApiGetApplicationRequest) Execute() (*Application, *http.Response, error
/*
GetApplication Get application by id
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param applicationId key: id of application
@return ApiGetApplicationRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param applicationId key: id of application
@return ApiGetApplicationRequest
*/
func (a *ApplicationsApiService) GetApplication(ctx context.Context, applicationId string) ApiGetApplicationRequest {
return ApiGetApplicationRequest{
ApiService: a,
ctx: ctx,
ApiService: a,
ctx: ctx,
applicationId: applicationId,
}
}
// Execute executes the request
//
// @return Application
// @return Application
func (a *ApplicationsApiService) GetApplicationExecute(r ApiGetApplicationRequest) (*Application, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Application
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Application
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsApiService.GetApplication")
@@ -109,14 +109,14 @@ func (a *ApplicationsApiService) GetApplicationExecute(r ApiGetApplicationReques
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
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
}
@@ -133,7 +133,7 @@ func (a *ApplicationsApiService) GetApplicationExecute(r ApiGetApplicationReques
}
type ApiListApplicationsRequest struct {
ctx context.Context
ctx context.Context
ApiService *ApplicationsApiService
}
@@ -144,25 +144,24 @@ func (r ApiListApplicationsRequest) Execute() (*CollectionOfApplications, *http.
/*
ListApplications Get all applications
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiListApplicationsRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiListApplicationsRequest
*/
func (a *ApplicationsApiService) ListApplications(ctx context.Context) ApiListApplicationsRequest {
return ApiListApplicationsRequest{
ApiService: a,
ctx: ctx,
ctx: ctx,
}
}
// Execute executes the request
//
// @return CollectionOfApplications
// @return CollectionOfApplications
func (a *ApplicationsApiService) ListApplicationsExecute(r ApiListApplicationsRequest) (*CollectionOfApplications, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfApplications
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfApplications
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsApiService.ListApplications")
@@ -215,14 +214,14 @@ func (a *ApplicationsApiService) ListApplicationsExecute(r ApiListApplicationsRe
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
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
}

View File

@@ -3,7 +3,7 @@ Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.4
API version: v1.0.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@@ -19,14 +19,15 @@ import (
"strings"
)
// DriveItemApiService DriveItemApi service
type DriveItemApiService service
type ApiDeleteDriveItemRequest struct {
ctx context.Context
ctx context.Context
ApiService *DriveItemApiService
driveId string
itemId string
driveId string
itemId string
}
func (r ApiDeleteDriveItemRequest) Execute() (*http.Response, error) {
@@ -42,26 +43,27 @@ Deleting items using this method moves the items to the recycle bin instead of p
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().
@param driveId key: id of drive
@param itemId key: id of item
@return ApiDeleteDriveItemRequest
@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,
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
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DriveItemApiService.DeleteDriveItem")
@@ -116,14 +118,14 @@ func (a *DriveItemApiService) DeleteDriveItemExecute(r ApiDeleteDriveItemRequest
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
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
}
@@ -131,10 +133,10 @@ func (a *DriveItemApiService) DeleteDriveItemExecute(r ApiDeleteDriveItemRequest
}
type ApiGetDriveItemRequest struct {
ctx context.Context
ctx context.Context
ApiService *DriveItemApiService
driveId string
itemId string
driveId string
itemId string
}
func (r ApiGetDriveItemRequest) Execute() (*DriveItem, *http.Response, error) {
@@ -146,29 +148,29 @@ GetDriveItem Get a DriveItem.
Get a DriveItem by using its ID.
@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 ApiGetDriveItemRequest
@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 ApiGetDriveItemRequest
*/
func (a *DriveItemApiService) GetDriveItem(ctx context.Context, driveId string, itemId string) ApiGetDriveItemRequest {
return ApiGetDriveItemRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
itemId: itemId,
ctx: ctx,
driveId: driveId,
itemId: itemId,
}
}
// Execute executes the request
//
// @return DriveItem
// @return DriveItem
func (a *DriveItemApiService) GetDriveItemExecute(r ApiGetDriveItemRequest) (*DriveItem, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *DriveItem
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *DriveItem
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DriveItemApiService.GetDriveItem")
@@ -223,14 +225,14 @@ func (a *DriveItemApiService) GetDriveItemExecute(r ApiGetDriveItemRequest) (*Dr
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
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
}
@@ -247,11 +249,11 @@ func (a *DriveItemApiService) GetDriveItemExecute(r ApiGetDriveItemRequest) (*Dr
}
type ApiUpdateDriveItemRequest struct {
ctx context.Context
ctx context.Context
ApiService *DriveItemApiService
driveId string
itemId string
driveItem *DriveItem
driveId string
itemId string
driveItem *DriveItem
}
// DriveItem properties to update
@@ -276,29 +278,29 @@ Currently it supports updating the following properties:
* `@UI.Hidden` - Hides the item from the UI.
@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 ApiUpdateDriveItemRequest
@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 ApiUpdateDriveItemRequest
*/
func (a *DriveItemApiService) UpdateDriveItem(ctx context.Context, driveId string, itemId string) ApiUpdateDriveItemRequest {
return ApiUpdateDriveItemRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
itemId: itemId,
ctx: ctx,
driveId: driveId,
itemId: itemId,
}
}
// Execute executes the request
//
// @return DriveItem
// @return DriveItem
func (a *DriveItemApiService) UpdateDriveItemExecute(r ApiUpdateDriveItemRequest) (*DriveItem, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *DriveItem
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *DriveItem
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DriveItemApiService.UpdateDriveItem")
@@ -358,14 +360,14 @@ func (a *DriveItemApiService) UpdateDriveItemExecute(r ApiUpdateDriveItemRequest
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
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
}

View File

@@ -3,7 +3,7 @@ Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.4
API version: v1.0.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@@ -19,13 +19,14 @@ import (
"strings"
)
// DrivesApiService DrivesApi service
type DrivesApiService service
type ApiCreateDriveRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesApiService
drive *Drive
drive *Drive
}
// New space property values
@@ -41,25 +42,24 @@ func (r ApiCreateDriveRequest) Execute() (*Drive, *http.Response, error) {
/*
CreateDrive Create a new drive of a specific type
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateDriveRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateDriveRequest
*/
func (a *DrivesApiService) CreateDrive(ctx context.Context) ApiCreateDriveRequest {
return ApiCreateDriveRequest{
ApiService: a,
ctx: ctx,
ctx: ctx,
}
}
// Execute executes the request
//
// @return Drive
// @return Drive
func (a *DrivesApiService) CreateDriveExecute(r ApiCreateDriveRequest) (*Drive, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Drive
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Drive
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesApiService.CreateDrive")
@@ -117,14 +117,14 @@ func (a *DrivesApiService) CreateDriveExecute(r ApiCreateDriveRequest) (*Drive,
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
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
}
@@ -141,10 +141,10 @@ func (a *DrivesApiService) CreateDriveExecute(r ApiCreateDriveRequest) (*Drive,
}
type ApiDeleteDriveRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesApiService
driveId string
ifMatch *string
driveId string
ifMatch *string
}
// ETag
@@ -160,24 +160,24 @@ func (r ApiDeleteDriveRequest) Execute() (*http.Response, error) {
/*
DeleteDrive Delete a specific space
@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 ApiDeleteDriveRequest
@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 ApiDeleteDriveRequest
*/
func (a *DrivesApiService) DeleteDrive(ctx context.Context, driveId string) ApiDeleteDriveRequest {
return ApiDeleteDriveRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
ctx: ctx,
driveId: driveId,
}
}
// Execute executes the request
func (a *DrivesApiService) DeleteDriveExecute(r ApiDeleteDriveRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesApiService.DeleteDrive")
@@ -234,14 +234,14 @@ func (a *DrivesApiService) DeleteDriveExecute(r ApiDeleteDriveRequest) (*http.Re
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
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
}
@@ -249,9 +249,9 @@ func (a *DrivesApiService) DeleteDriveExecute(r ApiDeleteDriveRequest) (*http.Re
}
type ApiGetDriveRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesApiService
driveId string
driveId string
}
func (r ApiGetDriveRequest) Execute() (*Drive, *http.Response, error) {
@@ -261,27 +261,26 @@ func (r ApiGetDriveRequest) Execute() (*Drive, *http.Response, error) {
/*
GetDrive Get drive by id
@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 ApiGetDriveRequest
@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 ApiGetDriveRequest
*/
func (a *DrivesApiService) GetDrive(ctx context.Context, driveId string) ApiGetDriveRequest {
return ApiGetDriveRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
ctx: ctx,
driveId: driveId,
}
}
// Execute executes the request
//
// @return Drive
// @return Drive
func (a *DrivesApiService) GetDriveExecute(r ApiGetDriveRequest) (*Drive, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Drive
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Drive
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesApiService.GetDrive")
@@ -335,14 +334,14 @@ func (a *DrivesApiService) GetDriveExecute(r ApiGetDriveRequest) (*Drive, *http.
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
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
}
@@ -359,9 +358,9 @@ func (a *DrivesApiService) GetDriveExecute(r ApiGetDriveRequest) (*Drive, *http.
}
type ApiUpdateDriveRequest struct {
ctx context.Context
ApiService *DrivesApiService
driveId string
ctx context.Context
ApiService *DrivesApiService
driveId string
driveUpdate *DriveUpdate
}
@@ -378,27 +377,26 @@ func (r ApiUpdateDriveRequest) Execute() (*Drive, *http.Response, error) {
/*
UpdateDrive Update the drive
@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 ApiUpdateDriveRequest
@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 ApiUpdateDriveRequest
*/
func (a *DrivesApiService) UpdateDrive(ctx context.Context, driveId string) ApiUpdateDriveRequest {
return ApiUpdateDriveRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
ctx: ctx,
driveId: driveId,
}
}
// Execute executes the request
//
// @return Drive
// @return Drive
func (a *DrivesApiService) UpdateDriveExecute(r ApiUpdateDriveRequest) (*Drive, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Drive
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Drive
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesApiService.UpdateDrive")
@@ -457,14 +455,14 @@ func (a *DrivesApiService) UpdateDriveExecute(r ApiUpdateDriveRequest) (*Drive,
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
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
}

View File

@@ -3,7 +3,7 @@ Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.4
API version: v1.0.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@@ -18,14 +18,15 @@ import (
"net/url"
)
// DrivesGetDrivesApiService DrivesGetDrivesApi service
type DrivesGetDrivesApiService service
type ApiListAllDrivesRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesGetDrivesApiService
orderby *string
filter *string
orderby *string
filter *string
}
// The $orderby system query option allows clients to request resources in either ascending order using asc or descending order using desc.
@@ -47,25 +48,24 @@ func (r ApiListAllDrivesRequest) Execute() (*CollectionOfDrives1, *http.Response
/*
ListAllDrives Get all available drives
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiListAllDrivesRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiListAllDrivesRequest
*/
func (a *DrivesGetDrivesApiService) ListAllDrives(ctx context.Context) ApiListAllDrivesRequest {
return ApiListAllDrivesRequest{
ApiService: a,
ctx: ctx,
ctx: ctx,
}
}
// Execute executes the request
//
// @return CollectionOfDrives1
// @return CollectionOfDrives1
func (a *DrivesGetDrivesApiService) ListAllDrivesExecute(r ApiListAllDrivesRequest) (*CollectionOfDrives1, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfDrives1
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfDrives1
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesGetDrivesApiService.ListAllDrives")
@@ -124,14 +124,14 @@ func (a *DrivesGetDrivesApiService) ListAllDrivesExecute(r ApiListAllDrivesReque
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
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
}
@@ -148,10 +148,10 @@ func (a *DrivesGetDrivesApiService) ListAllDrivesExecute(r ApiListAllDrivesReque
}
type ApiListAllDrivesBetaRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesGetDrivesApiService
orderby *string
filter *string
orderby *string
filter *string
}
// The $orderby system query option allows clients to request resources in either ascending order using asc or descending order using desc.
@@ -173,25 +173,24 @@ func (r ApiListAllDrivesBetaRequest) Execute() (*CollectionOfDrives1, *http.Resp
/*
ListAllDrivesBeta Alias for '/v1.0/drives', the difference is that grantedtoV2 is used and roles contain unified roles instead of cs3 roles
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiListAllDrivesBetaRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiListAllDrivesBetaRequest
*/
func (a *DrivesGetDrivesApiService) ListAllDrivesBeta(ctx context.Context) ApiListAllDrivesBetaRequest {
return ApiListAllDrivesBetaRequest{
ApiService: a,
ctx: ctx,
ctx: ctx,
}
}
// Execute executes the request
//
// @return CollectionOfDrives1
// @return CollectionOfDrives1
func (a *DrivesGetDrivesApiService) ListAllDrivesBetaExecute(r ApiListAllDrivesBetaRequest) (*CollectionOfDrives1, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfDrives1
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfDrives1
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesGetDrivesApiService.ListAllDrivesBeta")
@@ -250,14 +249,14 @@ func (a *DrivesGetDrivesApiService) ListAllDrivesBetaExecute(r ApiListAllDrivesB
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
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
}

View File

@@ -3,7 +3,7 @@ Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.4
API version: v1.0.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@@ -19,14 +19,15 @@ import (
"strings"
)
// DrivesPermissionsApiService DrivesPermissionsApi service
type DrivesPermissionsApiService service
type ApiCreateLinkRequest struct {
ctx context.Context
ApiService *DrivesPermissionsApiService
driveId string
itemId string
ctx context.Context
ApiService *DrivesPermissionsApiService
driveId string
itemId string
driveItemCreateLink *DriveItemCreateLink
}
@@ -59,29 +60,29 @@ For now, The following values are allowed for the type parameter.
| 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. |
@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 ApiCreateLinkRequest
@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 ApiCreateLinkRequest
*/
func (a *DrivesPermissionsApiService) CreateLink(ctx context.Context, driveId string, itemId string) ApiCreateLinkRequest {
return ApiCreateLinkRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
itemId: itemId,
ctx: ctx,
driveId: driveId,
itemId: itemId,
}
}
// Execute executes the request
//
// @return Permission
// @return Permission
func (a *DrivesPermissionsApiService) CreateLinkExecute(r ApiCreateLinkRequest) (*Permission, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesPermissionsApiService.CreateLink")
@@ -138,14 +139,14 @@ func (a *DrivesPermissionsApiService) CreateLinkExecute(r ApiCreateLinkRequest)
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
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
}
@@ -162,11 +163,11 @@ func (a *DrivesPermissionsApiService) CreateLinkExecute(r ApiCreateLinkRequest)
}
type ApiDeletePermissionRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesPermissionsApiService
driveId string
itemId string
permId string
driveId string
itemId string
permId string
}
func (r ApiDeletePermissionRequest) Execute() (*http.Response, error) {
@@ -180,28 +181,29 @@ Remove access to a DriveItem.
Only sharing permissions that are not inherited can be deleted. The `inheritedFrom` property must be `null`.
@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
@param permId key: id of permission
@return ApiDeletePermissionRequest
@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
@param permId key: id of permission
@return ApiDeletePermissionRequest
*/
func (a *DrivesPermissionsApiService) DeletePermission(ctx context.Context, driveId string, itemId string, permId string) ApiDeletePermissionRequest {
return ApiDeletePermissionRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
itemId: itemId,
permId: permId,
ctx: ctx,
driveId: driveId,
itemId: itemId,
permId: permId,
}
}
// Execute executes the request
func (a *DrivesPermissionsApiService) DeletePermissionExecute(r ApiDeletePermissionRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesPermissionsApiService.DeletePermission")
@@ -257,14 +259,14 @@ func (a *DrivesPermissionsApiService) DeletePermissionExecute(r ApiDeletePermiss
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
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
}
@@ -272,11 +274,11 @@ func (a *DrivesPermissionsApiService) DeletePermissionExecute(r ApiDeletePermiss
}
type ApiGetPermissionRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesPermissionsApiService
driveId string
itemId string
permId string
driveId string
itemId string
permId string
}
func (r ApiGetPermissionRequest) Execute() (*Permission, *http.Response, error) {
@@ -288,31 +290,31 @@ GetPermission Get sharing permission for a file or folder
Return the effective sharing permission for a particular permission resource.
@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
@param permId key: id of permission
@return ApiGetPermissionRequest
@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
@param permId key: id of permission
@return ApiGetPermissionRequest
*/
func (a *DrivesPermissionsApiService) GetPermission(ctx context.Context, driveId string, itemId string, permId string) ApiGetPermissionRequest {
return ApiGetPermissionRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
itemId: itemId,
permId: permId,
ctx: ctx,
driveId: driveId,
itemId: itemId,
permId: permId,
}
}
// Execute executes the request
//
// @return Permission
// @return Permission
func (a *DrivesPermissionsApiService) GetPermissionExecute(r ApiGetPermissionRequest) (*Permission, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesPermissionsApiService.GetPermission")
@@ -368,14 +370,14 @@ func (a *DrivesPermissionsApiService) GetPermissionExecute(r ApiGetPermissionReq
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
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
}
@@ -392,10 +394,10 @@ func (a *DrivesPermissionsApiService) GetPermissionExecute(r ApiGetPermissionReq
}
type ApiInviteRequest struct {
ctx context.Context
ApiService *DrivesPermissionsApiService
driveId string
itemId string
ctx context.Context
ApiService *DrivesPermissionsApiService
driveId string
itemId string
driveItemInvite *DriveItemInvite
}
@@ -420,29 +422,29 @@ The response will be a permission object with the grantedToV2 property containin
## Roles property values
For now, roles are only identified by a uuid. There are no hardcoded aliases like `read` or `write` because role actions can be completely customized.
@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 ApiInviteRequest
@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 ApiInviteRequest
*/
func (a *DrivesPermissionsApiService) Invite(ctx context.Context, driveId string, itemId string) ApiInviteRequest {
return ApiInviteRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
itemId: itemId,
ctx: ctx,
driveId: driveId,
itemId: itemId,
}
}
// Execute executes the request
//
// @return CollectionOfPermissions
// @return CollectionOfPermissions
func (a *DrivesPermissionsApiService) InviteExecute(r ApiInviteRequest) (*CollectionOfPermissions, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfPermissions
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfPermissions
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesPermissionsApiService.Invite")
@@ -506,18 +508,18 @@ func (a *DrivesPermissionsApiService) InviteExecute(r ApiInviteRequest) (*Collec
newErr.error = err.Error()
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
newErr.model = v
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
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
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
}
@@ -534,12 +536,12 @@ func (a *DrivesPermissionsApiService) InviteExecute(r ApiInviteRequest) (*Collec
}
type ApiListPermissionsRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesPermissionsApiService
driveId string
itemId string
filter *string
select_ *[]string
driveId string
itemId string
filter *string
select_ *[]string
}
// Filter items by property values. By default all permissions are returned and the avalable sharing roles are limited to normal users. To get a list of sharing roles applicable to federated users use the example $select query and combine it with $filter to omit the list of permissions.
@@ -571,29 +573,29 @@ All permission objects have an `id`. A permission representing
* a link has the `link` facet filled with details.
* a share has the `roles` property set and the `grantedToV2` property filled with the grant recipient details.
@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 ApiListPermissionsRequest
@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 ApiListPermissionsRequest
*/
func (a *DrivesPermissionsApiService) ListPermissions(ctx context.Context, driveId string, itemId string) ApiListPermissionsRequest {
return ApiListPermissionsRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
itemId: itemId,
ctx: ctx,
driveId: driveId,
itemId: itemId,
}
}
// Execute executes the request
//
// @return CollectionOfPermissionsWithAllowedValues
// @return CollectionOfPermissionsWithAllowedValues
func (a *DrivesPermissionsApiService) ListPermissionsExecute(r ApiListPermissionsRequest) (*CollectionOfPermissionsWithAllowedValues, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfPermissionsWithAllowedValues
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfPermissionsWithAllowedValues
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesPermissionsApiService.ListPermissions")
@@ -654,14 +656,14 @@ func (a *DrivesPermissionsApiService) ListPermissionsExecute(r ApiListPermission
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
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
}
@@ -678,11 +680,11 @@ func (a *DrivesPermissionsApiService) ListPermissionsExecute(r ApiListPermission
}
type ApiSetPermissionPasswordRequest struct {
ctx context.Context
ApiService *DrivesPermissionsApiService
driveId string
itemId string
permId string
ctx context.Context
ApiService *DrivesPermissionsApiService
driveId string
itemId string
permId string
sharingLinkPassword *SharingLinkPassword
}
@@ -703,31 +705,31 @@ Set the password of a sharing permission.
Only the `password` property can be modified this way.
@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
@param permId key: id of permission
@return ApiSetPermissionPasswordRequest
@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
@param permId key: id of permission
@return ApiSetPermissionPasswordRequest
*/
func (a *DrivesPermissionsApiService) SetPermissionPassword(ctx context.Context, driveId string, itemId string, permId string) ApiSetPermissionPasswordRequest {
return ApiSetPermissionPasswordRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
itemId: itemId,
permId: permId,
ctx: ctx,
driveId: driveId,
itemId: itemId,
permId: permId,
}
}
// Execute executes the request
//
// @return Permission
// @return Permission
func (a *DrivesPermissionsApiService) SetPermissionPasswordExecute(r ApiSetPermissionPasswordRequest) (*Permission, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesPermissionsApiService.SetPermissionPassword")
@@ -788,14 +790,14 @@ func (a *DrivesPermissionsApiService) SetPermissionPasswordExecute(r ApiSetPermi
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
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
}
@@ -812,11 +814,11 @@ func (a *DrivesPermissionsApiService) SetPermissionPasswordExecute(r ApiSetPermi
}
type ApiUpdatePermissionRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesPermissionsApiService
driveId string
itemId string
permId string
driveId string
itemId string
permId string
permission *Permission
}
@@ -837,31 +839,31 @@ Update the properties of a sharing permission by patching the permission resourc
Only the `roles`, `expirationDateTime` and `password` properties can be modified this way.
@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
@param permId key: id of permission
@return ApiUpdatePermissionRequest
@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
@param permId key: id of permission
@return ApiUpdatePermissionRequest
*/
func (a *DrivesPermissionsApiService) UpdatePermission(ctx context.Context, driveId string, itemId string, permId string) ApiUpdatePermissionRequest {
return ApiUpdatePermissionRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
itemId: itemId,
permId: permId,
ctx: ctx,
driveId: driveId,
itemId: itemId,
permId: permId,
}
}
// Execute executes the request
//
// @return Permission
// @return Permission
func (a *DrivesPermissionsApiService) UpdatePermissionExecute(r ApiUpdatePermissionRequest) (*Permission, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesPermissionsApiService.UpdatePermission")
@@ -922,14 +924,14 @@ func (a *DrivesPermissionsApiService) UpdatePermissionExecute(r ApiUpdatePermiss
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
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
}

View File

@@ -3,7 +3,7 @@ Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.4
API version: v1.0.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@@ -19,14 +19,15 @@ import (
"strings"
)
// DrivesRootApiService DrivesRootApi service
type DrivesRootApiService service
type ApiCreateDriveItemRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesRootApiService
driveId string
driveItem *DriveItem
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.
@@ -44,27 +45,27 @@ 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 `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().
@param driveId key: id of drive
@return ApiCreateDriveItemRequest
@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,
ctx: ctx,
driveId: driveId,
}
}
// Execute executes the request
//
// @return DriveItem
// @return DriveItem
func (a *DrivesRootApiService) CreateDriveItemExecute(r ApiCreateDriveItemRequest) (*DriveItem, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *DriveItem
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *DriveItem
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesRootApiService.CreateDriveItem")
@@ -120,14 +121,14 @@ func (a *DrivesRootApiService) CreateDriveItemExecute(r ApiCreateDriveItemReques
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
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
}
@@ -144,9 +145,9 @@ func (a *DrivesRootApiService) CreateDriveItemExecute(r ApiCreateDriveItemReques
}
type ApiCreateLinkSpaceRootRequest struct {
ctx context.Context
ApiService *DrivesRootApiService
driveId string
ctx context.Context
ApiService *DrivesRootApiService
driveId string
driveItemCreateLink *DriveItemCreateLink
}
@@ -179,27 +180,27 @@ For now, The following values are allowed for the type parameter.
| 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. |
@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 ApiCreateLinkSpaceRootRequest
@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 ApiCreateLinkSpaceRootRequest
*/
func (a *DrivesRootApiService) CreateLinkSpaceRoot(ctx context.Context, driveId string) ApiCreateLinkSpaceRootRequest {
return ApiCreateLinkSpaceRootRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
ctx: ctx,
driveId: driveId,
}
}
// Execute executes the request
//
// @return Permission
// @return Permission
func (a *DrivesRootApiService) CreateLinkSpaceRootExecute(r ApiCreateLinkSpaceRootRequest) (*Permission, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesRootApiService.CreateLinkSpaceRoot")
@@ -255,14 +256,14 @@ func (a *DrivesRootApiService) CreateLinkSpaceRootExecute(r ApiCreateLinkSpaceRo
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
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
}
@@ -279,10 +280,10 @@ func (a *DrivesRootApiService) CreateLinkSpaceRootExecute(r ApiCreateLinkSpaceRo
}
type ApiDeletePermissionSpaceRootRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesRootApiService
driveId string
permId string
driveId string
permId string
}
func (r ApiDeletePermissionSpaceRootRequest) Execute() (*http.Response, error) {
@@ -296,26 +297,27 @@ Remove access to the root item of a drive.
Only sharing permissions that are not inherited can be deleted. The `inheritedFrom` property must be `null`.
@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 permId key: id of permission
@return ApiDeletePermissionSpaceRootRequest
@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 permId key: id of permission
@return ApiDeletePermissionSpaceRootRequest
*/
func (a *DrivesRootApiService) DeletePermissionSpaceRoot(ctx context.Context, driveId string, permId string) ApiDeletePermissionSpaceRootRequest {
return ApiDeletePermissionSpaceRootRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
permId: permId,
ctx: ctx,
driveId: driveId,
permId: permId,
}
}
// Execute executes the request
func (a *DrivesRootApiService) DeletePermissionSpaceRootExecute(r ApiDeletePermissionSpaceRootRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesRootApiService.DeletePermissionSpaceRoot")
@@ -370,14 +372,14 @@ func (a *DrivesRootApiService) DeletePermissionSpaceRootExecute(r ApiDeletePermi
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
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
}
@@ -385,10 +387,10 @@ func (a *DrivesRootApiService) DeletePermissionSpaceRootExecute(r ApiDeletePermi
}
type ApiGetPermissionSpaceRootRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesRootApiService
driveId string
permId string
driveId string
permId string
}
func (r ApiGetPermissionSpaceRootRequest) Execute() (*Permission, *http.Response, error) {
@@ -400,29 +402,29 @@ GetPermissionSpaceRoot Get a single sharing permission for the root item of a dr
Return the effective sharing permission for a particular permission resource.
@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 permId key: id of permission
@return ApiGetPermissionSpaceRootRequest
@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 permId key: id of permission
@return ApiGetPermissionSpaceRootRequest
*/
func (a *DrivesRootApiService) GetPermissionSpaceRoot(ctx context.Context, driveId string, permId string) ApiGetPermissionSpaceRootRequest {
return ApiGetPermissionSpaceRootRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
permId: permId,
ctx: ctx,
driveId: driveId,
permId: permId,
}
}
// Execute executes the request
//
// @return Permission
// @return Permission
func (a *DrivesRootApiService) GetPermissionSpaceRootExecute(r ApiGetPermissionSpaceRootRequest) (*Permission, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesRootApiService.GetPermissionSpaceRoot")
@@ -477,14 +479,14 @@ func (a *DrivesRootApiService) GetPermissionSpaceRootExecute(r ApiGetPermissionS
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
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
}
@@ -501,9 +503,9 @@ func (a *DrivesRootApiService) GetPermissionSpaceRootExecute(r ApiGetPermissionS
}
type ApiGetRootRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesRootApiService
driveId string
driveId string
}
func (r ApiGetRootRequest) Execute() (*DriveItem, *http.Response, error) {
@@ -513,27 +515,26 @@ func (r ApiGetRootRequest) Execute() (*DriveItem, *http.Response, error) {
/*
GetRoot Get root from arbitrary space
@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 ApiGetRootRequest
@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 ApiGetRootRequest
*/
func (a *DrivesRootApiService) GetRoot(ctx context.Context, driveId string) ApiGetRootRequest {
return ApiGetRootRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
ctx: ctx,
driveId: driveId,
}
}
// Execute executes the request
//
// @return DriveItem
// @return DriveItem
func (a *DrivesRootApiService) GetRootExecute(r ApiGetRootRequest) (*DriveItem, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *DriveItem
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *DriveItem
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesRootApiService.GetRoot")
@@ -587,14 +588,14 @@ func (a *DrivesRootApiService) GetRootExecute(r ApiGetRootRequest) (*DriveItem,
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
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
}
@@ -611,9 +612,9 @@ func (a *DrivesRootApiService) GetRootExecute(r ApiGetRootRequest) (*DriveItem,
}
type ApiInviteSpaceRootRequest struct {
ctx context.Context
ApiService *DrivesRootApiService
driveId string
ctx context.Context
ApiService *DrivesRootApiService
driveId string
driveItemInvite *DriveItemInvite
}
@@ -638,27 +639,27 @@ The response will be a permission object with the grantedToV2 property containin
## Roles property values
For now, roles are only identified by a uuid. There are no hardcoded aliases like `read` or `write` because role actions can be completely customized.
@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 ApiInviteSpaceRootRequest
@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 ApiInviteSpaceRootRequest
*/
func (a *DrivesRootApiService) InviteSpaceRoot(ctx context.Context, driveId string) ApiInviteSpaceRootRequest {
return ApiInviteSpaceRootRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
ctx: ctx,
driveId: driveId,
}
}
// Execute executes the request
//
// @return CollectionOfPermissions
// @return CollectionOfPermissions
func (a *DrivesRootApiService) InviteSpaceRootExecute(r ApiInviteSpaceRootRequest) (*CollectionOfPermissions, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfPermissions
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfPermissions
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesRootApiService.InviteSpaceRoot")
@@ -721,18 +722,18 @@ func (a *DrivesRootApiService) InviteSpaceRootExecute(r ApiInviteSpaceRootReques
newErr.error = err.Error()
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
newErr.model = v
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
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
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
}
@@ -749,11 +750,11 @@ func (a *DrivesRootApiService) InviteSpaceRootExecute(r ApiInviteSpaceRootReques
}
type ApiListPermissionsSpaceRootRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesRootApiService
driveId string
filter *string
select_ *[]string
driveId string
filter *string
select_ *[]string
}
// Filter items by property values. By default all permissions are returned and the avalable sharing roles are limited to normal users. To get a list of sharing roles applicable to federated users use the example $select query and combine it with $filter to omit the list of permissions.
@@ -785,27 +786,27 @@ All permission objects have an `id`. A permission representing
* a link has the `link` facet filled with details.
* a share has the `roles` property set and the `grantedToV2` property filled with the grant recipient details.
@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 ApiListPermissionsSpaceRootRequest
@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 ApiListPermissionsSpaceRootRequest
*/
func (a *DrivesRootApiService) ListPermissionsSpaceRoot(ctx context.Context, driveId string) ApiListPermissionsSpaceRootRequest {
return ApiListPermissionsSpaceRootRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
ctx: ctx,
driveId: driveId,
}
}
// Execute executes the request
//
// @return CollectionOfPermissionsWithAllowedValues
// @return CollectionOfPermissionsWithAllowedValues
func (a *DrivesRootApiService) ListPermissionsSpaceRootExecute(r ApiListPermissionsSpaceRootRequest) (*CollectionOfPermissionsWithAllowedValues, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfPermissionsWithAllowedValues
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfPermissionsWithAllowedValues
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesRootApiService.ListPermissionsSpaceRoot")
@@ -865,14 +866,14 @@ func (a *DrivesRootApiService) ListPermissionsSpaceRootExecute(r ApiListPermissi
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
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
}
@@ -889,10 +890,10 @@ func (a *DrivesRootApiService) ListPermissionsSpaceRootExecute(r ApiListPermissi
}
type ApiSetPermissionPasswordSpaceRootRequest struct {
ctx context.Context
ApiService *DrivesRootApiService
driveId string
permId string
ctx context.Context
ApiService *DrivesRootApiService
driveId string
permId string
sharingLinkPassword *SharingLinkPassword
}
@@ -913,29 +914,29 @@ Set the password of a sharing permission.
Only the `password` property can be modified this way.
@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 permId key: id of permission
@return ApiSetPermissionPasswordSpaceRootRequest
@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 permId key: id of permission
@return ApiSetPermissionPasswordSpaceRootRequest
*/
func (a *DrivesRootApiService) SetPermissionPasswordSpaceRoot(ctx context.Context, driveId string, permId string) ApiSetPermissionPasswordSpaceRootRequest {
return ApiSetPermissionPasswordSpaceRootRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
permId: permId,
ctx: ctx,
driveId: driveId,
permId: permId,
}
}
// Execute executes the request
//
// @return Permission
// @return Permission
func (a *DrivesRootApiService) SetPermissionPasswordSpaceRootExecute(r ApiSetPermissionPasswordSpaceRootRequest) (*Permission, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesRootApiService.SetPermissionPasswordSpaceRoot")
@@ -995,14 +996,14 @@ func (a *DrivesRootApiService) SetPermissionPasswordSpaceRootExecute(r ApiSetPer
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
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
}
@@ -1019,10 +1020,10 @@ func (a *DrivesRootApiService) SetPermissionPasswordSpaceRootExecute(r ApiSetPer
}
type ApiUpdatePermissionSpaceRootRequest struct {
ctx context.Context
ctx context.Context
ApiService *DrivesRootApiService
driveId string
permId string
driveId string
permId string
permission *Permission
}
@@ -1043,29 +1044,29 @@ Update the properties of a sharing permission by patching the permission resourc
Only the `roles`, `expirationDateTime` and `password` properties can be modified this way.
@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 permId key: id of permission
@return ApiUpdatePermissionSpaceRootRequest
@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 permId key: id of permission
@return ApiUpdatePermissionSpaceRootRequest
*/
func (a *DrivesRootApiService) UpdatePermissionSpaceRoot(ctx context.Context, driveId string, permId string) ApiUpdatePermissionSpaceRootRequest {
return ApiUpdatePermissionSpaceRootRequest{
ApiService: a,
ctx: ctx,
driveId: driveId,
permId: permId,
ctx: ctx,
driveId: driveId,
permId: permId,
}
}
// Execute executes the request
//
// @return Permission
// @return Permission
func (a *DrivesRootApiService) UpdatePermissionSpaceRootExecute(r ApiUpdatePermissionSpaceRootRequest) (*Permission, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Permission
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesRootApiService.UpdatePermissionSpaceRoot")
@@ -1125,14 +1126,14 @@ func (a *DrivesRootApiService) UpdatePermissionSpaceRootExecute(r ApiUpdatePermi
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
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
}

View File

@@ -3,7 +3,7 @@ Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.4
API version: v1.0.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@@ -19,13 +19,14 @@ import (
"strings"
)
// EducationClassApiService EducationClassApi service
type EducationClassApiService service
type ApiAddUserToClassRequest struct {
ctx context.Context
ApiService *EducationClassApiService
classId string
ctx context.Context
ApiService *EducationClassApiService
classId string
classMemberReference *ClassMemberReference
}
@@ -42,24 +43,24 @@ func (r ApiAddUserToClassRequest) Execute() (*http.Response, error) {
/*
AddUserToClass Assign a user to a class
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@return ApiAddUserToClassRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@return ApiAddUserToClassRequest
*/
func (a *EducationClassApiService) AddUserToClass(ctx context.Context, classId string) ApiAddUserToClassRequest {
return ApiAddUserToClassRequest{
ApiService: a,
ctx: ctx,
classId: classId,
ctx: ctx,
classId: classId,
}
}
// Execute executes the request
func (a *EducationClassApiService) AddUserToClassExecute(r ApiAddUserToClassRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationClassApiService.AddUserToClass")
@@ -118,14 +119,14 @@ func (a *EducationClassApiService) AddUserToClassExecute(r ApiAddUserToClassRequ
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
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
}
@@ -133,8 +134,8 @@ func (a *EducationClassApiService) AddUserToClassExecute(r ApiAddUserToClassRequ
}
type ApiCreateClassRequest struct {
ctx context.Context
ApiService *EducationClassApiService
ctx context.Context
ApiService *EducationClassApiService
educationClass *EducationClass
}
@@ -151,25 +152,24 @@ func (r ApiCreateClassRequest) Execute() (*EducationClass, *http.Response, error
/*
CreateClass Add new education class
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateClassRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateClassRequest
*/
func (a *EducationClassApiService) CreateClass(ctx context.Context) ApiCreateClassRequest {
return ApiCreateClassRequest{
ApiService: a,
ctx: ctx,
ctx: ctx,
}
}
// Execute executes the request
//
// @return EducationClass
// @return EducationClass
func (a *EducationClassApiService) CreateClassExecute(r ApiCreateClassRequest) (*EducationClass, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationClass
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationClass
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationClassApiService.CreateClass")
@@ -227,14 +227,14 @@ func (a *EducationClassApiService) CreateClassExecute(r ApiCreateClassRequest) (
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
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
}
@@ -251,9 +251,9 @@ func (a *EducationClassApiService) CreateClassExecute(r ApiCreateClassRequest) (
}
type ApiDeleteClassRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationClassApiService
classId string
classId string
}
func (r ApiDeleteClassRequest) Execute() (*http.Response, error) {
@@ -263,24 +263,24 @@ func (r ApiDeleteClassRequest) Execute() (*http.Response, error) {
/*
DeleteClass Delete education class
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@return ApiDeleteClassRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@return ApiDeleteClassRequest
*/
func (a *EducationClassApiService) DeleteClass(ctx context.Context, classId string) ApiDeleteClassRequest {
return ApiDeleteClassRequest{
ApiService: a,
ctx: ctx,
classId: classId,
ctx: ctx,
classId: classId,
}
}
// Execute executes the request
func (a *EducationClassApiService) DeleteClassExecute(r ApiDeleteClassRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationClassApiService.DeleteClass")
@@ -334,14 +334,14 @@ func (a *EducationClassApiService) DeleteClassExecute(r ApiDeleteClassRequest) (
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
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
}
@@ -349,10 +349,10 @@ func (a *EducationClassApiService) DeleteClassExecute(r ApiDeleteClassRequest) (
}
type ApiDeleteUserFromClassRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationClassApiService
classId string
userId string
classId string
userId string
}
func (r ApiDeleteUserFromClassRequest) Execute() (*http.Response, error) {
@@ -362,26 +362,26 @@ func (r ApiDeleteUserFromClassRequest) Execute() (*http.Response, error) {
/*
DeleteUserFromClass Unassign user from a class
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@param userId key: id or username of the user to unassign from class
@return ApiDeleteUserFromClassRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@param userId key: id or username of the user to unassign from class
@return ApiDeleteUserFromClassRequest
*/
func (a *EducationClassApiService) DeleteUserFromClass(ctx context.Context, classId string, userId string) ApiDeleteUserFromClassRequest {
return ApiDeleteUserFromClassRequest{
ApiService: a,
ctx: ctx,
classId: classId,
userId: userId,
ctx: ctx,
classId: classId,
userId: userId,
}
}
// Execute executes the request
func (a *EducationClassApiService) DeleteUserFromClassExecute(r ApiDeleteUserFromClassRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationClassApiService.DeleteUserFromClass")
@@ -436,14 +436,14 @@ func (a *EducationClassApiService) DeleteUserFromClassExecute(r ApiDeleteUserFro
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
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
}
@@ -451,9 +451,9 @@ func (a *EducationClassApiService) DeleteUserFromClassExecute(r ApiDeleteUserFro
}
type ApiGetClassRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationClassApiService
classId string
classId string
}
func (r ApiGetClassRequest) Execute() (*EducationClass, *http.Response, error) {
@@ -463,27 +463,26 @@ func (r ApiGetClassRequest) Execute() (*EducationClass, *http.Response, error) {
/*
GetClass Get class by key
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@return ApiGetClassRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@return ApiGetClassRequest
*/
func (a *EducationClassApiService) GetClass(ctx context.Context, classId string) ApiGetClassRequest {
return ApiGetClassRequest{
ApiService: a,
ctx: ctx,
classId: classId,
ctx: ctx,
classId: classId,
}
}
// Execute executes the request
//
// @return EducationClass
// @return EducationClass
func (a *EducationClassApiService) GetClassExecute(r ApiGetClassRequest) (*EducationClass, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationClass
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationClass
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationClassApiService.GetClass")
@@ -537,14 +536,14 @@ func (a *EducationClassApiService) GetClassExecute(r ApiGetClassRequest) (*Educa
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
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
}
@@ -561,9 +560,9 @@ func (a *EducationClassApiService) GetClassExecute(r ApiGetClassRequest) (*Educa
}
type ApiListClassMembersRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationClassApiService
classId string
classId string
}
func (r ApiListClassMembersRequest) Execute() (*CollectionOfEducationUser, *http.Response, error) {
@@ -573,27 +572,26 @@ func (r ApiListClassMembersRequest) Execute() (*CollectionOfEducationUser, *http
/*
ListClassMembers Get the educationClass resources owned by an educationSchool
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@return ApiListClassMembersRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@return ApiListClassMembersRequest
*/
func (a *EducationClassApiService) ListClassMembers(ctx context.Context, classId string) ApiListClassMembersRequest {
return ApiListClassMembersRequest{
ApiService: a,
ctx: ctx,
classId: classId,
ctx: ctx,
classId: classId,
}
}
// Execute executes the request
//
// @return CollectionOfEducationUser
// @return CollectionOfEducationUser
func (a *EducationClassApiService) ListClassMembersExecute(r ApiListClassMembersRequest) (*CollectionOfEducationUser, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfEducationUser
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfEducationUser
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationClassApiService.ListClassMembers")
@@ -647,14 +645,14 @@ func (a *EducationClassApiService) ListClassMembersExecute(r ApiListClassMembers
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
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
}
@@ -671,7 +669,7 @@ func (a *EducationClassApiService) ListClassMembersExecute(r ApiListClassMembers
}
type ApiListClassesRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationClassApiService
}
@@ -682,25 +680,24 @@ func (r ApiListClassesRequest) Execute() (*CollectionOfClass, *http.Response, er
/*
ListClasses list education classes
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiListClassesRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiListClassesRequest
*/
func (a *EducationClassApiService) ListClasses(ctx context.Context) ApiListClassesRequest {
return ApiListClassesRequest{
ApiService: a,
ctx: ctx,
ctx: ctx,
}
}
// Execute executes the request
//
// @return CollectionOfClass
// @return CollectionOfClass
func (a *EducationClassApiService) ListClassesExecute(r ApiListClassesRequest) (*CollectionOfClass, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfClass
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfClass
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationClassApiService.ListClasses")
@@ -753,14 +750,14 @@ func (a *EducationClassApiService) ListClassesExecute(r ApiListClassesRequest) (
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
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
}
@@ -777,9 +774,9 @@ func (a *EducationClassApiService) ListClassesExecute(r ApiListClassesRequest) (
}
type ApiUpdateClassRequest struct {
ctx context.Context
ApiService *EducationClassApiService
classId string
ctx context.Context
ApiService *EducationClassApiService
classId string
educationClass *EducationClass
}
@@ -796,27 +793,26 @@ func (r ApiUpdateClassRequest) Execute() (*EducationClass, *http.Response, error
/*
UpdateClass Update properties of a education class
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@return ApiUpdateClassRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@return ApiUpdateClassRequest
*/
func (a *EducationClassApiService) UpdateClass(ctx context.Context, classId string) ApiUpdateClassRequest {
return ApiUpdateClassRequest{
ApiService: a,
ctx: ctx,
classId: classId,
ctx: ctx,
classId: classId,
}
}
// Execute executes the request
//
// @return EducationClass
// @return EducationClass
func (a *EducationClassApiService) UpdateClassExecute(r ApiUpdateClassRequest) (*EducationClass, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationClass
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationClass
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationClassApiService.UpdateClass")
@@ -875,14 +871,14 @@ func (a *EducationClassApiService) UpdateClassExecute(r ApiUpdateClassRequest) (
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
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
}

View File

@@ -3,7 +3,7 @@ Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.4
API version: v1.0.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@@ -19,13 +19,14 @@ import (
"strings"
)
// EducationClassTeachersApiService EducationClassTeachersApi service
type EducationClassTeachersApiService service
type ApiAddTeacherToClassRequest struct {
ctx context.Context
ApiService *EducationClassTeachersApiService
classId string
ctx context.Context
ApiService *EducationClassTeachersApiService
classId string
classTeacherReference *ClassTeacherReference
}
@@ -42,24 +43,24 @@ func (r ApiAddTeacherToClassRequest) Execute() (*http.Response, error) {
/*
AddTeacherToClass Assign a teacher to a class
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@return ApiAddTeacherToClassRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@return ApiAddTeacherToClassRequest
*/
func (a *EducationClassTeachersApiService) AddTeacherToClass(ctx context.Context, classId string) ApiAddTeacherToClassRequest {
return ApiAddTeacherToClassRequest{
ApiService: a,
ctx: ctx,
classId: classId,
ctx: ctx,
classId: classId,
}
}
// Execute executes the request
func (a *EducationClassTeachersApiService) AddTeacherToClassExecute(r ApiAddTeacherToClassRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationClassTeachersApiService.AddTeacherToClass")
@@ -118,14 +119,14 @@ func (a *EducationClassTeachersApiService) AddTeacherToClassExecute(r ApiAddTeac
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
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
}
@@ -133,10 +134,10 @@ func (a *EducationClassTeachersApiService) AddTeacherToClassExecute(r ApiAddTeac
}
type ApiDeleteTeacherFromClassRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationClassTeachersApiService
classId string
userId string
classId string
userId string
}
func (r ApiDeleteTeacherFromClassRequest) Execute() (*http.Response, error) {
@@ -146,26 +147,26 @@ func (r ApiDeleteTeacherFromClassRequest) Execute() (*http.Response, error) {
/*
DeleteTeacherFromClass Unassign user as teacher of a class
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@param userId key: id or username of the user to unassign as teacher
@return ApiDeleteTeacherFromClassRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@param userId key: id or username of the user to unassign as teacher
@return ApiDeleteTeacherFromClassRequest
*/
func (a *EducationClassTeachersApiService) DeleteTeacherFromClass(ctx context.Context, classId string, userId string) ApiDeleteTeacherFromClassRequest {
return ApiDeleteTeacherFromClassRequest{
ApiService: a,
ctx: ctx,
classId: classId,
userId: userId,
ctx: ctx,
classId: classId,
userId: userId,
}
}
// Execute executes the request
func (a *EducationClassTeachersApiService) DeleteTeacherFromClassExecute(r ApiDeleteTeacherFromClassRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationClassTeachersApiService.DeleteTeacherFromClass")
@@ -220,14 +221,14 @@ func (a *EducationClassTeachersApiService) DeleteTeacherFromClassExecute(r ApiDe
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
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
}
@@ -235,9 +236,9 @@ func (a *EducationClassTeachersApiService) DeleteTeacherFromClassExecute(r ApiDe
}
type ApiGetTeachersRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationClassTeachersApiService
classId string
classId string
}
func (r ApiGetTeachersRequest) Execute() (*CollectionOfEducationUser, *http.Response, error) {
@@ -247,27 +248,26 @@ func (r ApiGetTeachersRequest) Execute() (*CollectionOfEducationUser, *http.Resp
/*
GetTeachers Get the teachers for a class
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@return ApiGetTeachersRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param classId key: id or externalId of class
@return ApiGetTeachersRequest
*/
func (a *EducationClassTeachersApiService) GetTeachers(ctx context.Context, classId string) ApiGetTeachersRequest {
return ApiGetTeachersRequest{
ApiService: a,
ctx: ctx,
classId: classId,
ctx: ctx,
classId: classId,
}
}
// Execute executes the request
//
// @return CollectionOfEducationUser
// @return CollectionOfEducationUser
func (a *EducationClassTeachersApiService) GetTeachersExecute(r ApiGetTeachersRequest) (*CollectionOfEducationUser, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfEducationUser
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfEducationUser
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationClassTeachersApiService.GetTeachers")
@@ -321,14 +321,14 @@ func (a *EducationClassTeachersApiService) GetTeachersExecute(r ApiGetTeachersRe
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
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
}

View File

@@ -3,7 +3,7 @@ Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.4
API version: v1.0.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@@ -19,13 +19,14 @@ import (
"strings"
)
// EducationSchoolApiService EducationSchoolApi service
type EducationSchoolApiService service
type ApiAddClassToSchoolRequest struct {
ctx context.Context
ApiService *EducationSchoolApiService
schoolId string
ctx context.Context
ApiService *EducationSchoolApiService
schoolId string
classReference *ClassReference
}
@@ -42,24 +43,24 @@ func (r ApiAddClassToSchoolRequest) Execute() (*http.Response, error) {
/*
AddClassToSchool Assign a class to a school
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@return ApiAddClassToSchoolRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@return ApiAddClassToSchoolRequest
*/
func (a *EducationSchoolApiService) AddClassToSchool(ctx context.Context, schoolId string) ApiAddClassToSchoolRequest {
return ApiAddClassToSchoolRequest{
ApiService: a,
ctx: ctx,
schoolId: schoolId,
ctx: ctx,
schoolId: schoolId,
}
}
// Execute executes the request
func (a *EducationSchoolApiService) AddClassToSchoolExecute(r ApiAddClassToSchoolRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationSchoolApiService.AddClassToSchool")
@@ -118,14 +119,14 @@ func (a *EducationSchoolApiService) AddClassToSchoolExecute(r ApiAddClassToSchoo
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
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
}
@@ -133,9 +134,9 @@ func (a *EducationSchoolApiService) AddClassToSchoolExecute(r ApiAddClassToSchoo
}
type ApiAddUserToSchoolRequest struct {
ctx context.Context
ApiService *EducationSchoolApiService
schoolId string
ctx context.Context
ApiService *EducationSchoolApiService
schoolId string
educationUserReference *EducationUserReference
}
@@ -152,24 +153,24 @@ func (r ApiAddUserToSchoolRequest) Execute() (*http.Response, error) {
/*
AddUserToSchool Assign a user to a school
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@return ApiAddUserToSchoolRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@return ApiAddUserToSchoolRequest
*/
func (a *EducationSchoolApiService) AddUserToSchool(ctx context.Context, schoolId string) ApiAddUserToSchoolRequest {
return ApiAddUserToSchoolRequest{
ApiService: a,
ctx: ctx,
schoolId: schoolId,
ctx: ctx,
schoolId: schoolId,
}
}
// Execute executes the request
func (a *EducationSchoolApiService) AddUserToSchoolExecute(r ApiAddUserToSchoolRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationSchoolApiService.AddUserToSchool")
@@ -228,14 +229,14 @@ func (a *EducationSchoolApiService) AddUserToSchoolExecute(r ApiAddUserToSchoolR
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
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
}
@@ -243,8 +244,8 @@ func (a *EducationSchoolApiService) AddUserToSchoolExecute(r ApiAddUserToSchoolR
}
type ApiCreateSchoolRequest struct {
ctx context.Context
ApiService *EducationSchoolApiService
ctx context.Context
ApiService *EducationSchoolApiService
educationSchool *EducationSchool
}
@@ -261,25 +262,24 @@ func (r ApiCreateSchoolRequest) Execute() (*EducationSchool, *http.Response, err
/*
CreateSchool Add new school
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateSchoolRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateSchoolRequest
*/
func (a *EducationSchoolApiService) CreateSchool(ctx context.Context) ApiCreateSchoolRequest {
return ApiCreateSchoolRequest{
ApiService: a,
ctx: ctx,
ctx: ctx,
}
}
// Execute executes the request
//
// @return EducationSchool
// @return EducationSchool
func (a *EducationSchoolApiService) CreateSchoolExecute(r ApiCreateSchoolRequest) (*EducationSchool, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationSchool
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationSchool
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationSchoolApiService.CreateSchool")
@@ -337,14 +337,14 @@ func (a *EducationSchoolApiService) CreateSchoolExecute(r ApiCreateSchoolRequest
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
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
}
@@ -361,10 +361,10 @@ func (a *EducationSchoolApiService) CreateSchoolExecute(r ApiCreateSchoolRequest
}
type ApiDeleteClassFromSchoolRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationSchoolApiService
schoolId string
classId string
schoolId string
classId string
}
func (r ApiDeleteClassFromSchoolRequest) Execute() (*http.Response, error) {
@@ -374,26 +374,26 @@ func (r ApiDeleteClassFromSchoolRequest) Execute() (*http.Response, error) {
/*
DeleteClassFromSchool Unassign class from a school
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@param classId key: id or externalId of the class to unassign from school
@return ApiDeleteClassFromSchoolRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@param classId key: id or externalId of the class to unassign from school
@return ApiDeleteClassFromSchoolRequest
*/
func (a *EducationSchoolApiService) DeleteClassFromSchool(ctx context.Context, schoolId string, classId string) ApiDeleteClassFromSchoolRequest {
return ApiDeleteClassFromSchoolRequest{
ApiService: a,
ctx: ctx,
schoolId: schoolId,
classId: classId,
ctx: ctx,
schoolId: schoolId,
classId: classId,
}
}
// Execute executes the request
func (a *EducationSchoolApiService) DeleteClassFromSchoolExecute(r ApiDeleteClassFromSchoolRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationSchoolApiService.DeleteClassFromSchool")
@@ -448,14 +448,14 @@ func (a *EducationSchoolApiService) DeleteClassFromSchoolExecute(r ApiDeleteClas
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
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
}
@@ -463,9 +463,9 @@ func (a *EducationSchoolApiService) DeleteClassFromSchoolExecute(r ApiDeleteClas
}
type ApiDeleteSchoolRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationSchoolApiService
schoolId string
schoolId string
}
func (r ApiDeleteSchoolRequest) Execute() (*http.Response, error) {
@@ -477,24 +477,24 @@ DeleteSchool Delete school
Deletes a school. A school can only be delete if it has the terminationDate property set. And if that termination Date is in the past.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@return ApiDeleteSchoolRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@return ApiDeleteSchoolRequest
*/
func (a *EducationSchoolApiService) DeleteSchool(ctx context.Context, schoolId string) ApiDeleteSchoolRequest {
return ApiDeleteSchoolRequest{
ApiService: a,
ctx: ctx,
schoolId: schoolId,
ctx: ctx,
schoolId: schoolId,
}
}
// Execute executes the request
func (a *EducationSchoolApiService) DeleteSchoolExecute(r ApiDeleteSchoolRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationSchoolApiService.DeleteSchool")
@@ -548,14 +548,14 @@ func (a *EducationSchoolApiService) DeleteSchoolExecute(r ApiDeleteSchoolRequest
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
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
}
@@ -563,10 +563,10 @@ func (a *EducationSchoolApiService) DeleteSchoolExecute(r ApiDeleteSchoolRequest
}
type ApiDeleteUserFromSchoolRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationSchoolApiService
schoolId string
userId string
schoolId string
userId string
}
func (r ApiDeleteUserFromSchoolRequest) Execute() (*http.Response, error) {
@@ -576,26 +576,26 @@ func (r ApiDeleteUserFromSchoolRequest) Execute() (*http.Response, error) {
/*
DeleteUserFromSchool Unassign user from a school
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@param userId key: id or username of the user to unassign from school
@return ApiDeleteUserFromSchoolRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@param userId key: id or username of the user to unassign from school
@return ApiDeleteUserFromSchoolRequest
*/
func (a *EducationSchoolApiService) DeleteUserFromSchool(ctx context.Context, schoolId string, userId string) ApiDeleteUserFromSchoolRequest {
return ApiDeleteUserFromSchoolRequest{
ApiService: a,
ctx: ctx,
schoolId: schoolId,
userId: userId,
ctx: ctx,
schoolId: schoolId,
userId: userId,
}
}
// Execute executes the request
func (a *EducationSchoolApiService) DeleteUserFromSchoolExecute(r ApiDeleteUserFromSchoolRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationSchoolApiService.DeleteUserFromSchool")
@@ -650,14 +650,14 @@ func (a *EducationSchoolApiService) DeleteUserFromSchoolExecute(r ApiDeleteUserF
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
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
}
@@ -665,9 +665,9 @@ func (a *EducationSchoolApiService) DeleteUserFromSchoolExecute(r ApiDeleteUserF
}
type ApiGetSchoolRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationSchoolApiService
schoolId string
schoolId string
}
func (r ApiGetSchoolRequest) Execute() (*EducationSchool, *http.Response, error) {
@@ -677,27 +677,26 @@ func (r ApiGetSchoolRequest) Execute() (*EducationSchool, *http.Response, error)
/*
GetSchool Get the properties of a specific school
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@return ApiGetSchoolRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@return ApiGetSchoolRequest
*/
func (a *EducationSchoolApiService) GetSchool(ctx context.Context, schoolId string) ApiGetSchoolRequest {
return ApiGetSchoolRequest{
ApiService: a,
ctx: ctx,
schoolId: schoolId,
ctx: ctx,
schoolId: schoolId,
}
}
// Execute executes the request
//
// @return EducationSchool
// @return EducationSchool
func (a *EducationSchoolApiService) GetSchoolExecute(r ApiGetSchoolRequest) (*EducationSchool, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationSchool
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationSchool
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationSchoolApiService.GetSchool")
@@ -751,14 +750,14 @@ func (a *EducationSchoolApiService) GetSchoolExecute(r ApiGetSchoolRequest) (*Ed
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
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
}
@@ -775,9 +774,9 @@ func (a *EducationSchoolApiService) GetSchoolExecute(r ApiGetSchoolRequest) (*Ed
}
type ApiListSchoolClassesRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationSchoolApiService
schoolId string
schoolId string
}
func (r ApiListSchoolClassesRequest) Execute() (*CollectionOfEducationClass, *http.Response, error) {
@@ -787,27 +786,26 @@ func (r ApiListSchoolClassesRequest) Execute() (*CollectionOfEducationClass, *ht
/*
ListSchoolClasses Get the educationClass resources owned by an educationSchool
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@return ApiListSchoolClassesRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@return ApiListSchoolClassesRequest
*/
func (a *EducationSchoolApiService) ListSchoolClasses(ctx context.Context, schoolId string) ApiListSchoolClassesRequest {
return ApiListSchoolClassesRequest{
ApiService: a,
ctx: ctx,
schoolId: schoolId,
ctx: ctx,
schoolId: schoolId,
}
}
// Execute executes the request
//
// @return CollectionOfEducationClass
// @return CollectionOfEducationClass
func (a *EducationSchoolApiService) ListSchoolClassesExecute(r ApiListSchoolClassesRequest) (*CollectionOfEducationClass, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfEducationClass
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfEducationClass
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationSchoolApiService.ListSchoolClasses")
@@ -861,14 +859,14 @@ func (a *EducationSchoolApiService) ListSchoolClassesExecute(r ApiListSchoolClas
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
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
}
@@ -885,9 +883,9 @@ func (a *EducationSchoolApiService) ListSchoolClassesExecute(r ApiListSchoolClas
}
type ApiListSchoolUsersRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationSchoolApiService
schoolId string
schoolId string
}
func (r ApiListSchoolUsersRequest) Execute() (*CollectionOfEducationUser, *http.Response, error) {
@@ -897,27 +895,26 @@ func (r ApiListSchoolUsersRequest) Execute() (*CollectionOfEducationUser, *http.
/*
ListSchoolUsers Get the educationUser resources associated with an educationSchool
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@return ApiListSchoolUsersRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@return ApiListSchoolUsersRequest
*/
func (a *EducationSchoolApiService) ListSchoolUsers(ctx context.Context, schoolId string) ApiListSchoolUsersRequest {
return ApiListSchoolUsersRequest{
ApiService: a,
ctx: ctx,
schoolId: schoolId,
ctx: ctx,
schoolId: schoolId,
}
}
// Execute executes the request
//
// @return CollectionOfEducationUser
// @return CollectionOfEducationUser
func (a *EducationSchoolApiService) ListSchoolUsersExecute(r ApiListSchoolUsersRequest) (*CollectionOfEducationUser, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfEducationUser
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfEducationUser
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationSchoolApiService.ListSchoolUsers")
@@ -971,14 +968,14 @@ func (a *EducationSchoolApiService) ListSchoolUsersExecute(r ApiListSchoolUsersR
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
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
}
@@ -995,7 +992,7 @@ func (a *EducationSchoolApiService) ListSchoolUsersExecute(r ApiListSchoolUsersR
}
type ApiListSchoolsRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationSchoolApiService
}
@@ -1006,25 +1003,24 @@ func (r ApiListSchoolsRequest) Execute() (*CollectionOfSchools, *http.Response,
/*
ListSchools Get a list of schools and their properties
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiListSchoolsRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiListSchoolsRequest
*/
func (a *EducationSchoolApiService) ListSchools(ctx context.Context) ApiListSchoolsRequest {
return ApiListSchoolsRequest{
ApiService: a,
ctx: ctx,
ctx: ctx,
}
}
// Execute executes the request
//
// @return CollectionOfSchools
// @return CollectionOfSchools
func (a *EducationSchoolApiService) ListSchoolsExecute(r ApiListSchoolsRequest) (*CollectionOfSchools, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfSchools
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfSchools
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationSchoolApiService.ListSchools")
@@ -1077,14 +1073,14 @@ func (a *EducationSchoolApiService) ListSchoolsExecute(r ApiListSchoolsRequest)
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
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
}
@@ -1101,9 +1097,9 @@ func (a *EducationSchoolApiService) ListSchoolsExecute(r ApiListSchoolsRequest)
}
type ApiUpdateSchoolRequest struct {
ctx context.Context
ApiService *EducationSchoolApiService
schoolId string
ctx context.Context
ApiService *EducationSchoolApiService
schoolId string
educationSchool *EducationSchool
}
@@ -1120,27 +1116,26 @@ func (r ApiUpdateSchoolRequest) Execute() (*EducationSchool, *http.Response, err
/*
UpdateSchool Update properties of a school
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@return ApiUpdateSchoolRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param schoolId key: id or schoolNumber of school
@return ApiUpdateSchoolRequest
*/
func (a *EducationSchoolApiService) UpdateSchool(ctx context.Context, schoolId string) ApiUpdateSchoolRequest {
return ApiUpdateSchoolRequest{
ApiService: a,
ctx: ctx,
schoolId: schoolId,
ctx: ctx,
schoolId: schoolId,
}
}
// Execute executes the request
//
// @return EducationSchool
// @return EducationSchool
func (a *EducationSchoolApiService) UpdateSchoolExecute(r ApiUpdateSchoolRequest) (*EducationSchool, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationSchool
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationSchool
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationSchoolApiService.UpdateSchool")
@@ -1199,14 +1194,14 @@ func (a *EducationSchoolApiService) UpdateSchoolExecute(r ApiUpdateSchoolRequest
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
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
}

View File

@@ -3,7 +3,7 @@ Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.4
API version: v1.0.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@@ -19,12 +19,13 @@ import (
"strings"
)
// EducationUserApiService EducationUserApi service
type EducationUserApiService service
type ApiCreateEducationUserRequest struct {
ctx context.Context
ApiService *EducationUserApiService
ctx context.Context
ApiService *EducationUserApiService
educationUser *EducationUser
}
@@ -41,25 +42,24 @@ func (r ApiCreateEducationUserRequest) Execute() (*EducationUser, *http.Response
/*
CreateEducationUser Add new education user
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateEducationUserRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateEducationUserRequest
*/
func (a *EducationUserApiService) CreateEducationUser(ctx context.Context) ApiCreateEducationUserRequest {
return ApiCreateEducationUserRequest{
ApiService: a,
ctx: ctx,
ctx: ctx,
}
}
// Execute executes the request
//
// @return EducationUser
// @return EducationUser
func (a *EducationUserApiService) CreateEducationUserExecute(r ApiCreateEducationUserRequest) (*EducationUser, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationUser
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationUser
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationUserApiService.CreateEducationUser")
@@ -117,14 +117,14 @@ func (a *EducationUserApiService) CreateEducationUserExecute(r ApiCreateEducatio
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
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
}
@@ -141,9 +141,9 @@ func (a *EducationUserApiService) CreateEducationUserExecute(r ApiCreateEducatio
}
type ApiDeleteEducationUserRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationUserApiService
userId string
userId string
}
func (r ApiDeleteEducationUserRequest) Execute() (*http.Response, error) {
@@ -153,24 +153,24 @@ func (r ApiDeleteEducationUserRequest) Execute() (*http.Response, error) {
/*
DeleteEducationUser Delete educationUser
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param userId key: id or username of user
@return ApiDeleteEducationUserRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param userId key: id or username of user
@return ApiDeleteEducationUserRequest
*/
func (a *EducationUserApiService) DeleteEducationUser(ctx context.Context, userId string) ApiDeleteEducationUserRequest {
return ApiDeleteEducationUserRequest{
ApiService: a,
ctx: ctx,
userId: userId,
ctx: ctx,
userId: userId,
}
}
// Execute executes the request
func (a *EducationUserApiService) DeleteEducationUserExecute(r ApiDeleteEducationUserRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationUserApiService.DeleteEducationUser")
@@ -224,14 +224,14 @@ func (a *EducationUserApiService) DeleteEducationUserExecute(r ApiDeleteEducatio
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
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
}
@@ -239,10 +239,10 @@ func (a *EducationUserApiService) DeleteEducationUserExecute(r ApiDeleteEducatio
}
type ApiGetEducationUserRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationUserApiService
userId string
expand *[]string
userId string
expand *[]string
}
// Expand related entities
@@ -258,27 +258,26 @@ func (r ApiGetEducationUserRequest) Execute() (*EducationUser, *http.Response, e
/*
GetEducationUser Get properties of educationUser
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param userId key: id or username of user
@return ApiGetEducationUserRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param userId key: id or username of user
@return ApiGetEducationUserRequest
*/
func (a *EducationUserApiService) GetEducationUser(ctx context.Context, userId string) ApiGetEducationUserRequest {
return ApiGetEducationUserRequest{
ApiService: a,
ctx: ctx,
userId: userId,
ctx: ctx,
userId: userId,
}
}
// Execute executes the request
//
// @return EducationUser
// @return EducationUser
func (a *EducationUserApiService) GetEducationUserExecute(r ApiGetEducationUserRequest) (*EducationUser, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationUser
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationUser
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationUserApiService.GetEducationUser")
@@ -335,14 +334,14 @@ func (a *EducationUserApiService) GetEducationUserExecute(r ApiGetEducationUserR
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
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
}
@@ -359,10 +358,10 @@ func (a *EducationUserApiService) GetEducationUserExecute(r ApiGetEducationUserR
}
type ApiListEducationUsersRequest struct {
ctx context.Context
ctx context.Context
ApiService *EducationUserApiService
orderby *[]string
expand *[]string
orderby *[]string
expand *[]string
}
// Order items by property values
@@ -384,25 +383,24 @@ func (r ApiListEducationUsersRequest) Execute() (*CollectionOfEducationUser, *ht
/*
ListEducationUsers Get entities from education users
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiListEducationUsersRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiListEducationUsersRequest
*/
func (a *EducationUserApiService) ListEducationUsers(ctx context.Context) ApiListEducationUsersRequest {
return ApiListEducationUsersRequest{
ApiService: a,
ctx: ctx,
ctx: ctx,
}
}
// Execute executes the request
//
// @return CollectionOfEducationUser
// @return CollectionOfEducationUser
func (a *EducationUserApiService) ListEducationUsersExecute(r ApiListEducationUsersRequest) (*CollectionOfEducationUser, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfEducationUser
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfEducationUser
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationUserApiService.ListEducationUsers")
@@ -461,14 +459,14 @@ func (a *EducationUserApiService) ListEducationUsersExecute(r ApiListEducationUs
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
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
}
@@ -485,9 +483,9 @@ func (a *EducationUserApiService) ListEducationUsersExecute(r ApiListEducationUs
}
type ApiUpdateEducationUserRequest struct {
ctx context.Context
ApiService *EducationUserApiService
userId string
ctx context.Context
ApiService *EducationUserApiService
userId string
educationUser *EducationUser
}
@@ -504,27 +502,26 @@ func (r ApiUpdateEducationUserRequest) Execute() (*EducationUser, *http.Response
/*
UpdateEducationUser Update properties of educationUser
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param userId key: id or username of user
@return ApiUpdateEducationUserRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param userId key: id or username of user
@return ApiUpdateEducationUserRequest
*/
func (a *EducationUserApiService) UpdateEducationUser(ctx context.Context, userId string) ApiUpdateEducationUserRequest {
return ApiUpdateEducationUserRequest{
ApiService: a,
ctx: ctx,
userId: userId,
ctx: ctx,
userId: userId,
}
}
// Execute executes the request
//
// @return EducationUser
// @return EducationUser
func (a *EducationUserApiService) UpdateEducationUserExecute(r ApiUpdateEducationUserRequest) (*EducationUser, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationUser
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *EducationUser
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EducationUserApiService.UpdateEducationUser")
@@ -583,14 +580,14 @@ func (a *EducationUserApiService) UpdateEducationUserExecute(r ApiUpdateEducatio
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
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
}

View File

@@ -3,7 +3,7 @@ Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.4
API version: v1.0.5
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
@@ -19,13 +19,14 @@ import (
"strings"
)
// GroupApiService GroupApi service
type GroupApiService service
type ApiAddMemberRequest struct {
ctx context.Context
ApiService *GroupApiService
groupId string
ctx context.Context
ApiService *GroupApiService
groupId string
memberReference *MemberReference
}
@@ -42,24 +43,24 @@ func (r ApiAddMemberRequest) Execute() (*http.Response, error) {
/*
AddMember Add a member to a group
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param groupId key: id of group
@return ApiAddMemberRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param groupId key: id of group
@return ApiAddMemberRequest
*/
func (a *GroupApiService) AddMember(ctx context.Context, groupId string) ApiAddMemberRequest {
return ApiAddMemberRequest{
ApiService: a,
ctx: ctx,
groupId: groupId,
ctx: ctx,
groupId: groupId,
}
}
// Execute executes the request
func (a *GroupApiService) AddMemberExecute(r ApiAddMemberRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.AddMember")
@@ -118,14 +119,14 @@ func (a *GroupApiService) AddMemberExecute(r ApiAddMemberRequest) (*http.Respons
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
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
}
@@ -133,10 +134,10 @@ func (a *GroupApiService) AddMemberExecute(r ApiAddMemberRequest) (*http.Respons
}
type ApiDeleteGroupRequest struct {
ctx context.Context
ctx context.Context
ApiService *GroupApiService
groupId string
ifMatch *string
groupId string
ifMatch *string
}
// ETag
@@ -152,24 +153,24 @@ func (r ApiDeleteGroupRequest) Execute() (*http.Response, error) {
/*
DeleteGroup Delete entity from groups
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param groupId key: id of group
@return ApiDeleteGroupRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param groupId key: id of group
@return ApiDeleteGroupRequest
*/
func (a *GroupApiService) DeleteGroup(ctx context.Context, groupId string) ApiDeleteGroupRequest {
return ApiDeleteGroupRequest{
ApiService: a,
ctx: ctx,
groupId: groupId,
ctx: ctx,
groupId: groupId,
}
}
// Execute executes the request
func (a *GroupApiService) DeleteGroupExecute(r ApiDeleteGroupRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.DeleteGroup")
@@ -226,14 +227,14 @@ func (a *GroupApiService) DeleteGroupExecute(r ApiDeleteGroupRequest) (*http.Res
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
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
}
@@ -241,11 +242,11 @@ func (a *GroupApiService) DeleteGroupExecute(r ApiDeleteGroupRequest) (*http.Res
}
type ApiDeleteMemberRequest struct {
ctx context.Context
ApiService *GroupApiService
groupId string
ctx context.Context
ApiService *GroupApiService
groupId string
directoryObjectId string
ifMatch *string
ifMatch *string
}
// ETag
@@ -261,16 +262,16 @@ func (r ApiDeleteMemberRequest) Execute() (*http.Response, error) {
/*
DeleteMember Delete member from a group
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param groupId key: id of group
@param directoryObjectId key: id of group member to remove
@return ApiDeleteMemberRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param groupId key: id of group
@param directoryObjectId key: id of group member to remove
@return ApiDeleteMemberRequest
*/
func (a *GroupApiService) DeleteMember(ctx context.Context, groupId string, directoryObjectId string) ApiDeleteMemberRequest {
return ApiDeleteMemberRequest{
ApiService: a,
ctx: ctx,
groupId: groupId,
ApiService: a,
ctx: ctx,
groupId: groupId,
directoryObjectId: directoryObjectId,
}
}
@@ -278,9 +279,9 @@ func (a *GroupApiService) DeleteMember(ctx context.Context, groupId string, dire
// Execute executes the request
func (a *GroupApiService) DeleteMemberExecute(r ApiDeleteMemberRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.DeleteMember")
@@ -338,14 +339,14 @@ func (a *GroupApiService) DeleteMemberExecute(r ApiDeleteMemberRequest) (*http.R
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
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
}
@@ -353,11 +354,11 @@ func (a *GroupApiService) DeleteMemberExecute(r ApiDeleteMemberRequest) (*http.R
}
type ApiGetGroupRequest struct {
ctx context.Context
ctx context.Context
ApiService *GroupApiService
groupId string
select_ *[]string
expand *[]string
groupId string
select_ *[]string
expand *[]string
}
// Select properties to be returned
@@ -379,27 +380,26 @@ func (r ApiGetGroupRequest) Execute() (*Group, *http.Response, error) {
/*
GetGroup Get entity from groups by key
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param groupId key: id or name of group
@return ApiGetGroupRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param groupId key: id or name of group
@return ApiGetGroupRequest
*/
func (a *GroupApiService) GetGroup(ctx context.Context, groupId string) ApiGetGroupRequest {
return ApiGetGroupRequest{
ApiService: a,
ctx: ctx,
groupId: groupId,
ctx: ctx,
groupId: groupId,
}
}
// Execute executes the request
//
// @return Group
// @return Group
func (a *GroupApiService) GetGroupExecute(r ApiGetGroupRequest) (*Group, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Group
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Group
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.GetGroup")
@@ -459,14 +459,14 @@ func (a *GroupApiService) GetGroupExecute(r ApiGetGroupRequest) (*Group, *http.R
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
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
}
@@ -483,9 +483,9 @@ func (a *GroupApiService) GetGroupExecute(r ApiGetGroupRequest) (*Group, *http.R
}
type ApiListMembersRequest struct {
ctx context.Context
ctx context.Context
ApiService *GroupApiService
groupId string
groupId string
}
func (r ApiListMembersRequest) Execute() (*CollectionOfUsers, *http.Response, error) {
@@ -495,27 +495,26 @@ func (r ApiListMembersRequest) Execute() (*CollectionOfUsers, *http.Response, er
/*
ListMembers Get a list of the group's direct members
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param groupId key: id or name of group
@return ApiListMembersRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param groupId key: id or name of group
@return ApiListMembersRequest
*/
func (a *GroupApiService) ListMembers(ctx context.Context, groupId string) ApiListMembersRequest {
return ApiListMembersRequest{
ApiService: a,
ctx: ctx,
groupId: groupId,
ctx: ctx,
groupId: groupId,
}
}
// Execute executes the request
//
// @return CollectionOfUsers
// @return CollectionOfUsers
func (a *GroupApiService) ListMembersExecute(r ApiListMembersRequest) (*CollectionOfUsers, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfUsers
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *CollectionOfUsers
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.ListMembers")
@@ -569,14 +568,14 @@ func (a *GroupApiService) ListMembersExecute(r ApiListMembersRequest) (*Collecti
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
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
}
@@ -593,10 +592,10 @@ func (a *GroupApiService) ListMembersExecute(r ApiListMembersRequest) (*Collecti
}
type ApiUpdateGroupRequest struct {
ctx context.Context
ctx context.Context
ApiService *GroupApiService
groupId string
group *Group
groupId string
group *Group
}
// New property values
@@ -612,24 +611,24 @@ func (r ApiUpdateGroupRequest) Execute() (*http.Response, error) {
/*
UpdateGroup Update entity in groups
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param groupId key: id of group
@return ApiUpdateGroupRequest
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param groupId key: id of group
@return ApiUpdateGroupRequest
*/
func (a *GroupApiService) UpdateGroup(ctx context.Context, groupId string) ApiUpdateGroupRequest {
return ApiUpdateGroupRequest{
ApiService: a,
ctx: ctx,
groupId: groupId,
ctx: ctx,
groupId: groupId,
}
}
// Execute executes the request
func (a *GroupApiService) UpdateGroupExecute(r ApiUpdateGroupRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.UpdateGroup")
@@ -688,14 +687,14 @@ func (a *GroupApiService) UpdateGroupExecute(r ApiUpdateGroupRequest) (*http.Res
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
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
}

Some files were not shown because too many files have changed in this diff Show More