Skip to content

Commit 97d616a

Browse files
committed
- adds composable collection test items
1 parent 6ee78f9 commit 97d616a

File tree

7 files changed

+342
-0
lines changed

7 files changed

+342
-0
lines changed

test/Typewriter.Test/Metadata/MetadataMultipleNamespaces.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,11 @@
278278
<Parameter Name="value" Type="graph.identitySet" />
279279
<ReturnType Type="Collection(microsoft.graph2.callRecords.session)" />
280280
</Action>
281+
<Function Name="item" IsBound="true" IsComposable="true">
282+
<Parameter Name="bindparameter" Type="Collection(microsoft.graph2.callRecords.callRecord)" />
283+
<Parameter Name="name" Type="Edm.String" Unicode="false" />
284+
<ReturnType Type="microsoft.graph2.callRecords.callRecord" />
285+
</Function>
281286
</Schema>
282287
</edmx:DataServices>
283288
</edmx:Edmx>

test/Typewriter.Test/TestDataJava/com/microsoft/graph2/callrecords/requests/extensions/CallRecordCollectionRequestBuilder.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import com.microsoft.graph2.callrecords.requests.extensions.ICallRecordCollectionRequestBuilder;
1616
import com.microsoft.graph2.callrecords.requests.extensions.ICallRecordRequestBuilder;
1717
import com.microsoft.graph2.callrecords.requests.extensions.ICallRecordCollectionRequest;
18+
import com.microsoft.graph2.callrecords.requests.extensions.ICallRecordItemRequestBuilder;
1819
import com.microsoft.graph.http.BaseRequestBuilder;
1920
import com.microsoft.graph.core.IBaseClient;
2021

@@ -49,4 +50,8 @@ public ICallRecordRequestBuilder byId(final String id) {
4950
}
5051

5152

53+
54+
public ICallRecordItemRequestBuilder item(final String name) {
55+
return new CallRecordItemRequestBuilder(getRequestUrlWithAdditionalSegment("microsoft.graph2.callRecords.item"), getClient(), null, name);
56+
}
5257
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
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.graph2.callrecords.requests.extensions;
6+
import com.microsoft.graph2.callrecords.models.extensions.CallRecord;
7+
import com.microsoft.graph2.callrecords.requests.extensions.ICallRecordItemRequest;
8+
import com.microsoft.graph2.callrecords.requests.extensions.CallRecordItemRequest;
9+
10+
import com.microsoft.graph.concurrency.ICallback;
11+
import com.microsoft.graph.concurrency.IExecutors;
12+
import com.microsoft.graph.core.ClientException;
13+
import com.microsoft.graph.core.IBaseClient;
14+
import com.microsoft.graph.http.BaseRequest;
15+
import com.microsoft.graph.http.HttpMethod;
16+
17+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
18+
19+
/**
20+
* The class for the Call Record Item Request.
21+
*/
22+
public class CallRecordItemRequest extends BaseRequest implements ICallRecordItemRequest {
23+
24+
/**
25+
* The request for this CallRecordItem
26+
*
27+
* @param requestUrl the request URL
28+
* @param client the service client
29+
* @param requestOptions the options for this request
30+
*/
31+
public CallRecordItemRequest(final String requestUrl, final IBaseClient client, final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
32+
super(requestUrl, client, requestOptions, CallRecord.class);
33+
}
34+
35+
/**
36+
* Patches the CallRecordItem
37+
* @param srcCallRecord the CallRecord with which to PATCH
38+
* @param callback the callback to be called after success or failure
39+
*/
40+
public void patch(CallRecord srcCallRecord, final ICallback<CallRecord> callback) {
41+
send(HttpMethod.PATCH, callback, srcCallRecord);
42+
}
43+
44+
/**
45+
* Patches the CallRecordItem
46+
*
47+
* @param srcCallRecord the CallRecord with which to PATCH
48+
* @return the CallRecord
49+
* @throws ClientException an exception occurs if there was an error while the request was sent
50+
*/
51+
public CallRecord patch(CallRecord srcCallRecord) throws ClientException {
52+
return this.send(HttpMethod.PATCH, srcCallRecord);
53+
}
54+
55+
/**
56+
* Puts the CallRecordItem
57+
*
58+
* @param srcCallRecord the CallRecord to PUT
59+
* @param callback the callback to be called after success or failure
60+
*/
61+
public void put(CallRecord srcCallRecord, final ICallback<CallRecord> callback) {
62+
send(HttpMethod.PUT, callback, srcCallRecord);
63+
}
64+
65+
/**
66+
* Puts the CallRecordItem
67+
*
68+
* @param srcCallRecord the CallRecord to PUT
69+
* @return the CallRecord
70+
* @throws ClientException an exception occurs if there was an error while the request was sent
71+
*/
72+
public CallRecord put(CallRecord srcCallRecord) throws ClientException {
73+
return this.send(HttpMethod.PUT, srcCallRecord);
74+
}
75+
/**
76+
* Gets the CallRecord
77+
*
78+
* @param callback the callback to be called after success or failure
79+
*/
80+
public void get(final ICallback<CallRecord> callback) {
81+
send(HttpMethod.GET, callback, null);
82+
}
83+
84+
/**
85+
* Gets the CallRecord
86+
*
87+
* @return the CallRecord
88+
* @throws ClientException an exception occurs if there was an error while the request was sent
89+
*/
90+
public CallRecord get() throws ClientException {
91+
return send(HttpMethod.GET, null);
92+
}
93+
94+
/**
95+
* Sets the select clause for the request
96+
*
97+
* @param value the select clause
98+
* @return the updated request
99+
*/
100+
public ICallRecordItemRequest select(final String value) {
101+
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$select", value));
102+
return (CallRecordItemRequest)this;
103+
}
104+
105+
/**
106+
* Sets the expand clause for the request
107+
*
108+
* @param value the expand clause
109+
* @return the updated request
110+
*/
111+
public ICallRecordItemRequest expand(final String value) {
112+
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$expand", value));
113+
return (CallRecordItemRequest)this;
114+
}
115+
116+
/**
117+
* Sets the filter clause for the request
118+
*
119+
* @param value the filter clause
120+
* @return the updated request
121+
*/
122+
public ICallRecordItemRequest filter(final String value) {
123+
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$filter", value));
124+
return (CallRecordItemRequest)this;
125+
}
126+
127+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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.graph2.callrecords.requests.extensions;
6+
import com.microsoft.graph2.callrecords.requests.extensions.ICallRecordItemRequest;
7+
import com.microsoft.graph2.callrecords.requests.extensions.CallRecordItemRequest;
8+
import com.microsoft.graph2.callrecords.models.extensions.CallRecord;
9+
import com.microsoft.graph.core.BaseActionRequestBuilder;
10+
import com.microsoft.graph.core.BaseFunctionRequestBuilder;
11+
import com.microsoft.graph.core.IBaseClient;
12+
import com.google.gson.JsonElement;
13+
14+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
15+
16+
/**
17+
* The class for the Call Record Item Request Builder.
18+
*/
19+
public class CallRecordItemRequestBuilder extends BaseFunctionRequestBuilder implements ICallRecordItemRequestBuilder {
20+
21+
/**
22+
* The request builder for this CallRecordItem
23+
*
24+
* @param requestUrl the request URL
25+
* @param client the service client
26+
* @param requestOptions the options for this request
27+
* @param name the name
28+
*/
29+
public CallRecordItemRequestBuilder(final String requestUrl, final IBaseClient client, final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions, final String name) {
30+
super(requestUrl, client, requestOptions);
31+
functionOptions.add(new com.microsoft.graph.options.FunctionOption("name", name));
32+
}
33+
34+
/**
35+
* Creates the ICallRecordItemRequest
36+
*
37+
* @return the ICallRecordItemRequest instance
38+
*/
39+
public ICallRecordItemRequest buildRequest() {
40+
return buildRequest(getOptions());
41+
}
42+
43+
/**
44+
* Creates the ICallRecordItemRequest with specific requestOptions instead of the existing requestOptions
45+
*
46+
* @param requestOptions the options for the request
47+
* @return the ICallRecordItemRequest instance
48+
*/
49+
public ICallRecordItemRequest buildRequest(final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
50+
CallRecordItemRequest request = new CallRecordItemRequest(
51+
getRequestUrl(),
52+
getClient(),
53+
requestOptions
54+
);
55+
56+
for (com.microsoft.graph.options.FunctionOption option : functionOptions) {
57+
request.addFunctionOption(option);
58+
}
59+
60+
return request;
61+
}
62+
public ISessionCollectionRequestBuilder sessions() {
63+
return new SessionCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("sessions"), getClient(), null);
64+
}
65+
66+
public ISessionRequestBuilder sessions(final String id) {
67+
return new SessionRequestBuilder(getRequestUrlWithAdditionalSegment("sessions") + "/" + id, getClient(), null);
68+
}
69+
public IEntityType2CollectionRequestBuilder recipients() {
70+
return new EntityType2CollectionRequestBuilder(getRequestUrlWithAdditionalSegment("recipients"), getClient(), null);
71+
}
72+
73+
public IEntityType2RequestBuilder recipients(final String id) {
74+
return new EntityType2RequestBuilder(getRequestUrlWithAdditionalSegment("recipients") + "/" + id, getClient(), null);
75+
}
76+
}

test/Typewriter.Test/TestDataJava/com/microsoft/graph2/callrecords/requests/extensions/ICallRecordCollectionRequestBuilder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import com.microsoft.graph2.callrecords.requests.extensions.ICallRecordRequestBuilder;
1616
import com.microsoft.graph2.callrecords.requests.extensions.ICallRecordCollectionRequest;
17+
import com.microsoft.graph2.callrecords.requests.extensions.ICallRecordItemRequestBuilder;
1718
import com.microsoft.graph.http.IBaseCollectionPage;
1819

1920
// **NOTE** This file was generated by a tool and any changes will be overwritten.
@@ -29,4 +30,5 @@ public interface ICallRecordCollectionRequestBuilder extends IRequestBuilder {
2930

3031
ICallRecordRequestBuilder byId(final String id);
3132

33+
ICallRecordItemRequestBuilder item(final String name);
3234
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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.graph2.callrecords.requests.extensions;
6+
import com.microsoft.graph2.callrecords.models.extensions.CallRecord;
7+
import com.microsoft.graph2.callrecords.requests.extensions.ICallRecordItemRequest;
8+
9+
import com.microsoft.graph.concurrency.ICallback;
10+
import com.microsoft.graph.concurrency.IExecutors;
11+
import com.microsoft.graph.core.ClientException;
12+
import com.microsoft.graph.core.IBaseClient;
13+
import com.microsoft.graph.http.BaseRequest;
14+
import com.microsoft.graph.http.HttpMethod;
15+
import com.microsoft.graph.http.IHttpRequest;
16+
17+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
18+
19+
/**
20+
* The interface for the Call Record Item Request.
21+
*/
22+
public interface ICallRecordItemRequest extends IHttpRequest {
23+
24+
/**
25+
* Patches the CallRecordItem
26+
*
27+
* @param srcCallRecord the CallRecord with which to PATCH
28+
* @param callback the callback to be called after success or failure
29+
*/
30+
void patch(CallRecord srcCallRecord, final ICallback<CallRecord> callback);
31+
32+
/**
33+
* Patches the CallRecordItem
34+
*
35+
* @param srcCallRecord the CallRecord with which to PATCH
36+
* @return the CallRecord
37+
* @throws ClientException an exception occurs if there was an error while the request was sent
38+
*/
39+
CallRecord patch(CallRecord srcCallRecord) throws ClientException;
40+
41+
/**
42+
* Puts the CallRecordItem
43+
*
44+
* @param srcCallRecord the CallRecord to PUT
45+
* @param callback the callback to be called after success or failure
46+
*/
47+
void put(CallRecord srcCallRecord, final ICallback<CallRecord> callback);
48+
49+
/**
50+
* Puts the CallRecordItem
51+
*
52+
* @param srcCallRecord the CallRecord to PUT
53+
* @return the CallRecord
54+
* @throws ClientException an exception occurs if there was an error while the request was sent
55+
*/
56+
CallRecord put(CallRecord srcCallRecord) throws ClientException;
57+
/**
58+
* Gets the CallRecord
59+
*
60+
* @param callback the callback to be called after success or failure
61+
*/
62+
void get(final ICallback<CallRecord> callback);
63+
64+
/**
65+
* Gets the CallRecord
66+
*
67+
* @return the CallRecord
68+
* @throws ClientException an exception occurs if there was an error while the request was sent
69+
*/
70+
CallRecord get() throws ClientException;
71+
72+
/**
73+
* Sets the select clause for the request
74+
*
75+
* @param value the select clause
76+
* @return the updated request
77+
*/
78+
ICallRecordItemRequest select(final String value);
79+
80+
/**
81+
* Sets the expand clause for the request
82+
*
83+
* @param value the expand clause
84+
* @return the updated request
85+
*/
86+
ICallRecordItemRequest expand(final String value);
87+
88+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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.graph2.callrecords.requests.extensions;
6+
import com.microsoft.graph2.callrecords.requests.extensions.ICallRecordItemRequest;
7+
8+
import com.microsoft.graph.http.IRequestBuilder;
9+
10+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
11+
12+
/**
13+
* The interface for the Call Record Item Request Builder.
14+
*/
15+
public interface ICallRecordItemRequestBuilder extends IRequestBuilder {
16+
17+
/**
18+
* Creates the ICallRecordItemRequest
19+
*
20+
* @return the ICallRecordItemRequest instance
21+
*/
22+
ICallRecordItemRequest buildRequest();
23+
24+
/**
25+
* Creates the ICallRecordItemRequest with specific options instead of the existing options
26+
*
27+
* @param requestOptions the options for the request
28+
* @return the ICallRecordItemRequest instance
29+
*/
30+
ICallRecordItemRequest buildRequest(final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions);
31+
32+
ISessionCollectionRequestBuilder sessions();
33+
34+
ISessionRequestBuilder sessions(final String id);
35+
36+
IEntityType2CollectionRequestBuilder recipients();
37+
38+
IEntityType2RequestBuilder recipients(final String id);
39+
}

0 commit comments

Comments
 (0)