Skip to content

Commit f35bebc

Browse files
authored
Generated from dad49351288e4f30220300156d2cfccf9055a949 (#2521)
Fix operation named missed in #3947
1 parent 29d9389 commit f35bebc

File tree

1 file changed

+21
-21
lines changed
  • azure-graphrbac/src/main/java/com/microsoft/azure/graphrbac/implementation

1 file changed

+21
-21
lines changed

azure-graphrbac/src/main/java/com/microsoft/azure/graphrbac/implementation/OAuth2sInner.java

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ interface OAuth2sService {
5858
@GET("{tenantID}/oauth2PermissionGrants")
5959
Observable<Response<ResponseBody>> get(@Path("tenantID") String tenantID, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
6060

61-
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.graphrbac.OAuth2s post" })
61+
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.graphrbac.OAuth2s grant" })
6262
@POST("{tenantID}/oauth2PermissionGrants")
63-
Observable<Response<ResponseBody>> post(@Path("tenantID") String tenantID, @Body PermissionsInner body, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
63+
Observable<Response<ResponseBody>> grant(@Path("tenantID") String tenantID, @Body PermissionsInner body, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
6464

6565
}
6666

@@ -214,8 +214,8 @@ private ServiceResponse<PermissionsInner> getDelegate(Response<ResponseBody> res
214214
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
215215
* @return the PermissionsInner object if successful.
216216
*/
217-
public PermissionsInner post() {
218-
return postWithServiceResponseAsync().toBlocking().single().body();
217+
public PermissionsInner grant() {
218+
return grantWithServiceResponseAsync().toBlocking().single().body();
219219
}
220220

221221
/**
@@ -225,8 +225,8 @@ public PermissionsInner post() {
225225
* @throws IllegalArgumentException thrown if parameters fail the validation
226226
* @return the {@link ServiceFuture} object
227227
*/
228-
public ServiceFuture<PermissionsInner> postAsync(final ServiceCallback<PermissionsInner> serviceCallback) {
229-
return ServiceFuture.fromResponse(postWithServiceResponseAsync(), serviceCallback);
228+
public ServiceFuture<PermissionsInner> grantAsync(final ServiceCallback<PermissionsInner> serviceCallback) {
229+
return ServiceFuture.fromResponse(grantWithServiceResponseAsync(), serviceCallback);
230230
}
231231

232232
/**
@@ -235,8 +235,8 @@ public ServiceFuture<PermissionsInner> postAsync(final ServiceCallback<Permissio
235235
* @throws IllegalArgumentException thrown if parameters fail the validation
236236
* @return the observable to the PermissionsInner object
237237
*/
238-
public Observable<PermissionsInner> postAsync() {
239-
return postWithServiceResponseAsync().map(new Func1<ServiceResponse<PermissionsInner>, PermissionsInner>() {
238+
public Observable<PermissionsInner> grantAsync() {
239+
return grantWithServiceResponseAsync().map(new Func1<ServiceResponse<PermissionsInner>, PermissionsInner>() {
240240
@Override
241241
public PermissionsInner call(ServiceResponse<PermissionsInner> response) {
242242
return response.body();
@@ -250,20 +250,20 @@ public PermissionsInner call(ServiceResponse<PermissionsInner> response) {
250250
* @throws IllegalArgumentException thrown if parameters fail the validation
251251
* @return the observable to the PermissionsInner object
252252
*/
253-
public Observable<ServiceResponse<PermissionsInner>> postWithServiceResponseAsync() {
253+
public Observable<ServiceResponse<PermissionsInner>> grantWithServiceResponseAsync() {
254254
if (this.client.tenantID() == null) {
255255
throw new IllegalArgumentException("Parameter this.client.tenantID() is required and cannot be null.");
256256
}
257257
if (this.client.apiVersion() == null) {
258258
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
259259
}
260260
final PermissionsInner body = null;
261-
return service.post(this.client.tenantID(), body, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
261+
return service.grant(this.client.tenantID(), body, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
262262
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<PermissionsInner>>>() {
263263
@Override
264264
public Observable<ServiceResponse<PermissionsInner>> call(Response<ResponseBody> response) {
265265
try {
266-
ServiceResponse<PermissionsInner> clientResponse = postDelegate(response);
266+
ServiceResponse<PermissionsInner> clientResponse = grantDelegate(response);
267267
return Observable.just(clientResponse);
268268
} catch (Throwable t) {
269269
return Observable.error(t);
@@ -281,8 +281,8 @@ public Observable<ServiceResponse<PermissionsInner>> call(Response<ResponseBody>
281281
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
282282
* @return the PermissionsInner object if successful.
283283
*/
284-
public PermissionsInner post(PermissionsInner body) {
285-
return postWithServiceResponseAsync(body).toBlocking().single().body();
284+
public PermissionsInner grant(PermissionsInner body) {
285+
return grantWithServiceResponseAsync(body).toBlocking().single().body();
286286
}
287287

288288
/**
@@ -293,8 +293,8 @@ public PermissionsInner post(PermissionsInner body) {
293293
* @throws IllegalArgumentException thrown if parameters fail the validation
294294
* @return the {@link ServiceFuture} object
295295
*/
296-
public ServiceFuture<PermissionsInner> postAsync(PermissionsInner body, final ServiceCallback<PermissionsInner> serviceCallback) {
297-
return ServiceFuture.fromResponse(postWithServiceResponseAsync(body), serviceCallback);
296+
public ServiceFuture<PermissionsInner> grantAsync(PermissionsInner body, final ServiceCallback<PermissionsInner> serviceCallback) {
297+
return ServiceFuture.fromResponse(grantWithServiceResponseAsync(body), serviceCallback);
298298
}
299299

300300
/**
@@ -304,8 +304,8 @@ public ServiceFuture<PermissionsInner> postAsync(PermissionsInner body, final Se
304304
* @throws IllegalArgumentException thrown if parameters fail the validation
305305
* @return the observable to the PermissionsInner object
306306
*/
307-
public Observable<PermissionsInner> postAsync(PermissionsInner body) {
308-
return postWithServiceResponseAsync(body).map(new Func1<ServiceResponse<PermissionsInner>, PermissionsInner>() {
307+
public Observable<PermissionsInner> grantAsync(PermissionsInner body) {
308+
return grantWithServiceResponseAsync(body).map(new Func1<ServiceResponse<PermissionsInner>, PermissionsInner>() {
309309
@Override
310310
public PermissionsInner call(ServiceResponse<PermissionsInner> response) {
311311
return response.body();
@@ -320,20 +320,20 @@ public PermissionsInner call(ServiceResponse<PermissionsInner> response) {
320320
* @throws IllegalArgumentException thrown if parameters fail the validation
321321
* @return the observable to the PermissionsInner object
322322
*/
323-
public Observable<ServiceResponse<PermissionsInner>> postWithServiceResponseAsync(PermissionsInner body) {
323+
public Observable<ServiceResponse<PermissionsInner>> grantWithServiceResponseAsync(PermissionsInner body) {
324324
if (this.client.tenantID() == null) {
325325
throw new IllegalArgumentException("Parameter this.client.tenantID() is required and cannot be null.");
326326
}
327327
if (this.client.apiVersion() == null) {
328328
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
329329
}
330330
Validator.validate(body);
331-
return service.post(this.client.tenantID(), body, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
331+
return service.grant(this.client.tenantID(), body, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
332332
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<PermissionsInner>>>() {
333333
@Override
334334
public Observable<ServiceResponse<PermissionsInner>> call(Response<ResponseBody> response) {
335335
try {
336-
ServiceResponse<PermissionsInner> clientResponse = postDelegate(response);
336+
ServiceResponse<PermissionsInner> clientResponse = grantDelegate(response);
337337
return Observable.just(clientResponse);
338338
} catch (Throwable t) {
339339
return Observable.error(t);
@@ -342,7 +342,7 @@ public Observable<ServiceResponse<PermissionsInner>> call(Response<ResponseBody>
342342
});
343343
}
344344

345-
private ServiceResponse<PermissionsInner> postDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
345+
private ServiceResponse<PermissionsInner> grantDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
346346
return this.client.restClient().responseBuilderFactory().<PermissionsInner, CloudException>newInstance(this.client.serializerAdapter())
347347
.register(201, new TypeToken<PermissionsInner>() { }.getType())
348348
.registerError(CloudException.class)

0 commit comments

Comments
 (0)