Skip to content

Commit 5e52d42

Browse files
committed
remove option.* and add fully qualified name for QueryOption
1 parent 7c4020e commit 5e52d42

34 files changed

+142
-144
lines changed

Templates/Java/requests_extensions/BaseEntityCollectionReferenceRequest.java.tt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
* @return the updated request
5656
*/
5757
public <#=c.ITypeCollectionReferenceRequest()#> expand(final String value) {
58-
addQueryOption(new QueryOption("$expand", value));
58+
addQueryOption(new com.microsoft.graph.options.QueryOption("$expand", value));
5959
return (<#=c.TypeCollectionReferenceRequest()#>)this;
6060
}
6161

@@ -68,7 +68,7 @@
6868
* @return the updated request
6969
*/
7070
public <#=c.ITypeCollectionReferenceRequest()#> select(final String value) {
71-
addQueryOption(new QueryOption("$select", value));
71+
addQueryOption(new com.microsoft.graph.options.QueryOption("$select", value));
7272
return (<#=c.TypeCollectionReferenceRequest()#>)this;
7373
}
7474

@@ -81,7 +81,7 @@
8181
* @return the updated request
8282
*/
8383
public <#=c.ITypeCollectionReferenceRequest()#> top(final int value) {
84-
addQueryOption(new QueryOption("$top", value + ""));
84+
addQueryOption(new com.microsoft.graph.options.QueryOption("$top", value + ""));
8585
return (<#=c.TypeCollectionReferenceRequest()#>)this;
8686
}
8787
<# } #>

Templates/Java/requests_extensions/BaseEntityCollectionRequest.java.tt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
* @return the updated request
6161
*/
6262
public <#=c.ITypeCollectionRequest()#> expand(final String value) {
63-
addQueryOption(new QueryOption("$expand", value));
63+
addQueryOption(new com.microsoft.graph.options.QueryOption("$expand", value));
6464
return (<#=c.TypeCollectionRequest()#>)this;
6565
}
6666

@@ -73,7 +73,7 @@
7373
* @return the updated request
7474
*/
7575
public <#=c.ITypeCollectionRequest()#> select(final String value) {
76-
addQueryOption(new QueryOption("$select", value));
76+
addQueryOption(new com.microsoft.graph.options.QueryOption("$select", value));
7777
return (<#=c.TypeCollectionRequest()#>)this;
7878
}
7979

@@ -86,7 +86,7 @@
8686
* @return the updated request
8787
*/
8888
public <#=c.ITypeCollectionRequest()#> top(final int value) {
89-
addQueryOption(new QueryOption("$top", value + ""));
89+
addQueryOption(new com.microsoft.graph.options.QueryOption("$top", value + ""));
9090
return (<#=c.TypeCollectionRequest()#>)this;
9191
}
9292

Templates/Java/requests_extensions/BaseEntityCollectionWithReferencesRequest.java.tt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@
4040

4141
<# if (c.GetFeatures().CanExpand) { #>
4242
public <#=c.ITypeCollectionRequest()#> expand(final String value) {
43-
addQueryOption(new QueryOption("$expand", value));
43+
addQueryOption(new com.microsoft.graph.options.QueryOption("$expand", value));
4444
return (<#=c.TypeCollectionRequest()#>)this;
4545
}
4646

4747
<# } #>
4848
<# if (c.GetFeatures().CanSelect) { #>
4949
public <#=c.ITypeCollectionRequest()#> select(final String value) {
50-
addQueryOption(new QueryOption("$select", value));
50+
addQueryOption(new com.microsoft.graph.options.QueryOption("$select", value));
5151
return (<#=c.TypeCollectionRequest()#>)this;
5252
}
5353

5454
<# } #>
5555
<# if (c.GetFeatures().CanUseTop) { #>
5656
public <#=c.ITypeCollectionRequest()#> top(final int value) {
57-
addQueryOption(new QueryOption("$top", value + ""));
57+
addQueryOption(new com.microsoft.graph.options.QueryOption("$top", value + ""));
5858
return (<#=c.TypeCollectionRequest()#>)this;
5959
}
6060

Templates/Java/requests_extensions/BaseEntityReferenceRequest.java.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* @return the updated request
3636
*/
3737
public <#=c.ITypeReferenceRequest()#> select(final String value) {
38-
getQueryOptions().add(new QueryOption("$select", value));
38+
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$select", value));
3939
return (<#=c.TypeReferenceRequest()#>)this;
4040
}
4141

@@ -48,7 +48,7 @@
4848
* @return the updated request
4949
*/
5050
public <#=c.ITypeReferenceRequest()#> expand(final String value) {
51-
getQueryOptions().add(new QueryOption("$expand", value));
51+
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$expand", value));
5252
return (<#=c.TypeReferenceRequest()#>)this;
5353
}
5454
<# } #>

Templates/Java/requests_extensions/BaseEntityWithReferenceRequest.java.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
* @return the updated request
6565
*/
6666
public <#=c.ITypeWithReferencesRequest()#> select(final String value) {
67-
getQueryOptions().add(new QueryOption("$select", value));
67+
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$select", value));
6868
return (<#=c.ITypeWithReferencesRequest()#>)this;
6969
}
7070

@@ -77,7 +77,7 @@
7777
* @return the updated request
7878
*/
7979
public <#=c.ITypeWithReferencesRequest()#> expand(final String value) {
80-
getQueryOptions().add(new QueryOption("$expand", value));
80+
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$expand", value));
8181
return (<#=c.TypeWithReferencesRequest()#>)this;
8282
}
8383
<# } #>

Templates/Java/requests_extensions/BaseMethodCollectionRequest.java.tt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
* @return the updated request
101101
*/
102102
public <#=c.ITypeCollectionRequest()#> select(final String value) {
103-
addQueryOption(new QueryOption("$select", value));
103+
addQueryOption(new com.microsoft.graph.options.QueryOption("$select", value));
104104
return (<#=c.ITypeCollectionRequest()#>)this;
105105
}
106106

@@ -113,7 +113,7 @@
113113
* @return the updated request
114114
*/
115115
public <#=c.ITypeCollectionRequest()#> top(final int value) {
116-
addQueryOption(new QueryOption("$top", value+""));
116+
addQueryOption(new com.microsoft.graph.options.QueryOption("$top", value+""));
117117
return (<#=c.ITypeCollectionRequest()#>)this;
118118
}
119119

@@ -126,7 +126,7 @@
126126
* @return the updated request
127127
*/
128128
public <#=c.ITypeCollectionRequest()#> expand(final String value) {
129-
addQueryOption(new QueryOption("$expand", value));
129+
addQueryOption(new com.microsoft.graph.options.QueryOption("$expand", value));
130130
return (<#=c.ITypeCollectionRequest()#>)this;
131131
}
132132

src/GraphODataTemplateWriter/CodeHelpers/Java/TypeHelperJava.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,6 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
10131013
sb.AppendFormat(@"import {0}.concurrency.*;
10141014
import {0}.core.*;
10151015
import {0}.http.*;
1016-
import {0}.options.*;
10171016
import {0}.serializer.*;
10181017
import java.util.Arrays;
10191018
import java.util.EnumSet;", host.CurrentModel.GetNamespace().NamespaceName());
@@ -1137,7 +1136,6 @@ public static string CreatePackageDef(this CustomT4Host host)
11371136
import {0}.models.generated.*;{3}{4}
11381137
import {2}.http.*;
11391138
import {0}.requests.extensions.*;
1140-
import {2}.options.*;
11411139
import {2}.serializer.*;
11421140
11431141
import java.util.Arrays;

test/Typewriter.Test/TestDataCSharp/com/Microsoft/Graph/Requests/CallRequest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public async System.Threading.Tasks.Task<Call> UpdateAsync(Call callToUpdate, Ca
161161
/// <returns>The request object to send.</returns>
162162
public ICallRequest Expand(string value)
163163
{
164-
this.QueryOptions.Add(new QueryOption("$expand", value));
164+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$expand", value));
165165
return this;
166166
}
167167

@@ -184,7 +184,7 @@ public ICallRequest Expand(Expression<Func<Call, object>> expandExpression)
184184
}
185185
else
186186
{
187-
this.QueryOptions.Add(new QueryOption("$expand", value));
187+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$expand", value));
188188
}
189189
return this;
190190
}
@@ -196,7 +196,7 @@ public ICallRequest Expand(Expression<Func<Call, object>> expandExpression)
196196
/// <returns>The request object to send.</returns>
197197
public ICallRequest Select(string value)
198198
{
199-
this.QueryOptions.Add(new QueryOption("$select", value));
199+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$select", value));
200200
return this;
201201
}
202202

@@ -219,7 +219,7 @@ public ICallRequest Select(Expression<Func<Call, object>> selectExpression)
219219
}
220220
else
221221
{
222-
this.QueryOptions.Add(new QueryOption("$select", value));
222+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$select", value));
223223
}
224224
return this;
225225
}

test/Typewriter.Test/TestDataCSharp/com/Microsoft/Graph/Requests/CallWithReferenceRequest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public async System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellat
158158
/// <returns>The request object to send.</returns>
159159
public ICallWithReferenceRequest Expand(string value)
160160
{
161-
this.QueryOptions.Add(new QueryOption("$expand", value));
161+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$expand", value));
162162
return this;
163163
}
164164

@@ -181,7 +181,7 @@ public ICallWithReferenceRequest Expand(Expression<Func<Call, object>> expandExp
181181
}
182182
else
183183
{
184-
this.QueryOptions.Add(new QueryOption("$expand", value));
184+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$expand", value));
185185
}
186186
return this;
187187
}
@@ -193,7 +193,7 @@ public ICallWithReferenceRequest Expand(Expression<Func<Call, object>> expandExp
193193
/// <returns>The request object to send.</returns>
194194
public ICallWithReferenceRequest Select(string value)
195195
{
196-
this.QueryOptions.Add(new QueryOption("$select", value));
196+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$select", value));
197197
return this;
198198
}
199199

@@ -216,7 +216,7 @@ public ICallWithReferenceRequest Select(Expression<Func<Call, object>> selectExp
216216
}
217217
else
218218
{
219-
this.QueryOptions.Add(new QueryOption("$select", value));
219+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$select", value));
220220
}
221221
return this;
222222
}

test/Typewriter.Test/TestDataCSharp/com/Microsoft/Graph/Requests/CloudCommunicationsCallRecordsCollectionRequest.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public async System.Threading.Tasks.Task<ICloudCommunicationsCallRecordsCollecti
108108
/// <returns>The request object to send.</returns>
109109
public ICloudCommunicationsCallRecordsCollectionRequest Expand(string value)
110110
{
111-
this.QueryOptions.Add(new QueryOption("$expand", value));
111+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$expand", value));
112112
return this;
113113
}
114114

@@ -131,7 +131,7 @@ public ICloudCommunicationsCallRecordsCollectionRequest Expand(Expression<Func<M
131131
}
132132
else
133133
{
134-
this.QueryOptions.Add(new QueryOption("$expand", value));
134+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$expand", value));
135135
}
136136
return this;
137137
}
@@ -143,7 +143,7 @@ public ICloudCommunicationsCallRecordsCollectionRequest Expand(Expression<Func<M
143143
/// <returns>The request object to send.</returns>
144144
public ICloudCommunicationsCallRecordsCollectionRequest Select(string value)
145145
{
146-
this.QueryOptions.Add(new QueryOption("$select", value));
146+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$select", value));
147147
return this;
148148
}
149149

@@ -166,7 +166,7 @@ public ICloudCommunicationsCallRecordsCollectionRequest Select(Expression<Func<M
166166
}
167167
else
168168
{
169-
this.QueryOptions.Add(new QueryOption("$select", value));
169+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$select", value));
170170
}
171171
return this;
172172
}
@@ -178,7 +178,7 @@ public ICloudCommunicationsCallRecordsCollectionRequest Select(Expression<Func<M
178178
/// <returns>The request object to send.</returns>
179179
public ICloudCommunicationsCallRecordsCollectionRequest Top(int value)
180180
{
181-
this.QueryOptions.Add(new QueryOption("$top", value.ToString()));
181+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$top", value.ToString()));
182182
return this;
183183
}
184184

@@ -189,7 +189,7 @@ public ICloudCommunicationsCallRecordsCollectionRequest Top(int value)
189189
/// <returns>The request object to send.</returns>
190190
public ICloudCommunicationsCallRecordsCollectionRequest Filter(string value)
191191
{
192-
this.QueryOptions.Add(new QueryOption("$filter", value));
192+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$filter", value));
193193
return this;
194194
}
195195

@@ -200,7 +200,7 @@ public ICloudCommunicationsCallRecordsCollectionRequest Filter(string value)
200200
/// <returns>The request object to send.</returns>
201201
public ICloudCommunicationsCallRecordsCollectionRequest Skip(int value)
202202
{
203-
this.QueryOptions.Add(new QueryOption("$skip", value.ToString()));
203+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$skip", value.ToString()));
204204
return this;
205205
}
206206

@@ -211,7 +211,7 @@ public ICloudCommunicationsCallRecordsCollectionRequest Skip(int value)
211211
/// <returns>The request object to send.</returns>
212212
public ICloudCommunicationsCallRecordsCollectionRequest OrderBy(string value)
213213
{
214-
this.QueryOptions.Add(new QueryOption("$orderby", value));
214+
this.QueryOptions.Add(new com.microsoft.graph.options.QueryOption("$orderby", value));
215215
return this;
216216
}
217217
}

0 commit comments

Comments
 (0)