|
6 | 6 | <#=writer.WriteHeader()#> |
7 | 7 | <#=CreatePackageDef(host)#> |
8 | 8 |
|
| 9 | +import com.microsoft.graph.requests.extensions.<#=ITypeCollectionRequestBuilder(c)#>; |
| 10 | +import com.microsoft.graph.requests.extensions.<#=TypeCollectionPage(c)#>; |
| 11 | +import com.microsoft.graph.requests.extensions.<#=TypeCollectionResponse(c)#>; |
| 12 | +<# if (c.AsOdcmMethod().IsAction() && c.AsOdcmMethod().Parameters.Any()) { #> |
| 13 | +import com.microsoft.graph.models.extensions.<#=TypeBody(c)#>; |
| 14 | +<# } #> |
| 15 | +<# if (ShouldIncludeCollectionTypeReference(c)) { #> |
| 16 | +import com.microsoft.graph.models.<#=OdcmMethodReturnNamespaceSection(c as OdcmMethod)#>.<#=OdcmMethodReturnType(c as OdcmMethod)#>; |
| 17 | +<# } #> |
| 18 | +<# foreach (var method in c.AsOdcmMethod().WithOverloads()) { |
| 19 | + var parameterList = MethodParametersImports(method); |
| 20 | + if (parameterList != "") { |
| 21 | +#> |
| 22 | +<#=parameterList#> |
| 23 | +<# |
| 24 | + } |
| 25 | +} |
| 26 | +#> |
| 27 | +import com.microsoft.graph.concurrency.ICallback; |
| 28 | +import com.microsoft.graph.core.ClientException; |
| 29 | +import com.microsoft.graph.options.QueryOption; |
| 30 | +import com.microsoft.graph.options.Option; |
| 31 | +import com.microsoft.graph.core.IBaseClient; |
| 32 | +import com.microsoft.graph.http.BaseCollectionRequest; |
| 33 | +import com.microsoft.graph.concurrency.IExecutors; |
| 34 | + |
9 | 35 | <#=CreateClassDef(TypeCollectionRequest(c),"BaseCollectionRequest" + CollectionRequestGeneric(c), ITypeCollectionRequest(c))#> |
10 | 36 |
|
11 | | -<# if (c.AsOdcmMethod().IsAction()) { #> |
| 37 | +<# if (c.AsOdcmMethod().IsAction() && c.AsOdcmMethod().Parameters.Any()) { #> |
12 | 38 |
|
13 | 39 | protected final <#=TypeBody(c)#> body; |
14 | 40 |
|
|
27 | 53 | <# } else { #> |
28 | 54 | super(requestUrl, client, requestOptions, null); |
29 | 55 | <# } #> |
30 | | -<# if (c.AsOdcmMethod().IsAction()) { #> |
| 56 | +<# if (c.AsOdcmMethod().IsAction() && c.AsOdcmMethod().Parameters.Any()) { #> |
31 | 57 | body = new <#=TypeBody(c)#>(); |
32 | 58 | <# } #> |
33 | 59 | } |
|
49 | 75 | } |
50 | 76 |
|
51 | 77 | public <#=ITypeCollectionPage(c)#> post() throws ClientException { |
52 | | -<# if (c.AsOdcmMethod().IsAction()) { #> |
| 78 | +<# if (c.AsOdcmMethod().IsAction() && c.AsOdcmMethod().Parameters.Any()) { #> |
53 | 79 | final <#=TypeCollectionResponse(c)#> response = post(body); |
54 | 80 | <# } else { #> |
55 | | - final <#=TypeCollectionResponse(c)#> response = post(); |
| 81 | + final <#=TypeCollectionResponse(c)#> response = super.post(null); |
56 | 82 | <# } #> |
57 | 83 | return buildFromResponse(response); |
58 | 84 | } |
|
0 commit comments