diff options
author | Qais Patankar <qaisjp@gmail.com> | 2020-03-15 22:43:46 +0000 |
---|---|---|
committer | Wim <wim@42.be> | 2020-03-22 00:02:48 +0100 |
commit | 76e5fe5a87d7e60919075f96eee599f3c6255a9f (patch) | |
tree | af3181ad6aadaea02069473a3718a827be888426 /vendor/github.com/matterbridge/msgraph.go/beta/DirectoryObjectAction.go | |
parent | 802c80f40c709ba4967de317e40a8d6abe57f6be (diff) | |
download | matterbridge-msglm-76e5fe5a87d7e60919075f96eee599f3c6255a9f.tar.gz matterbridge-msglm-76e5fe5a87d7e60919075f96eee599f3c6255a9f.tar.bz2 matterbridge-msglm-76e5fe5a87d7e60919075f96eee599f3c6255a9f.zip |
Update vendor yaegashi/msgraph.go to v0.1.2 (2)
Diffstat (limited to 'vendor/github.com/matterbridge/msgraph.go/beta/DirectoryObjectAction.go')
-rw-r--r-- | vendor/github.com/matterbridge/msgraph.go/beta/DirectoryObjectAction.go | 1398 |
1 files changed, 0 insertions, 1398 deletions
diff --git a/vendor/github.com/matterbridge/msgraph.go/beta/DirectoryObjectAction.go b/vendor/github.com/matterbridge/msgraph.go/beta/DirectoryObjectAction.go deleted file mode 100644 index da5e8ebf..00000000 --- a/vendor/github.com/matterbridge/msgraph.go/beta/DirectoryObjectAction.go +++ /dev/null @@ -1,1398 +0,0 @@ -// Code generated by msgraph-generate.go DO NOT EDIT. - -package msgraph - -import ( - "context" - "fmt" - "io/ioutil" - "net/http" - - "github.com/matterbridge/msgraph.go/jsonx" -) - -// DirectoryObjectCollectionGetByIDsRequestParameter undocumented -type DirectoryObjectCollectionGetByIDsRequestParameter struct { - // IDs undocumented - IDs []string `json:"ids,omitempty"` - // Types undocumented - Types []string `json:"types,omitempty"` -} - -// DirectoryObjectCollectionValidatePropertiesRequestParameter undocumented -type DirectoryObjectCollectionValidatePropertiesRequestParameter struct { - // EntityType undocumented - EntityType *string `json:"entityType,omitempty"` - // DisplayName undocumented - DisplayName *string `json:"displayName,omitempty"` - // MailNickname undocumented - MailNickname *string `json:"mailNickname,omitempty"` - // OnBehalfOfUserID undocumented - OnBehalfOfUserID *UUID `json:"onBehalfOfUserId,omitempty"` -} - -// DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter undocumented -type DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter struct { - // UserID undocumented - UserID *string `json:"userId,omitempty"` - // Type undocumented - Type *string `json:"type,omitempty"` -} - -// DirectoryObjectCheckMemberGroupsRequestParameter undocumented -type DirectoryObjectCheckMemberGroupsRequestParameter struct { - // GroupIDs undocumented - GroupIDs []string `json:"groupIds,omitempty"` -} - -// DirectoryObjectCheckMemberObjectsRequestParameter undocumented -type DirectoryObjectCheckMemberObjectsRequestParameter struct { - // IDs undocumented - IDs []string `json:"ids,omitempty"` -} - -// DirectoryObjectGetMemberGroupsRequestParameter undocumented -type DirectoryObjectGetMemberGroupsRequestParameter struct { - // SecurityEnabledOnly undocumented - SecurityEnabledOnly *bool `json:"securityEnabledOnly,omitempty"` -} - -// DirectoryObjectGetMemberObjectsRequestParameter undocumented -type DirectoryObjectGetMemberObjectsRequestParameter struct { - // SecurityEnabledOnly undocumented - SecurityEnabledOnly *bool `json:"securityEnabledOnly,omitempty"` -} - -// DirectoryObjectRestoreRequestParameter undocumented -type DirectoryObjectRestoreRequestParameter struct { -} - -// -type DirectoryObjectCollectionGetByIDsRequestBuilder struct{ BaseRequestBuilder } - -// GetByIDs action undocumented -func (b *AdministrativeUnitMembersCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *ApplicationOwnersCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *ApplicationPoliciesCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *DeviceMemberOfCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *DeviceRegisteredOwnersCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *DeviceRegisteredUsersCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *DeviceTransitiveMemberOfCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *DirectoryDeletedItemsCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *DirectoryRoleMembersCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *DomainDomainNameReferencesCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *FeatureRolloutPolicyAppliesToCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *GroupAcceptedSendersCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *GroupMemberOfCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *GroupMembersCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *GroupMembersWithLicenseErrorsCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *GroupOwnersCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *GroupRejectedSendersCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *GroupTransitiveMemberOfCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *GroupTransitiveMembersCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *OrgContactDirectReportsCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *OrgContactMemberOfCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *OrgContactTransitiveMemberOfCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *PolicyAppliesToCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *ServicePrincipalCreatedObjectsCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *ServicePrincipalMemberOfCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *ServicePrincipalOwnedObjectsCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *ServicePrincipalOwnersCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *ServicePrincipalPoliciesCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *ServicePrincipalTransitiveMemberOfCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *UserCreatedObjectsCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *UserDirectReportsCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *UserMemberOfCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *UserOwnedDevicesCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *UserOwnedObjectsCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *UserRegisteredDevicesCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetByIDs action undocumented -func (b *UserTransitiveMemberOfCollectionRequestBuilder) GetByIDs(reqObj *DirectoryObjectCollectionGetByIDsRequestParameter) *DirectoryObjectCollectionGetByIDsRequestBuilder { - bb := &DirectoryObjectCollectionGetByIDsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getByIds" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// -type DirectoryObjectCollectionGetByIDsRequest struct{ BaseRequest } - -// -func (b *DirectoryObjectCollectionGetByIDsRequestBuilder) Request() *DirectoryObjectCollectionGetByIDsRequest { - return &DirectoryObjectCollectionGetByIDsRequest{ - BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject}, - } -} - -// -func (r *DirectoryObjectCollectionGetByIDsRequest) Paging(ctx context.Context, method, path string, obj interface{}) ([][]DirectoryObject, 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 [][]DirectoryObject - 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 [][]DirectoryObject - ) - 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 - } - } -} - -// -func (r *DirectoryObjectCollectionGetByIDsRequest) Get(ctx context.Context) ([][]DirectoryObject, error) { - var query string - if r.query != nil { - query = "?" + r.query.Encode() - } - return r.Paging(ctx, "GET", query, nil) -} - -// -type DirectoryObjectCollectionValidatePropertiesRequestBuilder struct{ BaseRequestBuilder } - -// ValidateProperties action undocumented -func (b *AdministrativeUnitMembersCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *ApplicationOwnersCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *ApplicationPoliciesCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *DeviceMemberOfCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *DeviceRegisteredOwnersCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *DeviceRegisteredUsersCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *DeviceTransitiveMemberOfCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *DirectoryDeletedItemsCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *DirectoryRoleMembersCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *DomainDomainNameReferencesCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *FeatureRolloutPolicyAppliesToCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *GroupAcceptedSendersCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *GroupMemberOfCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *GroupMembersCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *GroupMembersWithLicenseErrorsCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *GroupOwnersCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *GroupRejectedSendersCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *GroupTransitiveMemberOfCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *GroupTransitiveMembersCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *OrgContactDirectReportsCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *OrgContactMemberOfCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *OrgContactTransitiveMemberOfCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *PolicyAppliesToCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *ServicePrincipalCreatedObjectsCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *ServicePrincipalMemberOfCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *ServicePrincipalOwnedObjectsCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *ServicePrincipalOwnersCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *ServicePrincipalPoliciesCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *ServicePrincipalTransitiveMemberOfCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *UserCreatedObjectsCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *UserDirectReportsCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *UserMemberOfCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *UserOwnedDevicesCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *UserOwnedObjectsCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *UserRegisteredDevicesCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// ValidateProperties action undocumented -func (b *UserTransitiveMemberOfCollectionRequestBuilder) ValidateProperties(reqObj *DirectoryObjectCollectionValidatePropertiesRequestParameter) *DirectoryObjectCollectionValidatePropertiesRequestBuilder { - bb := &DirectoryObjectCollectionValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/validateProperties" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// -type DirectoryObjectCollectionValidatePropertiesRequest struct{ BaseRequest } - -// -func (b *DirectoryObjectCollectionValidatePropertiesRequestBuilder) Request() *DirectoryObjectCollectionValidatePropertiesRequest { - return &DirectoryObjectCollectionValidatePropertiesRequest{ - BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject}, - } -} - -// -func (r *DirectoryObjectCollectionValidatePropertiesRequest) Post(ctx context.Context) error { - return r.JSONRequest(ctx, "POST", "", r.requestObject, nil) -} - -// -type DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder struct{ BaseRequestBuilder } - -// GetUserOwnedObjects action undocumented -func (b *AdministrativeUnitMembersCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *ApplicationOwnersCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *ApplicationPoliciesCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *DeviceMemberOfCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *DeviceRegisteredOwnersCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *DeviceRegisteredUsersCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *DeviceTransitiveMemberOfCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *DirectoryDeletedItemsCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *DirectoryRoleMembersCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *DomainDomainNameReferencesCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *FeatureRolloutPolicyAppliesToCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *GroupAcceptedSendersCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *GroupMemberOfCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *GroupMembersCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *GroupMembersWithLicenseErrorsCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *GroupOwnersCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *GroupRejectedSendersCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *GroupTransitiveMemberOfCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *GroupTransitiveMembersCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *OrgContactDirectReportsCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *OrgContactMemberOfCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *OrgContactTransitiveMemberOfCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *PolicyAppliesToCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *ServicePrincipalCreatedObjectsCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *ServicePrincipalMemberOfCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *ServicePrincipalOwnedObjectsCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *ServicePrincipalOwnersCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *ServicePrincipalPoliciesCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *ServicePrincipalTransitiveMemberOfCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *UserCreatedObjectsCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *UserDirectReportsCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *UserMemberOfCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *UserOwnedDevicesCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *UserOwnedObjectsCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *UserRegisteredDevicesCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// GetUserOwnedObjects action undocumented -func (b *UserTransitiveMemberOfCollectionRequestBuilder) GetUserOwnedObjects(reqObj *DirectoryObjectCollectionGetUserOwnedObjectsRequestParameter) *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder { - bb := &DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getUserOwnedObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// -type DirectoryObjectCollectionGetUserOwnedObjectsRequest struct{ BaseRequest } - -// -func (b *DirectoryObjectCollectionGetUserOwnedObjectsRequestBuilder) Request() *DirectoryObjectCollectionGetUserOwnedObjectsRequest { - return &DirectoryObjectCollectionGetUserOwnedObjectsRequest{ - BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject}, - } -} - -// -func (r *DirectoryObjectCollectionGetUserOwnedObjectsRequest) Post(ctx context.Context) (resObj *DirectoryObject, err error) { - err = r.JSONRequest(ctx, "POST", "", r.requestObject, &resObj) - return -} - -// -type DirectoryObjectCheckMemberGroupsRequestBuilder struct{ BaseRequestBuilder } - -// CheckMemberGroups action undocumented -func (b *DirectoryObjectRequestBuilder) CheckMemberGroups(reqObj *DirectoryObjectCheckMemberGroupsRequestParameter) *DirectoryObjectCheckMemberGroupsRequestBuilder { - bb := &DirectoryObjectCheckMemberGroupsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/checkMemberGroups" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// -type DirectoryObjectCheckMemberGroupsRequest struct{ BaseRequest } - -// -func (b *DirectoryObjectCheckMemberGroupsRequestBuilder) Request() *DirectoryObjectCheckMemberGroupsRequest { - return &DirectoryObjectCheckMemberGroupsRequest{ - BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject}, - } -} - -// -func (r *DirectoryObjectCheckMemberGroupsRequest) Paging(ctx context.Context, method, path string, obj interface{}) ([][]string, 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 [][]string - 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 [][]string - ) - 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 - } - } -} - -// -func (r *DirectoryObjectCheckMemberGroupsRequest) Get(ctx context.Context) ([][]string, error) { - var query string - if r.query != nil { - query = "?" + r.query.Encode() - } - return r.Paging(ctx, "GET", query, nil) -} - -// -type DirectoryObjectCheckMemberObjectsRequestBuilder struct{ BaseRequestBuilder } - -// CheckMemberObjects action undocumented -func (b *DirectoryObjectRequestBuilder) CheckMemberObjects(reqObj *DirectoryObjectCheckMemberObjectsRequestParameter) *DirectoryObjectCheckMemberObjectsRequestBuilder { - bb := &DirectoryObjectCheckMemberObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/checkMemberObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// -type DirectoryObjectCheckMemberObjectsRequest struct{ BaseRequest } - -// -func (b *DirectoryObjectCheckMemberObjectsRequestBuilder) Request() *DirectoryObjectCheckMemberObjectsRequest { - return &DirectoryObjectCheckMemberObjectsRequest{ - BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject}, - } -} - -// -func (r *DirectoryObjectCheckMemberObjectsRequest) Paging(ctx context.Context, method, path string, obj interface{}) ([][]string, 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 [][]string - 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 [][]string - ) - 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 - } - } -} - -// -func (r *DirectoryObjectCheckMemberObjectsRequest) Get(ctx context.Context) ([][]string, error) { - var query string - if r.query != nil { - query = "?" + r.query.Encode() - } - return r.Paging(ctx, "GET", query, nil) -} - -// -type DirectoryObjectGetMemberGroupsRequestBuilder struct{ BaseRequestBuilder } - -// GetMemberGroups action undocumented -func (b *DirectoryObjectRequestBuilder) GetMemberGroups(reqObj *DirectoryObjectGetMemberGroupsRequestParameter) *DirectoryObjectGetMemberGroupsRequestBuilder { - bb := &DirectoryObjectGetMemberGroupsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getMemberGroups" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// -type DirectoryObjectGetMemberGroupsRequest struct{ BaseRequest } - -// -func (b *DirectoryObjectGetMemberGroupsRequestBuilder) Request() *DirectoryObjectGetMemberGroupsRequest { - return &DirectoryObjectGetMemberGroupsRequest{ - BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject}, - } -} - -// -func (r *DirectoryObjectGetMemberGroupsRequest) Paging(ctx context.Context, method, path string, obj interface{}) ([][]string, 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 [][]string - 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 [][]string - ) - 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 - } - } -} - -// -func (r *DirectoryObjectGetMemberGroupsRequest) Get(ctx context.Context) ([][]string, error) { - var query string - if r.query != nil { - query = "?" + r.query.Encode() - } - return r.Paging(ctx, "GET", query, nil) -} - -// -type DirectoryObjectGetMemberObjectsRequestBuilder struct{ BaseRequestBuilder } - -// GetMemberObjects action undocumented -func (b *DirectoryObjectRequestBuilder) GetMemberObjects(reqObj *DirectoryObjectGetMemberObjectsRequestParameter) *DirectoryObjectGetMemberObjectsRequestBuilder { - bb := &DirectoryObjectGetMemberObjectsRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/getMemberObjects" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// -type DirectoryObjectGetMemberObjectsRequest struct{ BaseRequest } - -// -func (b *DirectoryObjectGetMemberObjectsRequestBuilder) Request() *DirectoryObjectGetMemberObjectsRequest { - return &DirectoryObjectGetMemberObjectsRequest{ - BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject}, - } -} - -// -func (r *DirectoryObjectGetMemberObjectsRequest) Paging(ctx context.Context, method, path string, obj interface{}) ([][]string, 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 [][]string - 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 [][]string - ) - 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 - } - } -} - -// -func (r *DirectoryObjectGetMemberObjectsRequest) Get(ctx context.Context) ([][]string, error) { - var query string - if r.query != nil { - query = "?" + r.query.Encode() - } - return r.Paging(ctx, "GET", query, nil) -} - -// -type DirectoryObjectRestoreRequestBuilder struct{ BaseRequestBuilder } - -// Restore action undocumented -func (b *DirectoryObjectRequestBuilder) Restore(reqObj *DirectoryObjectRestoreRequestParameter) *DirectoryObjectRestoreRequestBuilder { - bb := &DirectoryObjectRestoreRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} - bb.BaseRequestBuilder.baseURL += "/restore" - bb.BaseRequestBuilder.requestObject = reqObj - return bb -} - -// -type DirectoryObjectRestoreRequest struct{ BaseRequest } - -// -func (b *DirectoryObjectRestoreRequestBuilder) Request() *DirectoryObjectRestoreRequest { - return &DirectoryObjectRestoreRequest{ - BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject}, - } -} - -// -func (r *DirectoryObjectRestoreRequest) Post(ctx context.Context) (resObj *DirectoryObject, err error) { - err = r.JSONRequest(ctx, "POST", "", r.requestObject, &resObj) - return -} |