Skip to content

Commit 6f0a4fd

Browse files
authored
Merge pull request #509 from microsoftgraph/feature/odata-cast-constraints
feature/odata cast constraints
2 parents 46fa196 + d0415f7 commit 6f0a4fd

File tree

411 files changed

+10982
-310
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

411 files changed

+10982
-310
lines changed

src/main/java/com/microsoft/graph/callrecords/requests/extensions/ICallRecordCollectionRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@ public interface ICallRecordCollectionRequest extends IHttpRequest {
8585
*
8686
* @return the updated request
8787
*/
88-
ICallRecordCollectionRequest skipToken(String skipToken);
88+
ICallRecordCollectionRequest skipToken(final String skipToken);
8989
}

src/main/java/com/microsoft/graph/callrecords/requests/extensions/ISegmentCollectionRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@ public interface ISegmentCollectionRequest extends IHttpRequest {
8585
*
8686
* @return the updated request
8787
*/
88-
ISegmentCollectionRequest skipToken(String skipToken);
88+
ISegmentCollectionRequest skipToken(final String skipToken);
8989
}

src/main/java/com/microsoft/graph/callrecords/requests/extensions/ISessionCollectionRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@ public interface ISessionCollectionRequest extends IHttpRequest {
8585
*
8686
* @return the updated request
8787
*/
88-
ISessionCollectionRequest skipToken(String skipToken);
88+
ISessionCollectionRequest skipToken(final String skipToken);
8989
}

src/main/java/com/microsoft/graph/requests/extensions/AdministrativeUnitRequestBuilder.java

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,48 @@ public IDirectoryObjectCollectionWithReferencesRequestBuilder members() {
7171
public IDirectoryObjectWithReferenceRequestBuilder members(final String id) {
7272
return new DirectoryObjectWithReferenceRequestBuilder(getRequestUrlWithAdditionalSegment("members") + "/" + id, getClient(), null);
7373
}
74+
public IUserCollectionWithReferencesRequestBuilder membersAsUser() {
75+
return new UserCollectionWithReferencesRequestBuilder(getRequestUrlWithAdditionalSegment("members") + "/microsoft.graph.user", getClient(), null);
76+
}
77+
78+
public IUserWithReferenceRequestBuilder membersAsUser(final String id) {
79+
return new UserWithReferenceRequestBuilder(getRequestUrlWithAdditionalSegment("members") + "/" + id + "/microsoft.graph.user", getClient(), null);
80+
}
81+
public IGroupCollectionWithReferencesRequestBuilder membersAsGroup() {
82+
return new GroupCollectionWithReferencesRequestBuilder(getRequestUrlWithAdditionalSegment("members") + "/microsoft.graph.group", getClient(), null);
83+
}
84+
85+
public IGroupWithReferenceRequestBuilder membersAsGroup(final String id) {
86+
return new GroupWithReferenceRequestBuilder(getRequestUrlWithAdditionalSegment("members") + "/" + id + "/microsoft.graph.group", getClient(), null);
87+
}
88+
public IApplicationCollectionWithReferencesRequestBuilder membersAsApplication() {
89+
return new ApplicationCollectionWithReferencesRequestBuilder(getRequestUrlWithAdditionalSegment("members") + "/microsoft.graph.application", getClient(), null);
90+
}
91+
92+
public IApplicationWithReferenceRequestBuilder membersAsApplication(final String id) {
93+
return new ApplicationWithReferenceRequestBuilder(getRequestUrlWithAdditionalSegment("members") + "/" + id + "/microsoft.graph.application", getClient(), null);
94+
}
95+
public IServicePrincipalCollectionWithReferencesRequestBuilder membersAsServicePrincipal() {
96+
return new ServicePrincipalCollectionWithReferencesRequestBuilder(getRequestUrlWithAdditionalSegment("members") + "/microsoft.graph.servicePrincipal", getClient(), null);
97+
}
98+
99+
public IServicePrincipalWithReferenceRequestBuilder membersAsServicePrincipal(final String id) {
100+
return new ServicePrincipalWithReferenceRequestBuilder(getRequestUrlWithAdditionalSegment("members") + "/" + id + "/microsoft.graph.servicePrincipal", getClient(), null);
101+
}
102+
public IDeviceCollectionWithReferencesRequestBuilder membersAsDevice() {
103+
return new DeviceCollectionWithReferencesRequestBuilder(getRequestUrlWithAdditionalSegment("members") + "/microsoft.graph.device", getClient(), null);
104+
}
105+
106+
public IDeviceWithReferenceRequestBuilder membersAsDevice(final String id) {
107+
return new DeviceWithReferenceRequestBuilder(getRequestUrlWithAdditionalSegment("members") + "/" + id + "/microsoft.graph.device", getClient(), null);
108+
}
109+
public IOrgContactCollectionWithReferencesRequestBuilder membersAsOrgContact() {
110+
return new OrgContactCollectionWithReferencesRequestBuilder(getRequestUrlWithAdditionalSegment("members") + "/microsoft.graph.orgContact", getClient(), null);
111+
}
112+
113+
public IOrgContactWithReferenceRequestBuilder membersAsOrgContact(final String id) {
114+
return new OrgContactWithReferenceRequestBuilder(getRequestUrlWithAdditionalSegment("members") + "/" + id + "/microsoft.graph.orgContact", getClient(), null);
115+
}
74116
public IScopedRoleMembershipCollectionRequestBuilder scopedRoleMembers() {
75117
return new ScopedRoleMembershipCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("scopedRoleMembers"), getClient(), null);
76118
}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
package com.microsoft.graph.requests.extensions;
6+
7+
import com.microsoft.graph.http.IRequestBuilder;
8+
import com.microsoft.graph.core.ClientException;
9+
import com.microsoft.graph.concurrency.ICallback;
10+
import com.microsoft.graph.models.extensions.ServicePrincipal;
11+
import com.microsoft.graph.models.extensions.AppRoleAssignment;
12+
import java.util.Arrays;
13+
import java.util.EnumSet;
14+
15+
import com.microsoft.graph.options.QueryOption;
16+
import com.microsoft.graph.core.IBaseClient;
17+
import com.microsoft.graph.http.BaseCollectionRequest;
18+
import com.microsoft.graph.http.ReferenceRequestBody;
19+
import com.microsoft.graph.models.extensions.AppRoleAssignment;
20+
21+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
22+
23+
/**
24+
* The class for the App Role Assignment Collection Reference Request.
25+
*/
26+
public class AppRoleAssignmentCollectionReferenceRequest extends BaseCollectionRequest<AppRoleAssignmentCollectionResponse, IAppRoleAssignmentCollectionPage> implements IAppRoleAssignmentCollectionReferenceRequest {
27+
28+
/**
29+
* The request builder for this collection of AppRoleAssignment
30+
*
31+
* @param requestUrl the request URL
32+
* @param client the service client
33+
* @param requestOptions the options for this request
34+
*/
35+
public AppRoleAssignmentCollectionReferenceRequest(final String requestUrl, IBaseClient client, final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
36+
super(requestUrl, client, requestOptions, AppRoleAssignmentCollectionResponse.class, IAppRoleAssignmentCollectionPage.class);
37+
}
38+
39+
public void post(final AppRoleAssignment newAppRoleAssignment, final ICallback<? super AppRoleAssignment> callback) {
40+
final String requestUrl = getBaseRequest().getRequestUrl().toString();
41+
final ReferenceRequestBody body = new ReferenceRequestBody(getBaseRequest().getClient().getServiceRoot() + "/me/ownersAsAppRoleAssignment/" + newAppRoleAssignment.id);
42+
new AppRoleAssignmentWithReferenceRequestBuilder(requestUrl, getBaseRequest().getClient(), /* Options */ null)
43+
.buildRequest(getBaseRequest().getHeaders())
44+
.post(newAppRoleAssignment, body, callback);
45+
}
46+
47+
public AppRoleAssignment post(final AppRoleAssignment newAppRoleAssignment) throws ClientException {
48+
final String requestUrl = getBaseRequest().getRequestUrl().toString();
49+
final ReferenceRequestBody body = new ReferenceRequestBody(getBaseRequest().getClient().getServiceRoot() + "/me/ownersAsAppRoleAssignment/" + newAppRoleAssignment.id);
50+
return new AppRoleAssignmentWithReferenceRequestBuilder(requestUrl,getBaseRequest().getClient(), /* Options */ null)
51+
.buildRequest(getBaseRequest().getHeaders())
52+
.post(newAppRoleAssignment, body);
53+
}
54+
/**
55+
* Sets the expand clause for the request
56+
*
57+
* @param value the expand clause
58+
* @return the updated request
59+
*/
60+
public IAppRoleAssignmentCollectionReferenceRequest expand(final String value) {
61+
addQueryOption(new com.microsoft.graph.options.QueryOption("$expand", value));
62+
return (AppRoleAssignmentCollectionReferenceRequest)this;
63+
}
64+
65+
/**
66+
* Sets the filter clause for the request
67+
*
68+
* @param value the filter clause
69+
* @return the updated request
70+
*/
71+
public IAppRoleAssignmentCollectionReferenceRequest filter(final String value) {
72+
addQueryOption(new com.microsoft.graph.options.QueryOption("$filter", value));
73+
return (AppRoleAssignmentCollectionReferenceRequest)this;
74+
}
75+
76+
/**
77+
* Sets the order by clause for the request
78+
*
79+
* @param value the sort clause
80+
* @return the updated request
81+
*/
82+
public IAppRoleAssignmentCollectionReferenceRequest orderBy(final String value) {
83+
addQueryOption(new com.microsoft.graph.options.QueryOption("$orderby", value));
84+
return (AppRoleAssignmentCollectionReferenceRequest)this;
85+
}
86+
87+
/**
88+
* Sets the select clause for the request
89+
*
90+
* @param value the select clause
91+
* @return the updated request
92+
*/
93+
public IAppRoleAssignmentCollectionReferenceRequest select(final String value) {
94+
addQueryOption(new com.microsoft.graph.options.QueryOption("$select", value));
95+
return (AppRoleAssignmentCollectionReferenceRequest)this;
96+
}
97+
98+
/**
99+
* Sets the top value for the request
100+
*
101+
* @param value the max number of items to return
102+
* @return the updated request
103+
*/
104+
public IAppRoleAssignmentCollectionReferenceRequest top(final int value) {
105+
addQueryOption(new com.microsoft.graph.options.QueryOption("$top", value + ""));
106+
return (AppRoleAssignmentCollectionReferenceRequest)this;
107+
}
108+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
package com.microsoft.graph.requests.extensions;
6+
7+
import com.microsoft.graph.http.IRequestBuilder;
8+
import com.microsoft.graph.core.ClientException;
9+
import com.microsoft.graph.concurrency.ICallback;
10+
import com.microsoft.graph.models.extensions.ServicePrincipal;
11+
import com.microsoft.graph.models.extensions.AppRoleAssignment;
12+
import java.util.Arrays;
13+
import java.util.EnumSet;
14+
15+
import com.microsoft.graph.http.BaseRequestBuilder;
16+
import com.microsoft.graph.core.IBaseClient;
17+
18+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
19+
20+
/**
21+
* The class for the App Role Assignment Collection Reference Request Builder.
22+
*/
23+
public class AppRoleAssignmentCollectionReferenceRequestBuilder extends BaseRequestBuilder implements IAppRoleAssignmentCollectionReferenceRequestBuilder {
24+
25+
/**
26+
* The request builder for this collection of ServicePrincipal
27+
*
28+
* @param requestUrl the request URL
29+
* @param client the service client
30+
* @param requestOptions the options for this request
31+
*/
32+
public AppRoleAssignmentCollectionReferenceRequestBuilder(final String requestUrl, final IBaseClient client, final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
33+
super(requestUrl, client, requestOptions);
34+
}
35+
36+
/**
37+
* Creates the request
38+
*
39+
* @param requestOptions the options for this request
40+
* @return the IUserRequest instance
41+
*/
42+
public IAppRoleAssignmentCollectionReferenceRequest buildRequest(final com.microsoft.graph.options.Option... requestOptions) {
43+
return buildRequest(getOptions(requestOptions));
44+
}
45+
46+
/**
47+
* Creates the request
48+
*
49+
* @param requestOptions the options for this request
50+
* @return the IUserRequest instance
51+
*/
52+
public IAppRoleAssignmentCollectionReferenceRequest buildRequest(final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
53+
return new AppRoleAssignmentCollectionReferenceRequest(getRequestUrl(), getClient(), requestOptions);
54+
}
55+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
package com.microsoft.graph.requests.extensions;
6+
7+
import com.microsoft.graph.http.IRequestBuilder;
8+
import com.microsoft.graph.core.ClientException;
9+
import com.microsoft.graph.concurrency.ICallback;
10+
import com.microsoft.graph.models.extensions.ServicePrincipal;
11+
import com.microsoft.graph.models.extensions.AppRoleAssignment;
12+
import java.util.Arrays;
13+
import java.util.EnumSet;
14+
15+
import com.microsoft.graph.requests.extensions.IAppRoleAssignmentCollectionWithReferencesRequestBuilder;
16+
import com.microsoft.graph.requests.extensions.IAppRoleAssignmentCollectionWithReferencesPage;
17+
import com.microsoft.graph.requests.extensions.AppRoleAssignmentCollectionResponse;
18+
import com.microsoft.graph.models.extensions.AppRoleAssignment;
19+
import com.google.gson.JsonObject;
20+
import com.google.gson.annotations.SerializedName;
21+
import com.google.gson.annotations.Expose;
22+
import com.microsoft.graph.http.BaseCollectionPage;
23+
24+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
25+
26+
/**
27+
* The class for the App Role Assignment Collection With References Page.
28+
*/
29+
public class AppRoleAssignmentCollectionWithReferencesPage extends BaseCollectionPage<AppRoleAssignment, IAppRoleAssignmentCollectionWithReferencesRequestBuilder> implements IAppRoleAssignmentCollectionWithReferencesPage {
30+
31+
/**
32+
* A collection page for AppRoleAssignment
33+
*
34+
* @param response the serialized AppRoleAssignmentCollectionResponse from the service
35+
* @param builder the request builder for the next collection page
36+
*/
37+
public AppRoleAssignmentCollectionWithReferencesPage(final AppRoleAssignmentCollectionResponse response, final IAppRoleAssignmentCollectionWithReferencesRequestBuilder builder) {
38+
super(response.value, builder, response.additionalDataManager());
39+
}
40+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
package com.microsoft.graph.requests.extensions;
6+
7+
import com.microsoft.graph.http.IRequestBuilder;
8+
import com.microsoft.graph.core.ClientException;
9+
import com.microsoft.graph.concurrency.ICallback;
10+
import com.microsoft.graph.models.extensions.ServicePrincipal;
11+
import com.microsoft.graph.models.extensions.AppRoleAssignment;
12+
import java.util.Arrays;
13+
import java.util.EnumSet;
14+
15+
import com.microsoft.graph.options.QueryOption;
16+
import com.microsoft.graph.core.IBaseClient;
17+
import com.microsoft.graph.http.BaseCollectionRequest;
18+
import com.microsoft.graph.concurrency.IExecutors;
19+
20+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
21+
22+
/**
23+
* The class for the App Role Assignment Collection With References Request.
24+
*/
25+
public class AppRoleAssignmentCollectionWithReferencesRequest extends BaseCollectionRequest<AppRoleAssignmentCollectionResponse, IAppRoleAssignmentCollectionPage> implements IAppRoleAssignmentCollectionWithReferencesRequest {
26+
27+
/**
28+
* The request builder for this collection of AppRoleAssignment
29+
*
30+
* @param requestUrl the request URL
31+
* @param client the service client
32+
* @param requestOptions the options for this request
33+
*/
34+
public AppRoleAssignmentCollectionWithReferencesRequest(final String requestUrl, IBaseClient client, final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
35+
super(requestUrl, client, requestOptions, AppRoleAssignmentCollectionResponse.class, IAppRoleAssignmentCollectionPage.class);
36+
}
37+
38+
public void get(final ICallback<? super IAppRoleAssignmentCollectionWithReferencesPage> callback) {
39+
final IExecutors executors = getBaseRequest().getClient().getExecutors();
40+
executors.performOnBackground(new Runnable() {
41+
@Override
42+
public void run() {
43+
try {
44+
executors.performOnForeground(get(), callback);
45+
} catch (final ClientException e) {
46+
executors.performOnForeground(e, callback);
47+
}
48+
}
49+
});
50+
}
51+
52+
public IAppRoleAssignmentCollectionWithReferencesPage get() throws ClientException {
53+
final AppRoleAssignmentCollectionResponse response = send();
54+
return buildFromResponse(response);
55+
}
56+
57+
public IAppRoleAssignmentCollectionWithReferencesRequest expand(final String value) {
58+
addQueryOption(new com.microsoft.graph.options.QueryOption("$expand", value));
59+
return this;
60+
}
61+
62+
public IAppRoleAssignmentCollectionWithReferencesRequest filter(final String value) {
63+
addQueryOption(new com.microsoft.graph.options.QueryOption("$filter", value));
64+
return this;
65+
}
66+
67+
public IAppRoleAssignmentCollectionWithReferencesRequest orderBy(final String value) {
68+
addQueryOption(new com.microsoft.graph.options.QueryOption("$orderby", value));
69+
return this;
70+
}
71+
72+
public IAppRoleAssignmentCollectionWithReferencesRequest select(final String value) {
73+
addQueryOption(new com.microsoft.graph.options.QueryOption("$select", value));
74+
return this;
75+
}
76+
77+
public IAppRoleAssignmentCollectionWithReferencesRequest top(final int value) {
78+
addQueryOption(new com.microsoft.graph.options.QueryOption("$top", value + ""));
79+
return this;
80+
}
81+
82+
public IAppRoleAssignmentCollectionWithReferencesPage buildFromResponse(final AppRoleAssignmentCollectionResponse response) {
83+
final IAppRoleAssignmentCollectionWithReferencesRequestBuilder builder;
84+
if (response.nextLink != null) {
85+
builder = new AppRoleAssignmentCollectionWithReferencesRequestBuilder(response.nextLink, getBaseRequest().getClient(), /* options */ null);
86+
} else {
87+
builder = null;
88+
}
89+
final AppRoleAssignmentCollectionWithReferencesPage page = new AppRoleAssignmentCollectionWithReferencesPage(response, builder);
90+
page.setRawObject(response.getSerializer(), response.getRawObject());
91+
return page;
92+
}
93+
}

0 commit comments

Comments
 (0)