Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See License.txt in the project root for
license information.
Code generated by Microsoft (R) AutoRest Code Generator.
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.cdn.implementation;
import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet;
import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete;
import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing;
import retrofit2.Retrofit;
import com.google.common.reflect.TypeToken;
import com.microsoft.azure.AzureServiceFuture;
import com.microsoft.azure.ListOperationCallback;
import com.microsoft.azure.management.cdn.ErrorResponseException;
import com.microsoft.azure.management.cdn.ProfileUpdateParameters;
import com.microsoft.azure.Page;
import com.microsoft.azure.PagedList;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.Validator;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.HTTP;
import retrofit2.http.PATCH;
import retrofit2.http.Path;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Query;
import retrofit2.http.Url;
import retrofit2.Response;
import rx.functions.Func1;
import rx.Observable;
An instance of this class provides access to all the operations defined
in Profiles.
/**
* An instance of this class provides access to all the operations defined
* in Profiles.
*/
public class ProfilesInner implements InnerSupportsGet<ProfileInner>, InnerSupportsDelete<Void>, InnerSupportsListing<ProfileInner> {
The Retrofit service to perform REST calls. /** The Retrofit service to perform REST calls. */
private ProfilesService service;
The service client containing this operation class. /** The service client containing this operation class. */
private CdnManagementClientImpl client;
Initializes an instance of ProfilesInner.
Params: - retrofit – the Retrofit instance built from a Retrofit Builder.
- client – the instance of the service client containing this operation class.
/**
* Initializes an instance of ProfilesInner.
*
* @param retrofit the Retrofit instance built from a Retrofit Builder.
* @param client the instance of the service client containing this operation class.
*/
public ProfilesInner(Retrofit retrofit, CdnManagementClientImpl client) {
this.service = retrofit.create(ProfilesService.class);
this.client = client;
}
The interface defining all the services for Profiles to be
used by Retrofit to perform actually REST calls.
/**
* The interface defining all the services for Profiles to be
* used by Retrofit to perform actually REST calls.
*/
interface ProfilesService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cdn.Profiles list" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.Cdn/profiles")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @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.cdn.Profiles listByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles")
Observable<Response<ResponseBody>> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @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.cdn.Profiles getByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}")
Observable<Response<ResponseBody>> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @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.cdn.Profiles create" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}")
Observable<Response<ResponseBody>> create(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @Body ProfileInner profile, @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.cdn.Profiles beginCreate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}")
Observable<Response<ResponseBody>> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @Body ProfileInner profile, @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.cdn.Profiles update" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}")
Observable<Response<ResponseBody>> update(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ProfileUpdateParameters profileUpdateParameters, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cdn.Profiles beginUpdate" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}")
Observable<Response<ResponseBody>> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ProfileUpdateParameters profileUpdateParameters, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cdn.Profiles delete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @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.cdn.Profiles beginDelete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @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.cdn.Profiles generateSsoUri" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri")
Observable<Response<ResponseBody>> generateSsoUri(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @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.cdn.Profiles listSupportedOptimizationTypes" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes")
Observable<Response<ResponseBody>> listSupportedOptimizationTypes(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @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.cdn.Profiles listResourceUsage" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkResourceUsage")
Observable<Response<ResponseBody>> listResourceUsage(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @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.cdn.Profiles listNext" })
@GET
Observable<Response<ResponseBody>> listNext(@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.cdn.Profiles listByResourceGroupNext" })
@GET
Observable<Response<ResponseBody>> listByResourceGroupNext(@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.cdn.Profiles listResourceUsageNext" })
@GET
Observable<Response<ResponseBody>> listResourceUsageNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
}
Lists all of the CDN profiles within an Azure subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the PagedList<ProfileInner> object if successful.
/**
* Lists all of the CDN profiles within an Azure subscription.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException 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<ProfileInner> object if successful.
*/
public PagedList<ProfileInner> list() {
ServiceResponse<Page<ProfileInner>> response = listSinglePageAsync().toBlocking().single();
return new PagedList<ProfileInner>(response.body()) {
@Override
public Page<ProfileInner> nextPage(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Lists all of the CDN profiles within an Azure subscription.
Params: - serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Lists all of the CDN profiles within an Azure subscription.
*
* @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<ProfileInner>> listAsync(final ListOperationCallback<ProfileInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listSinglePageAsync(),
new Func1<String, Observable<ServiceResponse<Page<ProfileInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ProfileInner>>> call(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Lists all of the CDN profiles within an Azure subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ProfileInner> object
/**
* Lists all of the CDN profiles within an Azure subscription.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<ProfileInner> object
*/
public Observable<Page<ProfileInner>> listAsync() {
return listWithServiceResponseAsync()
.map(new Func1<ServiceResponse<Page<ProfileInner>>, Page<ProfileInner>>() {
@Override
public Page<ProfileInner> call(ServiceResponse<Page<ProfileInner>> response) {
return response.body();
}
});
}
Lists all of the CDN profiles within an Azure subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ProfileInner> object
/**
* Lists all of the CDN profiles within an Azure subscription.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<ProfileInner> object
*/
public Observable<ServiceResponse<Page<ProfileInner>>> listWithServiceResponseAsync() {
return listSinglePageAsync()
.concatMap(new Func1<ServiceResponse<Page<ProfileInner>>, Observable<ServiceResponse<Page<ProfileInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ProfileInner>>> call(ServiceResponse<Page<ProfileInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
}
});
}
Lists all of the CDN profiles within an Azure subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<ProfileInner> object wrapped in ServiceResponse
if successful.
/**
* Lists all of the CDN profiles within an Azure subscription.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<ProfileInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<ProfileInner>>> listSinglePageAsync() {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ProfileInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ProfileInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<ProfileInner>> result = listDelegate(response);
return Observable.just(new ServiceResponse<Page<ProfileInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<ProfileInner>> listDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<ProfileInner>, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<ProfileInner>>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Lists all of the CDN profiles within a resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the PagedList<ProfileInner> object if successful.
/**
* Lists all of the CDN profiles within a resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException 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<ProfileInner> object if successful.
*/
public PagedList<ProfileInner> listByResourceGroup(final String resourceGroupName) {
ServiceResponse<Page<ProfileInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single();
return new PagedList<ProfileInner>(response.body()) {
@Override
public Page<ProfileInner> nextPage(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Lists all of the CDN profiles within a resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Lists all of the CDN profiles within a resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @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<ProfileInner>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<ProfileInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listByResourceGroupSinglePageAsync(resourceGroupName),
new Func1<String, Observable<ServiceResponse<Page<ProfileInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ProfileInner>>> call(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Lists all of the CDN profiles within a resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ProfileInner> object
/**
* Lists all of the CDN profiles within a resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<ProfileInner> object
*/
public Observable<Page<ProfileInner>> listByResourceGroupAsync(final String resourceGroupName) {
return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
.map(new Func1<ServiceResponse<Page<ProfileInner>>, Page<ProfileInner>>() {
@Override
public Page<ProfileInner> call(ServiceResponse<Page<ProfileInner>> response) {
return response.body();
}
});
}
Lists all of the CDN profiles within a resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ProfileInner> object
/**
* Lists all of the CDN profiles within a resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<ProfileInner> object
*/
public Observable<ServiceResponse<Page<ProfileInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) {
return listByResourceGroupSinglePageAsync(resourceGroupName)
.concatMap(new Func1<ServiceResponse<Page<ProfileInner>>, Observable<ServiceResponse<Page<ProfileInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ProfileInner>>> call(ServiceResponse<Page<ProfileInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
}
});
}
Lists all of the CDN profiles within a resource group.
ServiceResponse> * @param resourceGroupName Name of the Resource group within the Azure subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<ProfileInner> object wrapped in ServiceResponse
if successful.
/**
* Lists all of the CDN profiles within a resource group.
*
ServiceResponse<PageImpl<ProfileInner>> * @param resourceGroupName Name of the Resource group within the Azure subscription.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<ProfileInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<ProfileInner>>> listByResourceGroupSinglePageAsync(final String resourceGroupName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ProfileInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ProfileInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<ProfileInner>> result = listByResourceGroupDelegate(response);
return Observable.just(new ServiceResponse<Page<ProfileInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<ProfileInner>> listByResourceGroupDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<ProfileInner>, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<ProfileInner>>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Gets a CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ProfileInner object if successful.
/**
* Gets a CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ProfileInner object if successful.
*/
public ProfileInner getByResourceGroup(String resourceGroupName, String profileName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, profileName).toBlocking().single().body();
}
Gets a CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets a CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @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<ProfileInner> getByResourceGroupAsync(String resourceGroupName, String profileName, final ServiceCallback<ProfileInner> serviceCallback) {
return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, profileName), serviceCallback);
}
Gets a CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ProfileInner object
/**
* Gets a CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProfileInner object
*/
public Observable<ProfileInner> getByResourceGroupAsync(String resourceGroupName, String profileName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, profileName).map(new Func1<ServiceResponse<ProfileInner>, ProfileInner>() {
@Override
public ProfileInner call(ServiceResponse<ProfileInner> response) {
return response.body();
}
});
}
Gets a CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ProfileInner object
/**
* Gets a CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProfileInner object
*/
public Observable<ServiceResponse<ProfileInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String profileName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (profileName == null) {
throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
return service.getByResourceGroup(resourceGroupName, profileName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ProfileInner>>>() {
@Override
public Observable<ServiceResponse<ProfileInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ProfileInner> clientResponse = getByResourceGroupDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<ProfileInner> getByResourceGroupDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<ProfileInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<ProfileInner>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Creates a new CDN profile with a profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- profile – Profile properties needed to create a new profile.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ProfileInner object if successful.
/**
* Creates a new CDN profile with a profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param profile Profile properties needed to create a new profile.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ProfileInner object if successful.
*/
public ProfileInner create(String resourceGroupName, String profileName, ProfileInner profile) {
return createWithServiceResponseAsync(resourceGroupName, profileName, profile).toBlocking().last().body();
}
Creates a new CDN profile with a profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- profile – Profile properties needed to create a new profile.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Creates a new CDN profile with a profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param profile Profile properties needed to create a new profile.
* @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<ProfileInner> createAsync(String resourceGroupName, String profileName, ProfileInner profile, final ServiceCallback<ProfileInner> serviceCallback) {
return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, profileName, profile), serviceCallback);
}
Creates a new CDN profile with a profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- profile – Profile properties needed to create a new profile.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Creates a new CDN profile with a profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param profile Profile properties needed to create a new profile.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ProfileInner> createAsync(String resourceGroupName, String profileName, ProfileInner profile) {
return createWithServiceResponseAsync(resourceGroupName, profileName, profile).map(new Func1<ServiceResponse<ProfileInner>, ProfileInner>() {
@Override
public ProfileInner call(ServiceResponse<ProfileInner> response) {
return response.body();
}
});
}
Creates a new CDN profile with a profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- profile – Profile properties needed to create a new profile.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Creates a new CDN profile with a profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param profile Profile properties needed to create a new profile.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<ProfileInner>> createWithServiceResponseAsync(String resourceGroupName, String profileName, ProfileInner profile) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (profileName == null) {
throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (profile == null) {
throw new IllegalArgumentException("Parameter profile is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
Validator.validate(profile);
Observable<Response<ResponseBody>> observable = service.create(resourceGroupName, profileName, this.client.subscriptionId(), profile, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<ProfileInner>() { }.getType());
}
Creates a new CDN profile with a profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- profile – Profile properties needed to create a new profile.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ProfileInner object if successful.
/**
* Creates a new CDN profile with a profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param profile Profile properties needed to create a new profile.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ProfileInner object if successful.
*/
public ProfileInner beginCreate(String resourceGroupName, String profileName, ProfileInner profile) {
return beginCreateWithServiceResponseAsync(resourceGroupName, profileName, profile).toBlocking().single().body();
}
Creates a new CDN profile with a profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- profile – Profile properties needed to create a new profile.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Creates a new CDN profile with a profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param profile Profile properties needed to create a new profile.
* @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<ProfileInner> beginCreateAsync(String resourceGroupName, String profileName, ProfileInner profile, final ServiceCallback<ProfileInner> serviceCallback) {
return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, profileName, profile), serviceCallback);
}
Creates a new CDN profile with a profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- profile – Profile properties needed to create a new profile.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ProfileInner object
/**
* Creates a new CDN profile with a profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param profile Profile properties needed to create a new profile.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProfileInner object
*/
public Observable<ProfileInner> beginCreateAsync(String resourceGroupName, String profileName, ProfileInner profile) {
return beginCreateWithServiceResponseAsync(resourceGroupName, profileName, profile).map(new Func1<ServiceResponse<ProfileInner>, ProfileInner>() {
@Override
public ProfileInner call(ServiceResponse<ProfileInner> response) {
return response.body();
}
});
}
Creates a new CDN profile with a profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- profile – Profile properties needed to create a new profile.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ProfileInner object
/**
* Creates a new CDN profile with a profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param profile Profile properties needed to create a new profile.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProfileInner object
*/
public Observable<ServiceResponse<ProfileInner>> beginCreateWithServiceResponseAsync(String resourceGroupName, String profileName, ProfileInner profile) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (profileName == null) {
throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (profile == null) {
throw new IllegalArgumentException("Parameter profile is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
Validator.validate(profile);
return service.beginCreate(resourceGroupName, profileName, this.client.subscriptionId(), profile, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ProfileInner>>>() {
@Override
public Observable<ServiceResponse<ProfileInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ProfileInner> clientResponse = beginCreateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<ProfileInner> beginCreateDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<ProfileInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<ProfileInner>() { }.getType())
.register(201, new TypeToken<ProfileInner>() { }.getType())
.register(202, new TypeToken<ProfileInner>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ProfileInner object if successful.
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ProfileInner object if successful.
*/
public ProfileInner update(String resourceGroupName, String profileName) {
return updateWithServiceResponseAsync(resourceGroupName, profileName).toBlocking().last().body();
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @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<ProfileInner> updateAsync(String resourceGroupName, String profileName, final ServiceCallback<ProfileInner> serviceCallback) {
return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, profileName), serviceCallback);
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ProfileInner> updateAsync(String resourceGroupName, String profileName) {
return updateWithServiceResponseAsync(resourceGroupName, profileName).map(new Func1<ServiceResponse<ProfileInner>, ProfileInner>() {
@Override
public ProfileInner call(ServiceResponse<ProfileInner> response) {
return response.body();
}
});
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<ProfileInner>> updateWithServiceResponseAsync(String resourceGroupName, String profileName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (profileName == null) {
throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
final Map<String, String> tags = null;
ProfileUpdateParameters profileUpdateParameters = new ProfileUpdateParameters();
profileUpdateParameters.withTags(null);
Observable<Response<ResponseBody>> observable = service.update(resourceGroupName, profileName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), profileUpdateParameters, this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<ProfileInner>() { }.getType());
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- tags – Profile tags
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ProfileInner object if successful.
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param tags Profile tags
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ProfileInner object if successful.
*/
public ProfileInner update(String resourceGroupName, String profileName, Map<String, String> tags) {
return updateWithServiceResponseAsync(resourceGroupName, profileName, tags).toBlocking().last().body();
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- tags – Profile tags
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param tags Profile tags
* @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<ProfileInner> updateAsync(String resourceGroupName, String profileName, Map<String, String> tags, final ServiceCallback<ProfileInner> serviceCallback) {
return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, profileName, tags), serviceCallback);
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- tags – Profile tags
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param tags Profile tags
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ProfileInner> updateAsync(String resourceGroupName, String profileName, Map<String, String> tags) {
return updateWithServiceResponseAsync(resourceGroupName, profileName, tags).map(new Func1<ServiceResponse<ProfileInner>, ProfileInner>() {
@Override
public ProfileInner call(ServiceResponse<ProfileInner> response) {
return response.body();
}
});
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- tags – Profile tags
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param tags Profile tags
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<ProfileInner>> updateWithServiceResponseAsync(String resourceGroupName, String profileName, Map<String, String> tags) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (profileName == null) {
throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
Validator.validate(tags);
ProfileUpdateParameters profileUpdateParameters = new ProfileUpdateParameters();
profileUpdateParameters.withTags(tags);
Observable<Response<ResponseBody>> observable = service.update(resourceGroupName, profileName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), profileUpdateParameters, this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<ProfileInner>() { }.getType());
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ProfileInner object if successful.
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ProfileInner object if successful.
*/
public ProfileInner beginUpdate(String resourceGroupName, String profileName) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, profileName).toBlocking().single().body();
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @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<ProfileInner> beginUpdateAsync(String resourceGroupName, String profileName, final ServiceCallback<ProfileInner> serviceCallback) {
return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, profileName), serviceCallback);
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ProfileInner object
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProfileInner object
*/
public Observable<ProfileInner> beginUpdateAsync(String resourceGroupName, String profileName) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, profileName).map(new Func1<ServiceResponse<ProfileInner>, ProfileInner>() {
@Override
public ProfileInner call(ServiceResponse<ProfileInner> response) {
return response.body();
}
});
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ProfileInner object
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProfileInner object
*/
public Observable<ServiceResponse<ProfileInner>> beginUpdateWithServiceResponseAsync(String resourceGroupName, String profileName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (profileName == null) {
throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
final Map<String, String> tags = null;
ProfileUpdateParameters profileUpdateParameters = new ProfileUpdateParameters();
profileUpdateParameters.withTags(null);
return service.beginUpdate(resourceGroupName, profileName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), profileUpdateParameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ProfileInner>>>() {
@Override
public Observable<ServiceResponse<ProfileInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ProfileInner> clientResponse = beginUpdateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- tags – Profile tags
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ProfileInner object if successful.
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param tags Profile tags
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ProfileInner object if successful.
*/
public ProfileInner beginUpdate(String resourceGroupName, String profileName, Map<String, String> tags) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, profileName, tags).toBlocking().single().body();
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- tags – Profile tags
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param tags Profile tags
* @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<ProfileInner> beginUpdateAsync(String resourceGroupName, String profileName, Map<String, String> tags, final ServiceCallback<ProfileInner> serviceCallback) {
return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, profileName, tags), serviceCallback);
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- tags – Profile tags
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ProfileInner object
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param tags Profile tags
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProfileInner object
*/
public Observable<ProfileInner> beginUpdateAsync(String resourceGroupName, String profileName, Map<String, String> tags) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, profileName, tags).map(new Func1<ServiceResponse<ProfileInner>, ProfileInner>() {
@Override
public ProfileInner call(ServiceResponse<ProfileInner> response) {
return response.body();
}
});
}
Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- tags – Profile tags
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ProfileInner object
/**
* Updates an existing CDN profile with the specified profile name under the specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param tags Profile tags
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ProfileInner object
*/
public Observable<ServiceResponse<ProfileInner>> beginUpdateWithServiceResponseAsync(String resourceGroupName, String profileName, Map<String, String> tags) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (profileName == null) {
throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
Validator.validate(tags);
ProfileUpdateParameters profileUpdateParameters = new ProfileUpdateParameters();
profileUpdateParameters.withTags(tags);
return service.beginUpdate(resourceGroupName, profileName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), profileUpdateParameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ProfileInner>>>() {
@Override
public Observable<ServiceResponse<ProfileInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ProfileInner> clientResponse = beginUpdateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<ProfileInner> beginUpdateDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<ProfileInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<ProfileInner>() { }.getType())
.register(202, new TypeToken<ProfileInner>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
/**
* Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
public void delete(String resourceGroupName, String profileName) {
deleteWithServiceResponseAsync(resourceGroupName, profileName).toBlocking().last().body();
}
Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @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<Void> deleteAsync(String resourceGroupName, String profileName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, profileName), serviceCallback);
}
Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<Void> deleteAsync(String resourceGroupName, String profileName) {
return deleteWithServiceResponseAsync(resourceGroupName, profileName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String profileName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (profileName == null) {
throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
Observable<Response<ResponseBody>> observable = service.delete(resourceGroupName, profileName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType());
}
Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
/**
* Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
public void beginDelete(String resourceGroupName, String profileName) {
beginDeleteWithServiceResponseAsync(resourceGroupName, profileName).toBlocking().single().body();
}
Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @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<Void> beginDeleteAsync(String resourceGroupName, String profileName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, profileName), serviceCallback);
}
Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable<Void> beginDeleteAsync(String resourceGroupName, String profileName) {
return beginDeleteWithServiceResponseAsync(resourceGroupName, profileName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable<ServiceResponse<Void>> beginDeleteWithServiceResponseAsync(String resourceGroupName, String profileName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (profileName == null) {
throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
return service.beginDelete(resourceGroupName, profileName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() {
@Override
public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {
try {
ServiceResponse<Void> clientResponse = beginDeleteDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<Void> beginDeleteDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<Void, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(202, new TypeToken<Void>() { }.getType())
.register(204, new TypeToken<Void>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 minutes.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the SsoUriInner object if successful.
/**
* Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 minutes.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the SsoUriInner object if successful.
*/
public SsoUriInner generateSsoUri(String resourceGroupName, String profileName) {
return generateSsoUriWithServiceResponseAsync(resourceGroupName, profileName).toBlocking().single().body();
}
Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 minutes.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 minutes.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @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<SsoUriInner> generateSsoUriAsync(String resourceGroupName, String profileName, final ServiceCallback<SsoUriInner> serviceCallback) {
return ServiceFuture.fromResponse(generateSsoUriWithServiceResponseAsync(resourceGroupName, profileName), serviceCallback);
}
Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 minutes.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the SsoUriInner object
/**
* Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 minutes.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the SsoUriInner object
*/
public Observable<SsoUriInner> generateSsoUriAsync(String resourceGroupName, String profileName) {
return generateSsoUriWithServiceResponseAsync(resourceGroupName, profileName).map(new Func1<ServiceResponse<SsoUriInner>, SsoUriInner>() {
@Override
public SsoUriInner call(ServiceResponse<SsoUriInner> response) {
return response.body();
}
});
}
Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 minutes.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the SsoUriInner object
/**
* Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 minutes.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the SsoUriInner object
*/
public Observable<ServiceResponse<SsoUriInner>> generateSsoUriWithServiceResponseAsync(String resourceGroupName, String profileName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (profileName == null) {
throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
return service.generateSsoUri(resourceGroupName, profileName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<SsoUriInner>>>() {
@Override
public Observable<ServiceResponse<SsoUriInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<SsoUriInner> clientResponse = generateSsoUriDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<SsoUriInner> generateSsoUriDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<SsoUriInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<SsoUriInner>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the SupportedOptimizationTypesListResultInner object if successful.
/**
* Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the SupportedOptimizationTypesListResultInner object if successful.
*/
public SupportedOptimizationTypesListResultInner listSupportedOptimizationTypes(String resourceGroupName, String profileName) {
return listSupportedOptimizationTypesWithServiceResponseAsync(resourceGroupName, profileName).toBlocking().single().body();
}
Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @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<SupportedOptimizationTypesListResultInner> listSupportedOptimizationTypesAsync(String resourceGroupName, String profileName, final ServiceCallback<SupportedOptimizationTypesListResultInner> serviceCallback) {
return ServiceFuture.fromResponse(listSupportedOptimizationTypesWithServiceResponseAsync(resourceGroupName, profileName), serviceCallback);
}
Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the SupportedOptimizationTypesListResultInner object
/**
* Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the SupportedOptimizationTypesListResultInner object
*/
public Observable<SupportedOptimizationTypesListResultInner> listSupportedOptimizationTypesAsync(String resourceGroupName, String profileName) {
return listSupportedOptimizationTypesWithServiceResponseAsync(resourceGroupName, profileName).map(new Func1<ServiceResponse<SupportedOptimizationTypesListResultInner>, SupportedOptimizationTypesListResultInner>() {
@Override
public SupportedOptimizationTypesListResultInner call(ServiceResponse<SupportedOptimizationTypesListResultInner> response) {
return response.body();
}
});
}
Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the SupportedOptimizationTypesListResultInner object
/**
* Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the SupportedOptimizationTypesListResultInner object
*/
public Observable<ServiceResponse<SupportedOptimizationTypesListResultInner>> listSupportedOptimizationTypesWithServiceResponseAsync(String resourceGroupName, String profileName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (profileName == null) {
throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
return service.listSupportedOptimizationTypes(resourceGroupName, profileName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<SupportedOptimizationTypesListResultInner>>>() {
@Override
public Observable<ServiceResponse<SupportedOptimizationTypesListResultInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<SupportedOptimizationTypesListResultInner> clientResponse = listSupportedOptimizationTypesDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<SupportedOptimizationTypesListResultInner> listSupportedOptimizationTypesDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<SupportedOptimizationTypesListResultInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<SupportedOptimizationTypesListResultInner>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Checks the quota and actual usage of endpoints under the given CDN profile.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the PagedList<ResourceUsageInner> object if successful.
/**
* Checks the quota and actual usage of endpoints under the given CDN profile.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException 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<ResourceUsageInner> object if successful.
*/
public PagedList<ResourceUsageInner> listResourceUsage(final String resourceGroupName, final String profileName) {
ServiceResponse<Page<ResourceUsageInner>> response = listResourceUsageSinglePageAsync(resourceGroupName, profileName).toBlocking().single();
return new PagedList<ResourceUsageInner>(response.body()) {
@Override
public Page<ResourceUsageInner> nextPage(String nextPageLink) {
return listResourceUsageNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Checks the quota and actual usage of endpoints under the given CDN profile.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Checks the quota and actual usage of endpoints under the given CDN profile.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @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<ResourceUsageInner>> listResourceUsageAsync(final String resourceGroupName, final String profileName, final ListOperationCallback<ResourceUsageInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listResourceUsageSinglePageAsync(resourceGroupName, profileName),
new Func1<String, Observable<ServiceResponse<Page<ResourceUsageInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ResourceUsageInner>>> call(String nextPageLink) {
return listResourceUsageNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Checks the quota and actual usage of endpoints under the given CDN profile.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ResourceUsageInner> object
/**
* Checks the quota and actual usage of endpoints under the given CDN profile.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<ResourceUsageInner> object
*/
public Observable<Page<ResourceUsageInner>> listResourceUsageAsync(final String resourceGroupName, final String profileName) {
return listResourceUsageWithServiceResponseAsync(resourceGroupName, profileName)
.map(new Func1<ServiceResponse<Page<ResourceUsageInner>>, Page<ResourceUsageInner>>() {
@Override
public Page<ResourceUsageInner> call(ServiceResponse<Page<ResourceUsageInner>> response) {
return response.body();
}
});
}
Checks the quota and actual usage of endpoints under the given CDN profile.
Params: - resourceGroupName – Name of the Resource group within the Azure subscription.
- profileName – Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ResourceUsageInner> object
/**
* Checks the quota and actual usage of endpoints under the given CDN profile.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<ResourceUsageInner> object
*/
public Observable<ServiceResponse<Page<ResourceUsageInner>>> listResourceUsageWithServiceResponseAsync(final String resourceGroupName, final String profileName) {
return listResourceUsageSinglePageAsync(resourceGroupName, profileName)
.concatMap(new Func1<ServiceResponse<Page<ResourceUsageInner>>, Observable<ServiceResponse<Page<ResourceUsageInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ResourceUsageInner>>> call(ServiceResponse<Page<ResourceUsageInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listResourceUsageNextWithServiceResponseAsync(nextPageLink));
}
});
}
Checks the quota and actual usage of endpoints under the given CDN profile.
ServiceResponse> * @param resourceGroupName Name of the Resource group within the Azure subscription.
ServiceResponse> * @param profileName Name of the CDN profile which is unique within the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<ResourceUsageInner> object wrapped in ServiceResponse
if successful.
/**
* Checks the quota and actual usage of endpoints under the given CDN profile.
*
ServiceResponse<PageImpl<ResourceUsageInner>> * @param resourceGroupName Name of the Resource group within the Azure subscription.
ServiceResponse<PageImpl<ResourceUsageInner>> * @param profileName Name of the CDN profile which is unique within the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<ResourceUsageInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<ResourceUsageInner>>> listResourceUsageSinglePageAsync(final String resourceGroupName, final String profileName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (profileName == null) {
throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
return service.listResourceUsage(resourceGroupName, profileName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ResourceUsageInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ResourceUsageInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<ResourceUsageInner>> result = listResourceUsageDelegate(response);
return Observable.just(new ServiceResponse<Page<ResourceUsageInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<ResourceUsageInner>> listResourceUsageDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<ResourceUsageInner>, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<ResourceUsageInner>>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Lists all of the CDN profiles within an Azure subscription.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the PagedList<ProfileInner> object if successful.
/**
* Lists all of the CDN profiles within an Azure subscription.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException 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<ProfileInner> object if successful.
*/
public PagedList<ProfileInner> listNext(final String nextPageLink) {
ServiceResponse<Page<ProfileInner>> response = listNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<ProfileInner>(response.body()) {
@Override
public Page<ProfileInner> nextPage(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Lists all of the CDN profiles within an Azure subscription.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
- serviceFuture – the ServiceFuture object tracking the Retrofit calls
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Lists all of the CDN profiles within an Azure subscription.
*
* @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<ProfileInner>> listNextAsync(final String nextPageLink, final ServiceFuture<List<ProfileInner>> serviceFuture, final ListOperationCallback<ProfileInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<ProfileInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ProfileInner>>> call(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Lists all of the CDN profiles within an Azure subscription.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ProfileInner> object
/**
* Lists all of the CDN profiles within an Azure subscription.
*
* @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<ProfileInner> object
*/
public Observable<Page<ProfileInner>> listNextAsync(final String nextPageLink) {
return listNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<ProfileInner>>, Page<ProfileInner>>() {
@Override
public Page<ProfileInner> call(ServiceResponse<Page<ProfileInner>> response) {
return response.body();
}
});
}
Lists all of the CDN profiles within an Azure subscription.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ProfileInner> object
/**
* Lists all of the CDN profiles within an Azure subscription.
*
* @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<ProfileInner> object
*/
public Observable<ServiceResponse<Page<ProfileInner>>> listNextWithServiceResponseAsync(final String nextPageLink) {
return listNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<ProfileInner>>, Observable<ServiceResponse<Page<ProfileInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ProfileInner>>> call(ServiceResponse<Page<ProfileInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
}
});
}
Lists all of the CDN profiles within an Azure subscription.
ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<ProfileInner> object wrapped in ServiceResponse
if successful.
/**
* Lists all of the CDN profiles within an Azure subscription.
*
ServiceResponse<PageImpl<ProfileInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<ProfileInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<ProfileInner>>> listNextSinglePageAsync(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.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ProfileInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ProfileInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<ProfileInner>> result = listNextDelegate(response);
return Observable.just(new ServiceResponse<Page<ProfileInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<ProfileInner>> listNextDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<ProfileInner>, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<ProfileInner>>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Lists all of the CDN profiles within a resource group.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the PagedList<ProfileInner> object if successful.
/**
* Lists all of the CDN profiles within a resource group.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException 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<ProfileInner> object if successful.
*/
public PagedList<ProfileInner> listByResourceGroupNext(final String nextPageLink) {
ServiceResponse<Page<ProfileInner>> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<ProfileInner>(response.body()) {
@Override
public Page<ProfileInner> nextPage(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Lists all of the CDN profiles within a resource group.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
- serviceFuture – the ServiceFuture object tracking the Retrofit calls
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Lists all of the CDN profiles within a resource group.
*
* @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<ProfileInner>> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture<List<ProfileInner>> serviceFuture, final ListOperationCallback<ProfileInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listByResourceGroupNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<ProfileInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ProfileInner>>> call(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Lists all of the CDN profiles within a resource group.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ProfileInner> object
/**
* Lists all of the CDN profiles within a resource group.
*
* @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<ProfileInner> object
*/
public Observable<Page<ProfileInner>> listByResourceGroupNextAsync(final String nextPageLink) {
return listByResourceGroupNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<ProfileInner>>, Page<ProfileInner>>() {
@Override
public Page<ProfileInner> call(ServiceResponse<Page<ProfileInner>> response) {
return response.body();
}
});
}
Lists all of the CDN profiles within a resource group.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ProfileInner> object
/**
* Lists all of the CDN profiles within a resource group.
*
* @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<ProfileInner> object
*/
public Observable<ServiceResponse<Page<ProfileInner>>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<ProfileInner>>, Observable<ServiceResponse<Page<ProfileInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ProfileInner>>> call(ServiceResponse<Page<ProfileInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
}
});
}
Lists all of the CDN profiles within a resource group.
ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<ProfileInner> object wrapped in ServiceResponse
if successful.
/**
* Lists all of the CDN profiles within a resource group.
*
ServiceResponse<PageImpl<ProfileInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<ProfileInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<ProfileInner>>> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ProfileInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ProfileInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<ProfileInner>> result = listByResourceGroupNextDelegate(response);
return Observable.just(new ServiceResponse<Page<ProfileInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<ProfileInner>> listByResourceGroupNextDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<ProfileInner>, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<ProfileInner>>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Checks the quota and actual usage of endpoints under the given CDN profile.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the PagedList<ResourceUsageInner> object if successful.
/**
* Checks the quota and actual usage of endpoints under the given CDN profile.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException 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<ResourceUsageInner> object if successful.
*/
public PagedList<ResourceUsageInner> listResourceUsageNext(final String nextPageLink) {
ServiceResponse<Page<ResourceUsageInner>> response = listResourceUsageNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<ResourceUsageInner>(response.body()) {
@Override
public Page<ResourceUsageInner> nextPage(String nextPageLink) {
return listResourceUsageNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Checks the quota and actual usage of endpoints under the given CDN profile.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
- serviceFuture – the ServiceFuture object tracking the Retrofit calls
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Checks the quota and actual usage of endpoints under the given CDN profile.
*
* @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<ResourceUsageInner>> listResourceUsageNextAsync(final String nextPageLink, final ServiceFuture<List<ResourceUsageInner>> serviceFuture, final ListOperationCallback<ResourceUsageInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listResourceUsageNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<ResourceUsageInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ResourceUsageInner>>> call(String nextPageLink) {
return listResourceUsageNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Checks the quota and actual usage of endpoints under the given CDN profile.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ResourceUsageInner> object
/**
* Checks the quota and actual usage of endpoints under the given CDN profile.
*
* @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<ResourceUsageInner> object
*/
public Observable<Page<ResourceUsageInner>> listResourceUsageNextAsync(final String nextPageLink) {
return listResourceUsageNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<ResourceUsageInner>>, Page<ResourceUsageInner>>() {
@Override
public Page<ResourceUsageInner> call(ServiceResponse<Page<ResourceUsageInner>> response) {
return response.body();
}
});
}
Checks the quota and actual usage of endpoints under the given CDN profile.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ResourceUsageInner> object
/**
* Checks the quota and actual usage of endpoints under the given CDN profile.
*
* @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<ResourceUsageInner> object
*/
public Observable<ServiceResponse<Page<ResourceUsageInner>>> listResourceUsageNextWithServiceResponseAsync(final String nextPageLink) {
return listResourceUsageNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<ResourceUsageInner>>, Observable<ServiceResponse<Page<ResourceUsageInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ResourceUsageInner>>> call(ServiceResponse<Page<ResourceUsageInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listResourceUsageNextWithServiceResponseAsync(nextPageLink));
}
});
}
Checks the quota and actual usage of endpoints under the given CDN profile.
ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<ResourceUsageInner> object wrapped in ServiceResponse
if successful.
/**
* Checks the quota and actual usage of endpoints under the given CDN profile.
*
ServiceResponse<PageImpl<ResourceUsageInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<ResourceUsageInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<ResourceUsageInner>>> listResourceUsageNextSinglePageAsync(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.listResourceUsageNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ResourceUsageInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ResourceUsageInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<ResourceUsageInner>> result = listResourceUsageNextDelegate(response);
return Observable.just(new ServiceResponse<Page<ResourceUsageInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<ResourceUsageInner>> listResourceUsageNextDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<ResourceUsageInner>, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<ResourceUsageInner>>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
}