From 9785edd26366be8eb11c2435f50f90a5c8eea7fc Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 8 Mar 2020 17:08:18 +0100 Subject: Remove replace directives and use own fork to make go get work again (#1028) See https://github.com/golang/go/issues/30354 go get doesn't honor the go.mod replace options. --- .../ManagedDeviceMobileAppConfigurationRequest.go | 341 +++++++++++++++++++++ 1 file changed, 341 insertions(+) create mode 100644 vendor/github.com/matterbridge/msgraph.go/beta/ManagedDeviceMobileAppConfigurationRequest.go (limited to 'vendor/github.com/matterbridge/msgraph.go/beta/ManagedDeviceMobileAppConfigurationRequest.go') diff --git a/vendor/github.com/matterbridge/msgraph.go/beta/ManagedDeviceMobileAppConfigurationRequest.go b/vendor/github.com/matterbridge/msgraph.go/beta/ManagedDeviceMobileAppConfigurationRequest.go new file mode 100644 index 00000000..f4997a98 --- /dev/null +++ b/vendor/github.com/matterbridge/msgraph.go/beta/ManagedDeviceMobileAppConfigurationRequest.go @@ -0,0 +1,341 @@ +// Code generated by msgraph-generate.go DO NOT EDIT. + +package msgraph + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + + "github.com/matterbridge/msgraph.go/jsonx" +) + +// ManagedDeviceMobileAppConfigurationRequestBuilder is request builder for ManagedDeviceMobileAppConfiguration +type ManagedDeviceMobileAppConfigurationRequestBuilder struct{ BaseRequestBuilder } + +// Request returns ManagedDeviceMobileAppConfigurationRequest +func (b *ManagedDeviceMobileAppConfigurationRequestBuilder) Request() *ManagedDeviceMobileAppConfigurationRequest { + return &ManagedDeviceMobileAppConfigurationRequest{ + BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, + } +} + +// ManagedDeviceMobileAppConfigurationRequest is request for ManagedDeviceMobileAppConfiguration +type ManagedDeviceMobileAppConfigurationRequest struct{ BaseRequest } + +// Get performs GET request for ManagedDeviceMobileAppConfiguration +func (r *ManagedDeviceMobileAppConfigurationRequest) Get(ctx context.Context) (resObj *ManagedDeviceMobileAppConfiguration, err error) { + var query string + if r.query != nil { + query = "?" + r.query.Encode() + } + err = r.JSONRequest(ctx, "GET", query, nil, &resObj) + return +} + +// Update performs PATCH request for ManagedDeviceMobileAppConfiguration +func (r *ManagedDeviceMobileAppConfigurationRequest) Update(ctx context.Context, reqObj *ManagedDeviceMobileAppConfiguration) error { + return r.JSONRequest(ctx, "PATCH", "", reqObj, nil) +} + +// Delete performs DELETE request for ManagedDeviceMobileAppConfiguration +func (r *ManagedDeviceMobileAppConfigurationRequest) Delete(ctx context.Context) error { + return r.JSONRequest(ctx, "DELETE", "", nil, nil) +} + +// Assignments returns request builder for ManagedDeviceMobileAppConfigurationAssignment collection +func (b *ManagedDeviceMobileAppConfigurationRequestBuilder) Assignments() *ManagedDeviceMobileAppConfigurationAssignmentsCollectionRequestBuilder { + bb := &ManagedDeviceMobileAppConfigurationAssignmentsCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} + bb.baseURL += "/assignments" + return bb +} + +// ManagedDeviceMobileAppConfigurationAssignmentsCollectionRequestBuilder is request builder for ManagedDeviceMobileAppConfigurationAssignment collection +type ManagedDeviceMobileAppConfigurationAssignmentsCollectionRequestBuilder struct{ BaseRequestBuilder } + +// Request returns request for ManagedDeviceMobileAppConfigurationAssignment collection +func (b *ManagedDeviceMobileAppConfigurationAssignmentsCollectionRequestBuilder) Request() *ManagedDeviceMobileAppConfigurationAssignmentsCollectionRequest { + return &ManagedDeviceMobileAppConfigurationAssignmentsCollectionRequest{ + BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, + } +} + +// ID returns request builder for ManagedDeviceMobileAppConfigurationAssignment item +func (b *ManagedDeviceMobileAppConfigurationAssignmentsCollectionRequestBuilder) ID(id string) *ManagedDeviceMobileAppConfigurationAssignmentRequestBuilder { + bb := &ManagedDeviceMobileAppConfigurationAssignmentRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} + bb.baseURL += "/" + id + return bb +} + +// ManagedDeviceMobileAppConfigurationAssignmentsCollectionRequest is request for ManagedDeviceMobileAppConfigurationAssignment collection +type ManagedDeviceMobileAppConfigurationAssignmentsCollectionRequest struct{ BaseRequest } + +// Paging perfoms paging operation for ManagedDeviceMobileAppConfigurationAssignment collection +func (r *ManagedDeviceMobileAppConfigurationAssignmentsCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}) ([]ManagedDeviceMobileAppConfigurationAssignment, error) { + req, err := r.NewJSONRequest(method, path, obj) + if err != nil { + return nil, err + } + if ctx != nil { + req = req.WithContext(ctx) + } + res, err := r.client.Do(req) + if err != nil { + return nil, err + } + var values []ManagedDeviceMobileAppConfigurationAssignment + for { + defer res.Body.Close() + if res.StatusCode != http.StatusOK { + b, _ := ioutil.ReadAll(res.Body) + errRes := &ErrorResponse{Response: res} + err := jsonx.Unmarshal(b, errRes) + if err != nil { + return nil, fmt.Errorf("%s: %s", res.Status, string(b)) + } + return nil, errRes + } + var ( + paging Paging + value []ManagedDeviceMobileAppConfigurationAssignment + ) + err := jsonx.NewDecoder(res.Body).Decode(&paging) + if err != nil { + return nil, err + } + err = jsonx.Unmarshal(paging.Value, &value) + if err != nil { + return nil, err + } + values = append(values, value...) + if len(paging.NextLink) == 0 { + return values, nil + } + req, err = http.NewRequest("GET", paging.NextLink, nil) + if ctx != nil { + req = req.WithContext(ctx) + } + res, err = r.client.Do(req) + if err != nil { + return nil, err + } + } +} + +// Get performs GET request for ManagedDeviceMobileAppConfigurationAssignment collection +func (r *ManagedDeviceMobileAppConfigurationAssignmentsCollectionRequest) Get(ctx context.Context) ([]ManagedDeviceMobileAppConfigurationAssignment, error) { + var query string + if r.query != nil { + query = "?" + r.query.Encode() + } + return r.Paging(ctx, "GET", query, nil) +} + +// Add performs POST request for ManagedDeviceMobileAppConfigurationAssignment collection +func (r *ManagedDeviceMobileAppConfigurationAssignmentsCollectionRequest) Add(ctx context.Context, reqObj *ManagedDeviceMobileAppConfigurationAssignment) (resObj *ManagedDeviceMobileAppConfigurationAssignment, err error) { + err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) + return +} + +// DeviceStatusSummary is navigation property +func (b *ManagedDeviceMobileAppConfigurationRequestBuilder) DeviceStatusSummary() *ManagedDeviceMobileAppConfigurationDeviceSummaryRequestBuilder { + bb := &ManagedDeviceMobileAppConfigurationDeviceSummaryRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} + bb.baseURL += "/deviceStatusSummary" + return bb +} + +// DeviceStatuses returns request builder for ManagedDeviceMobileAppConfigurationDeviceStatus collection +func (b *ManagedDeviceMobileAppConfigurationRequestBuilder) DeviceStatuses() *ManagedDeviceMobileAppConfigurationDeviceStatusesCollectionRequestBuilder { + bb := &ManagedDeviceMobileAppConfigurationDeviceStatusesCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} + bb.baseURL += "/deviceStatuses" + return bb +} + +// ManagedDeviceMobileAppConfigurationDeviceStatusesCollectionRequestBuilder is request builder for ManagedDeviceMobileAppConfigurationDeviceStatus collection +type ManagedDeviceMobileAppConfigurationDeviceStatusesCollectionRequestBuilder struct{ BaseRequestBuilder } + +// Request returns request for ManagedDeviceMobileAppConfigurationDeviceStatus collection +func (b *ManagedDeviceMobileAppConfigurationDeviceStatusesCollectionRequestBuilder) Request() *ManagedDeviceMobileAppConfigurationDeviceStatusesCollectionRequest { + return &ManagedDeviceMobileAppConfigurationDeviceStatusesCollectionRequest{ + BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, + } +} + +// ID returns request builder for ManagedDeviceMobileAppConfigurationDeviceStatus item +func (b *ManagedDeviceMobileAppConfigurationDeviceStatusesCollectionRequestBuilder) ID(id string) *ManagedDeviceMobileAppConfigurationDeviceStatusRequestBuilder { + bb := &ManagedDeviceMobileAppConfigurationDeviceStatusRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} + bb.baseURL += "/" + id + return bb +} + +// ManagedDeviceMobileAppConfigurationDeviceStatusesCollectionRequest is request for ManagedDeviceMobileAppConfigurationDeviceStatus collection +type ManagedDeviceMobileAppConfigurationDeviceStatusesCollectionRequest struct{ BaseRequest } + +// Paging perfoms paging operation for ManagedDeviceMobileAppConfigurationDeviceStatus collection +func (r *ManagedDeviceMobileAppConfigurationDeviceStatusesCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}) ([]ManagedDeviceMobileAppConfigurationDeviceStatus, error) { + req, err := r.NewJSONRequest(method, path, obj) + if err != nil { + return nil, err + } + if ctx != nil { + req = req.WithContext(ctx) + } + res, err := r.client.Do(req) + if err != nil { + return nil, err + } + var values []ManagedDeviceMobileAppConfigurationDeviceStatus + for { + defer res.Body.Close() + if res.StatusCode != http.StatusOK { + b, _ := ioutil.ReadAll(res.Body) + errRes := &ErrorResponse{Response: res} + err := jsonx.Unmarshal(b, errRes) + if err != nil { + return nil, fmt.Errorf("%s: %s", res.Status, string(b)) + } + return nil, errRes + } + var ( + paging Paging + value []ManagedDeviceMobileAppConfigurationDeviceStatus + ) + err := jsonx.NewDecoder(res.Body).Decode(&paging) + if err != nil { + return nil, err + } + err = jsonx.Unmarshal(paging.Value, &value) + if err != nil { + return nil, err + } + values = append(values, value...) + if len(paging.NextLink) == 0 { + return values, nil + } + req, err = http.NewRequest("GET", paging.NextLink, nil) + if ctx != nil { + req = req.WithContext(ctx) + } + res, err = r.client.Do(req) + if err != nil { + return nil, err + } + } +} + +// Get performs GET request for ManagedDeviceMobileAppConfigurationDeviceStatus collection +func (r *ManagedDeviceMobileAppConfigurationDeviceStatusesCollectionRequest) Get(ctx context.Context) ([]ManagedDeviceMobileAppConfigurationDeviceStatus, error) { + var query string + if r.query != nil { + query = "?" + r.query.Encode() + } + return r.Paging(ctx, "GET", query, nil) +} + +// Add performs POST request for ManagedDeviceMobileAppConfigurationDeviceStatus collection +func (r *ManagedDeviceMobileAppConfigurationDeviceStatusesCollectionRequest) Add(ctx context.Context, reqObj *ManagedDeviceMobileAppConfigurationDeviceStatus) (resObj *ManagedDeviceMobileAppConfigurationDeviceStatus, err error) { + err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) + return +} + +// UserStatusSummary is navigation property +func (b *ManagedDeviceMobileAppConfigurationRequestBuilder) UserStatusSummary() *ManagedDeviceMobileAppConfigurationUserSummaryRequestBuilder { + bb := &ManagedDeviceMobileAppConfigurationUserSummaryRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} + bb.baseURL += "/userStatusSummary" + return bb +} + +// UserStatuses returns request builder for ManagedDeviceMobileAppConfigurationUserStatus collection +func (b *ManagedDeviceMobileAppConfigurationRequestBuilder) UserStatuses() *ManagedDeviceMobileAppConfigurationUserStatusesCollectionRequestBuilder { + bb := &ManagedDeviceMobileAppConfigurationUserStatusesCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} + bb.baseURL += "/userStatuses" + return bb +} + +// ManagedDeviceMobileAppConfigurationUserStatusesCollectionRequestBuilder is request builder for ManagedDeviceMobileAppConfigurationUserStatus collection +type ManagedDeviceMobileAppConfigurationUserStatusesCollectionRequestBuilder struct{ BaseRequestBuilder } + +// Request returns request for ManagedDeviceMobileAppConfigurationUserStatus collection +func (b *ManagedDeviceMobileAppConfigurationUserStatusesCollectionRequestBuilder) Request() *ManagedDeviceMobileAppConfigurationUserStatusesCollectionRequest { + return &ManagedDeviceMobileAppConfigurationUserStatusesCollectionRequest{ + BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, + } +} + +// ID returns request builder for ManagedDeviceMobileAppConfigurationUserStatus item +func (b *ManagedDeviceMobileAppConfigurationUserStatusesCollectionRequestBuilder) ID(id string) *ManagedDeviceMobileAppConfigurationUserStatusRequestBuilder { + bb := &ManagedDeviceMobileAppConfigurationUserStatusRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} + bb.baseURL += "/" + id + return bb +} + +// ManagedDeviceMobileAppConfigurationUserStatusesCollectionRequest is request for ManagedDeviceMobileAppConfigurationUserStatus collection +type ManagedDeviceMobileAppConfigurationUserStatusesCollectionRequest struct{ BaseRequest } + +// Paging perfoms paging operation for ManagedDeviceMobileAppConfigurationUserStatus collection +func (r *ManagedDeviceMobileAppConfigurationUserStatusesCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}) ([]ManagedDeviceMobileAppConfigurationUserStatus, error) { + req, err := r.NewJSONRequest(method, path, obj) + if err != nil { + return nil, err + } + if ctx != nil { + req = req.WithContext(ctx) + } + res, err := r.client.Do(req) + if err != nil { + return nil, err + } + var values []ManagedDeviceMobileAppConfigurationUserStatus + for { + defer res.Body.Close() + if res.StatusCode != http.StatusOK { + b, _ := ioutil.ReadAll(res.Body) + errRes := &ErrorResponse{Response: res} + err := jsonx.Unmarshal(b, errRes) + if err != nil { + return nil, fmt.Errorf("%s: %s", res.Status, string(b)) + } + return nil, errRes + } + var ( + paging Paging + value []ManagedDeviceMobileAppConfigurationUserStatus + ) + err := jsonx.NewDecoder(res.Body).Decode(&paging) + if err != nil { + return nil, err + } + err = jsonx.Unmarshal(paging.Value, &value) + if err != nil { + return nil, err + } + values = append(values, value...) + if len(paging.NextLink) == 0 { + return values, nil + } + req, err = http.NewRequest("GET", paging.NextLink, nil) + if ctx != nil { + req = req.WithContext(ctx) + } + res, err = r.client.Do(req) + if err != nil { + return nil, err + } + } +} + +// Get performs GET request for ManagedDeviceMobileAppConfigurationUserStatus collection +func (r *ManagedDeviceMobileAppConfigurationUserStatusesCollectionRequest) Get(ctx context.Context) ([]ManagedDeviceMobileAppConfigurationUserStatus, error) { + var query string + if r.query != nil { + query = "?" + r.query.Encode() + } + return r.Paging(ctx, "GET", query, nil) +} + +// Add performs POST request for ManagedDeviceMobileAppConfigurationUserStatus collection +func (r *ManagedDeviceMobileAppConfigurationUserStatusesCollectionRequest) Add(ctx context.Context, reqObj *ManagedDeviceMobileAppConfigurationUserStatus) (resObj *ManagedDeviceMobileAppConfigurationUserStatus, err error) { + err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) + return +} -- cgit v1.2.3