Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class ResourceSku {
* 'Free', 'Basic', 'Premium'.
*/
@JsonProperty(value = "tier")
private SignalrSkuTier tier;
private SignalRSkuTier tier;

/**
* Optional, string. When the name field is the combination of tier and
Expand Down Expand Up @@ -75,7 +75,7 @@ public ResourceSku withName(String name) {
*
* @return the tier value
*/
public SignalrSkuTier tier() {
public SignalRSkuTier tier() {
return this.tier;
}

Expand All @@ -85,7 +85,7 @@ public SignalrSkuTier tier() {
* @param tier the tier value to set
* @return the ResourceSku object itself.
*/
public ResourceSku withTier(SignalrSkuTier tier) {
public ResourceSku withTier(SignalRSkuTier tier) {
this.tier = tier;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ public class OperationsInner {
/** The Retrofit service to perform REST calls. */
private OperationsService service;
/** The service client containing this operation class. */
private SignalrManagementClientImpl client;
private SignalRManagementClientImpl client;

/**
* Initializes an instance of OperationsInner.
*
* @param retrofit the Retrofit instance built from a Retrofit Builder.
* @param client the instance of the service client containing this operation class.
*/
public OperationsInner(Retrofit retrofit, SignalrManagementClientImpl client) {
public OperationsInner(Retrofit retrofit, SignalRManagementClientImpl client) {
this.service = retrofit.create(OperationsService.class);
this.client = client;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,19 @@ public SignalRManagementClientImpl withGenerateClientRequestId(boolean generateC
return this;
}

/**
* The OperationsInner object to access its operations.
*/
private OperationsInner operations;

/**
* Gets the OperationsInner object to access its operations.
* @return the OperationsInner object.
*/
public OperationsInner operations() {
return this.operations;
}

/**
* The SignalRsInner object to access its operations.
*/
Expand Down Expand Up @@ -180,6 +193,7 @@ protected void initialize() {
this.acceptLanguage = "en-US";
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
this.operations = new OperationsInner(restClient().retrofit(), this);
this.signalRs = new SignalRsInner(restClient().retrofit(), this);
this.azureClient = new AzureClient(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public class SignalRResourceInner extends TrackedResourceInner {
private String hostNamePrefix;

/**
* Provisioning state of the resource. Possible values include:
* 'Succeeded', 'Failed', 'Canceled', 'Creating', 'Updating', 'Deleting',
* 'Moving'.
* Provisioning state of the resource. Possible values include: 'Unknown',
* 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating', 'Updating',
* 'Deleting', 'Moving'.
*/
@JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private ProvisioningState provisioningState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ public SignalRsInner(Retrofit retrofit, SignalRManagementClientImpl client) {
* used by Retrofit to perform actually REST calls.
*/
interface SignalRsService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.SignalRs listOperations" })
@GET("providers/Microsoft.SignalRService/operations")
Observable<Response<ResponseBody>> listOperations(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.SignalRs checkNameAvailability" })
@POST("subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/checkNameAvailability")
Observable<Response<ResponseBody>> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Body NameAvailabilityParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
Expand Down Expand Up @@ -124,10 +120,6 @@ interface SignalRsService {
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}")
Observable<Response<ResponseBody>> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Body SignalRUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.SignalRs listOperationsNext" })
@GET
Observable<Response<ResponseBody>> listOperationsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.SignalRs listNext" })
@GET
Observable<Response<ResponseBody>> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
Expand All @@ -138,110 +130,6 @@ interface SignalRsService {

}

/**
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the PagedList&lt;OperationInner&gt; object if successful.
*/
public PagedList<OperationInner> listOperations() {
ServiceResponse<Page<OperationInner>> response = listOperationsSinglePageAsync().toBlocking().single();
return new PagedList<OperationInner>(response.body()) {
@Override
public Page<OperationInner> nextPage(String nextPageLink) {
return listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}

/**
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<List<OperationInner>> listOperationsAsync(final ListOperationCallback<OperationInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listOperationsSinglePageAsync(),
new Func1<String, Observable<ServiceResponse<Page<OperationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<OperationInner>>> call(String nextPageLink) {
return listOperationsNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}

/**
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList&lt;OperationInner&gt; object
*/
public Observable<Page<OperationInner>> listOperationsAsync() {
return listOperationsWithServiceResponseAsync()
.map(new Func1<ServiceResponse<Page<OperationInner>>, Page<OperationInner>>() {
@Override
public Page<OperationInner> call(ServiceResponse<Page<OperationInner>> response) {
return response.body();
}
});
}

/**
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList&lt;OperationInner&gt; object
*/
public Observable<ServiceResponse<Page<OperationInner>>> listOperationsWithServiceResponseAsync() {
return listOperationsSinglePageAsync()
.concatMap(new Func1<ServiceResponse<Page<OperationInner>>, Observable<ServiceResponse<Page<OperationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<OperationInner>>> call(ServiceResponse<Page<OperationInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listOperationsNextWithServiceResponseAsync(nextPageLink));
}
});
}

/**
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList&lt;OperationInner&gt; object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<OperationInner>>> listOperationsSinglePageAsync() {
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
return service.listOperations(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<OperationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<OperationInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<OperationInner>> result = listOperationsDelegate(response);
return Observable.just(new ServiceResponse<Page<OperationInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}

private ServiceResponse<PageImpl<OperationInner>> listOperationsDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<OperationInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<OperationInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}

/**
* Checks that the SignalR name is valid and is not already in use.
*
Expand Down Expand Up @@ -1889,117 +1777,6 @@ private ServiceResponse<SignalRResourceInner> beginUpdateDelegate(Response<Respo
.build(response);
}

/**
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the PagedList&lt;OperationInner&gt; object if successful.
*/
public PagedList<OperationInner> listOperationsNext(final String nextPageLink) {
ServiceResponse<Page<OperationInner>> response = listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<OperationInner>(response.body()) {
@Override
public Page<OperationInner> nextPage(String nextPageLink) {
return listOperationsNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}

/**
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param serviceFuture the ServiceFuture object tracking the Retrofit calls
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<List<OperationInner>> listOperationsNextAsync(final String nextPageLink, final ServiceFuture<List<OperationInner>> serviceFuture, final ListOperationCallback<OperationInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listOperationsNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<OperationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<OperationInner>>> call(String nextPageLink) {
return listOperationsNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}

/**
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList&lt;OperationInner&gt; object
*/
public Observable<Page<OperationInner>> listOperationsNextAsync(final String nextPageLink) {
return listOperationsNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<OperationInner>>, Page<OperationInner>>() {
@Override
public Page<OperationInner> call(ServiceResponse<Page<OperationInner>> response) {
return response.body();
}
});
}

/**
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList&lt;OperationInner&gt; object
*/
public Observable<ServiceResponse<Page<OperationInner>>> listOperationsNextWithServiceResponseAsync(final String nextPageLink) {
return listOperationsNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<OperationInner>>, Observable<ServiceResponse<Page<OperationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<OperationInner>>> call(ServiceResponse<Page<OperationInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listOperationsNextWithServiceResponseAsync(nextPageLink));
}
});
}

/**
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
ServiceResponse<PageImpl<OperationInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList&lt;OperationInner&gt; object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<OperationInner>>> listOperationsNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
}
String nextUrl = String.format("%s", nextPageLink);
return service.listOperationsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<OperationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<OperationInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<OperationInner>> result = listOperationsNextDelegate(response);
return Observable.just(new ServiceResponse<Page<OperationInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}

private ServiceResponse<PageImpl<OperationInner>> listOperationsNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<OperationInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<OperationInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}

/**
* Handles requests to list all resources in a subscription.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.

/**
* This package contains the implementation classes for SignalrManagementClient.
* This package contains the implementation classes for SignalRManagementClient.
* REST API for Azure SignalR Service.
*/
package com.microsoft.azure.management.signalr.implementation;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.

/**
* This package contains the classes for SignalrManagementClient.
* This package contains the classes for SignalRManagementClient.
* REST API for Azure SignalR Service.
*/
package com.microsoft.azure.management.signalr;