Skip to content

Commit d05bdc5

Browse files
committed
- udpates generation with group members cast annotated
1 parent 9d6a2e4 commit d05bdc5

File tree

58 files changed

+3288
-0
lines changed

Some content is hidden

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

58 files changed

+3288
-0
lines changed
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.Group;
11+
import com.microsoft.graph.models.extensions.Device;
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.Device;
20+
21+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
22+
23+
/**
24+
* The class for the Device Collection Reference Request.
25+
*/
26+
public class DeviceCollectionReferenceRequest extends BaseCollectionRequest<DeviceCollectionResponse, IDeviceCollectionPage> implements IDeviceCollectionReferenceRequest {
27+
28+
/**
29+
* The request builder for this collection of Device
30+
*
31+
* @param requestUrl the request URL
32+
* @param client the service client
33+
* @param requestOptions the options for this request
34+
*/
35+
public DeviceCollectionReferenceRequest(final String requestUrl, IBaseClient client, final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
36+
super(requestUrl, client, requestOptions, DeviceCollectionResponse.class, IDeviceCollectionPage.class);
37+
}
38+
39+
public void post(final Device newDevice, final ICallback<? super Device> callback) {
40+
final String requestUrl = getBaseRequest().getRequestUrl().toString();
41+
final ReferenceRequestBody body = new ReferenceRequestBody(getBaseRequest().getClient().getServiceRoot() + "/devices/" + newDevice.id);
42+
new DeviceWithReferenceRequestBuilder(requestUrl, getBaseRequest().getClient(), /* Options */ null)
43+
.buildRequest(getBaseRequest().getHeaders())
44+
.post(newDevice, body, callback);
45+
}
46+
47+
public Device post(final Device newDevice) throws ClientException {
48+
final String requestUrl = getBaseRequest().getRequestUrl().toString();
49+
final ReferenceRequestBody body = new ReferenceRequestBody(getBaseRequest().getClient().getServiceRoot() + "/devices/" + newDevice.id);
50+
return new DeviceWithReferenceRequestBuilder(requestUrl,getBaseRequest().getClient(), /* Options */ null)
51+
.buildRequest(getBaseRequest().getHeaders())
52+
.post(newDevice, 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 IDeviceCollectionReferenceRequest expand(final String value) {
61+
addQueryOption(new com.microsoft.graph.options.QueryOption("$expand", value));
62+
return (DeviceCollectionReferenceRequest)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 IDeviceCollectionReferenceRequest filter(final String value) {
72+
addQueryOption(new com.microsoft.graph.options.QueryOption("$filter", value));
73+
return (DeviceCollectionReferenceRequest)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 IDeviceCollectionReferenceRequest orderBy(final String value) {
83+
addQueryOption(new com.microsoft.graph.options.QueryOption("$orderby", value));
84+
return (DeviceCollectionReferenceRequest)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 IDeviceCollectionReferenceRequest select(final String value) {
94+
addQueryOption(new com.microsoft.graph.options.QueryOption("$select", value));
95+
return (DeviceCollectionReferenceRequest)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 IDeviceCollectionReferenceRequest top(final int value) {
105+
addQueryOption(new com.microsoft.graph.options.QueryOption("$top", value + ""));
106+
return (DeviceCollectionReferenceRequest)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.Group;
11+
import com.microsoft.graph.models.extensions.Device;
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 Device Collection Reference Request Builder.
22+
*/
23+
public class DeviceCollectionReferenceRequestBuilder extends BaseRequestBuilder implements IDeviceCollectionReferenceRequestBuilder {
24+
25+
/**
26+
* The request builder for this collection of Group
27+
*
28+
* @param requestUrl the request URL
29+
* @param client the service client
30+
* @param requestOptions the options for this request
31+
*/
32+
public DeviceCollectionReferenceRequestBuilder(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 IDeviceCollectionReferenceRequest 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 IDeviceCollectionReferenceRequest buildRequest(final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
53+
return new DeviceCollectionReferenceRequest(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.Group;
11+
import com.microsoft.graph.models.extensions.Device;
12+
import java.util.Arrays;
13+
import java.util.EnumSet;
14+
15+
import com.microsoft.graph.requests.extensions.IDeviceCollectionWithReferencesRequestBuilder;
16+
import com.microsoft.graph.requests.extensions.IDeviceCollectionWithReferencesPage;
17+
import com.microsoft.graph.requests.extensions.DeviceCollectionResponse;
18+
import com.microsoft.graph.models.extensions.Device;
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 Device Collection With References Page.
28+
*/
29+
public class DeviceCollectionWithReferencesPage extends BaseCollectionPage<Device, IDeviceCollectionWithReferencesRequestBuilder> implements IDeviceCollectionWithReferencesPage {
30+
31+
/**
32+
* A collection page for Device
33+
*
34+
* @param response the serialized DeviceCollectionResponse from the service
35+
* @param builder the request builder for the next collection page
36+
*/
37+
public DeviceCollectionWithReferencesPage(final DeviceCollectionResponse response, final IDeviceCollectionWithReferencesRequestBuilder 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.Group;
11+
import com.microsoft.graph.models.extensions.Device;
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 Device Collection With References Request.
24+
*/
25+
public class DeviceCollectionWithReferencesRequest extends BaseCollectionRequest<DeviceCollectionResponse, IDeviceCollectionPage> implements IDeviceCollectionWithReferencesRequest {
26+
27+
/**
28+
* The request builder for this collection of Device
29+
*
30+
* @param requestUrl the request URL
31+
* @param client the service client
32+
* @param requestOptions the options for this request
33+
*/
34+
public DeviceCollectionWithReferencesRequest(final String requestUrl, IBaseClient client, final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
35+
super(requestUrl, client, requestOptions, DeviceCollectionResponse.class, IDeviceCollectionPage.class);
36+
}
37+
38+
public void get(final ICallback<? super IDeviceCollectionWithReferencesPage> 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 IDeviceCollectionWithReferencesPage get() throws ClientException {
53+
final DeviceCollectionResponse response = send();
54+
return buildFromResponse(response);
55+
}
56+
57+
public IDeviceCollectionWithReferencesRequest expand(final String value) {
58+
addQueryOption(new com.microsoft.graph.options.QueryOption("$expand", value));
59+
return this;
60+
}
61+
62+
public IDeviceCollectionWithReferencesRequest filter(final String value) {
63+
addQueryOption(new com.microsoft.graph.options.QueryOption("$filter", value));
64+
return this;
65+
}
66+
67+
public IDeviceCollectionWithReferencesRequest orderBy(final String value) {
68+
addQueryOption(new com.microsoft.graph.options.QueryOption("$orderby", value));
69+
return this;
70+
}
71+
72+
public IDeviceCollectionWithReferencesRequest select(final String value) {
73+
addQueryOption(new com.microsoft.graph.options.QueryOption("$select", value));
74+
return this;
75+
}
76+
77+
public IDeviceCollectionWithReferencesRequest top(final int value) {
78+
addQueryOption(new com.microsoft.graph.options.QueryOption("$top", value + ""));
79+
return this;
80+
}
81+
82+
public IDeviceCollectionWithReferencesPage buildFromResponse(final DeviceCollectionResponse response) {
83+
final IDeviceCollectionWithReferencesRequestBuilder builder;
84+
if (response.nextLink != null) {
85+
builder = new DeviceCollectionWithReferencesRequestBuilder(response.nextLink, getBaseRequest().getClient(), /* options */ null);
86+
} else {
87+
builder = null;
88+
}
89+
final DeviceCollectionWithReferencesPage page = new DeviceCollectionWithReferencesPage(response, builder);
90+
page.setRawObject(response.getSerializer(), response.getRawObject());
91+
return page;
92+
}
93+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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.Group;
11+
import com.microsoft.graph.models.extensions.Device;
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 Device Collection With References Request Builder.
22+
*/
23+
public class DeviceCollectionWithReferencesRequestBuilder extends BaseRequestBuilder implements IDeviceCollectionWithReferencesRequestBuilder {
24+
25+
/**
26+
* The request builder for this collection of Group
27+
*
28+
* @param requestUrl the request URL
29+
* @param client the service client
30+
* @param requestOptions the options for this request
31+
*/
32+
public DeviceCollectionWithReferencesRequestBuilder(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 IDeviceCollectionWithReferencesRequest 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 IDeviceCollectionWithReferencesRequest buildRequest(final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
53+
return new DeviceCollectionWithReferencesRequest(getRequestUrl(), getClient(), requestOptions);
54+
}
55+
56+
public IDeviceWithReferenceRequestBuilder byId(final String id) {
57+
return new DeviceWithReferenceRequestBuilder(getRequestUrlWithAdditionalSegment(id), getClient(), getOptions());
58+
}
59+
60+
public IDeviceCollectionReferenceRequestBuilder references(){
61+
return new DeviceCollectionReferenceRequestBuilder(getRequestUrl() + "/$ref", getClient(), getOptions());
62+
}
63+
}

0 commit comments

Comments
 (0)