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 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.OriginUpdateParameters; 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 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.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 Origins.
/** * An instance of this class provides access to all the operations defined * in Origins. */
public class OriginsInner {
The Retrofit service to perform REST calls.
/** The Retrofit service to perform REST calls. */
private OriginsService service;
The service client containing this operation class.
/** The service client containing this operation class. */
private CdnManagementClientImpl client;
Initializes an instance of OriginsInner.
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 OriginsInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */
public OriginsInner(Retrofit retrofit, CdnManagementClientImpl client) { this.service = retrofit.create(OriginsService.class); this.client = client; }
The interface defining all the services for Origins to be used by Retrofit to perform actually REST calls.
/** * The interface defining all the services for Origins to be * used by Retrofit to perform actually REST calls. */
interface OriginsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cdn.Origins listByEndpoint" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins") Observable<Response<ResponseBody>> listByEndpoint(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("endpointName") String endpointName, @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.Origins get" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}") Observable<Response<ResponseBody>> get(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("endpointName") String endpointName, @Path("originName") String originName, @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.Origins create" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}") Observable<Response<ResponseBody>> create(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("endpointName") String endpointName, @Path("originName") String originName, @Path("subscriptionId") String subscriptionId, @Body OriginInner origin, @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.Origins beginCreate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}") Observable<Response<ResponseBody>> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("endpointName") String endpointName, @Path("originName") String originName, @Path("subscriptionId") String subscriptionId, @Body OriginInner origin, @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.Origins update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}") Observable<Response<ResponseBody>> update(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("endpointName") String endpointName, @Path("originName") String originName, @Path("subscriptionId") String subscriptionId, @Body OriginUpdateParameters originUpdateProperties, @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.Origins beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}") Observable<Response<ResponseBody>> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("endpointName") String endpointName, @Path("originName") String originName, @Path("subscriptionId") String subscriptionId, @Body OriginUpdateParameters originUpdateProperties, @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.Origins delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("endpointName") String endpointName, @Path("originName") String originName, @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.Origins beginDelete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("endpointName") String endpointName, @Path("originName") String originName, @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.Origins listByEndpointNext" }) @GET Observable<Response<ResponseBody>> listByEndpointNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); }
Lists all of the existing origins within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
Throws:
Returns:the PagedList<OriginInner> object if successful.
/** * Lists all of the existing origins within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @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&lt;OriginInner&gt; object if successful. */
public PagedList<OriginInner> listByEndpoint(final String resourceGroupName, final String profileName, final String endpointName) { ServiceResponse<Page<OriginInner>> response = listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName).toBlocking().single(); return new PagedList<OriginInner>(response.body()) { @Override public Page<OriginInner> nextPage(String nextPageLink) { return listByEndpointNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Lists all of the existing origins within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Lists all of the existing origins within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @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<OriginInner>> listByEndpointAsync(final String resourceGroupName, final String profileName, final String endpointName, final ListOperationCallback<OriginInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName), new Func1<String, Observable<ServiceResponse<Page<OriginInner>>>>() { @Override public Observable<ServiceResponse<Page<OriginInner>>> call(String nextPageLink) { return listByEndpointNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Lists all of the existing origins within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
Throws:
Returns:the observable to the PagedList<OriginInner> object
/** * Lists all of the existing origins within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;OriginInner&gt; object */
public Observable<Page<OriginInner>> listByEndpointAsync(final String resourceGroupName, final String profileName, final String endpointName) { return listByEndpointWithServiceResponseAsync(resourceGroupName, profileName, endpointName) .map(new Func1<ServiceResponse<Page<OriginInner>>, Page<OriginInner>>() { @Override public Page<OriginInner> call(ServiceResponse<Page<OriginInner>> response) { return response.body(); } }); }
Lists all of the existing origins within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
Throws:
Returns:the observable to the PagedList<OriginInner> object
/** * Lists all of the existing origins within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;OriginInner&gt; object */
public Observable<ServiceResponse<Page<OriginInner>>> listByEndpointWithServiceResponseAsync(final String resourceGroupName, final String profileName, final String endpointName) { return listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName) .concatMap(new Func1<ServiceResponse<Page<OriginInner>>, Observable<ServiceResponse<Page<OriginInner>>>>() { @Override public Observable<ServiceResponse<Page<OriginInner>>> call(ServiceResponse<Page<OriginInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByEndpointNextWithServiceResponseAsync(nextPageLink)); } }); }
Lists all of the existing origins within an endpoint. 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. ServiceResponse> * @param endpointName Name of the endpoint under the profile which is unique globally.
Throws:
Returns:the PagedList<OriginInner> object wrapped in ServiceResponse if successful.
/** * Lists all of the existing origins within an endpoint. * ServiceResponse<PageImpl<OriginInner>> * @param resourceGroupName Name of the Resource group within the Azure subscription. ServiceResponse<PageImpl<OriginInner>> * @param profileName Name of the CDN profile which is unique within the resource group. ServiceResponse<PageImpl<OriginInner>> * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;OriginInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<OriginInner>>> listByEndpointSinglePageAsync(final String resourceGroupName, final String profileName, final String endpointName) { 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 (endpointName == null) { throw new IllegalArgumentException("Parameter endpointName 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.listByEndpoint(resourceGroupName, profileName, endpointName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<OriginInner>>>>() { @Override public Observable<ServiceResponse<Page<OriginInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<OriginInner>> result = listByEndpointDelegate(response); return Observable.just(new ServiceResponse<Page<OriginInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<OriginInner>> listByEndpointDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<OriginInner>, ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<OriginInner>>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); }
Gets an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
Throws:
Returns:the OriginInner object if successful.
/** * Gets an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @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 OriginInner object if successful. */
public OriginInner get(String resourceGroupName, String profileName, String endpointName, String originName) { return getWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName).toBlocking().single().body(); }
Gets an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @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<OriginInner> getAsync(String resourceGroupName, String profileName, String endpointName, String originName, final ServiceCallback<OriginInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName), serviceCallback); }
Gets an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
Throws:
Returns:the observable to the OriginInner object
/** * Gets an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OriginInner object */
public Observable<OriginInner> getAsync(String resourceGroupName, String profileName, String endpointName, String originName) { return getWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName).map(new Func1<ServiceResponse<OriginInner>, OriginInner>() { @Override public OriginInner call(ServiceResponse<OriginInner> response) { return response.body(); } }); }
Gets an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
Throws:
Returns:the observable to the OriginInner object
/** * Gets an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OriginInner object */
public Observable<ServiceResponse<OriginInner>> getWithServiceResponseAsync(String resourceGroupName, String profileName, String endpointName, String originName) { 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 (endpointName == null) { throw new IllegalArgumentException("Parameter endpointName is required and cannot be null."); } if (originName == null) { throw new IllegalArgumentException("Parameter originName 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.get(resourceGroupName, profileName, endpointName, originName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OriginInner>>>() { @Override public Observable<ServiceResponse<OriginInner>> call(Response<ResponseBody> response) { try { ServiceResponse<OriginInner> clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<OriginInner> getDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<OriginInner, ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<OriginInner>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); }
Creates a new origin within the specified endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin that is unique within the endpoint.
  • origin – Origin properties
Throws:
Returns:the OriginInner object if successful.
/** * Creates a new origin within the specified endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin that is unique within the endpoint. * @param origin Origin properties * @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 OriginInner object if successful. */
public OriginInner create(String resourceGroupName, String profileName, String endpointName, String originName, OriginInner origin) { return createWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName, origin).toBlocking().last().body(); }
Creates a new origin within the specified endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin that is unique within the endpoint.
  • origin – Origin properties
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Creates a new origin within the specified endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin that is unique within the endpoint. * @param origin Origin properties * @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<OriginInner> createAsync(String resourceGroupName, String profileName, String endpointName, String originName, OriginInner origin, final ServiceCallback<OriginInner> serviceCallback) { return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName, origin), serviceCallback); }
Creates a new origin within the specified endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin that is unique within the endpoint.
  • origin – Origin properties
Throws:
Returns:the observable for the request
/** * Creates a new origin within the specified endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin that is unique within the endpoint. * @param origin Origin properties * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<OriginInner> createAsync(String resourceGroupName, String profileName, String endpointName, String originName, OriginInner origin) { return createWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName, origin).map(new Func1<ServiceResponse<OriginInner>, OriginInner>() { @Override public OriginInner call(ServiceResponse<OriginInner> response) { return response.body(); } }); }
Creates a new origin within the specified endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin that is unique within the endpoint.
  • origin – Origin properties
Throws:
Returns:the observable for the request
/** * Creates a new origin within the specified endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin that is unique within the endpoint. * @param origin Origin properties * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<OriginInner>> createWithServiceResponseAsync(String resourceGroupName, String profileName, String endpointName, String originName, OriginInner origin) { 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 (endpointName == null) { throw new IllegalArgumentException("Parameter endpointName is required and cannot be null."); } if (originName == null) { throw new IllegalArgumentException("Parameter originName 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 (origin == null) { throw new IllegalArgumentException("Parameter origin 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(origin); Observable<Response<ResponseBody>> observable = service.create(resourceGroupName, profileName, endpointName, originName, this.client.subscriptionId(), origin, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<OriginInner>() { }.getType()); }
Creates a new origin within the specified endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin that is unique within the endpoint.
  • origin – Origin properties
Throws:
Returns:the OriginInner object if successful.
/** * Creates a new origin within the specified endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin that is unique within the endpoint. * @param origin Origin properties * @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 OriginInner object if successful. */
public OriginInner beginCreate(String resourceGroupName, String profileName, String endpointName, String originName, OriginInner origin) { return beginCreateWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName, origin).toBlocking().single().body(); }
Creates a new origin within the specified endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin that is unique within the endpoint.
  • origin – Origin properties
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Creates a new origin within the specified endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin that is unique within the endpoint. * @param origin Origin properties * @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<OriginInner> beginCreateAsync(String resourceGroupName, String profileName, String endpointName, String originName, OriginInner origin, final ServiceCallback<OriginInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName, origin), serviceCallback); }
Creates a new origin within the specified endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin that is unique within the endpoint.
  • origin – Origin properties
Throws:
Returns:the observable to the OriginInner object
/** * Creates a new origin within the specified endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin that is unique within the endpoint. * @param origin Origin properties * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OriginInner object */
public Observable<OriginInner> beginCreateAsync(String resourceGroupName, String profileName, String endpointName, String originName, OriginInner origin) { return beginCreateWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName, origin).map(new Func1<ServiceResponse<OriginInner>, OriginInner>() { @Override public OriginInner call(ServiceResponse<OriginInner> response) { return response.body(); } }); }
Creates a new origin within the specified endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin that is unique within the endpoint.
  • origin – Origin properties
Throws:
Returns:the observable to the OriginInner object
/** * Creates a new origin within the specified endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin that is unique within the endpoint. * @param origin Origin properties * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OriginInner object */
public Observable<ServiceResponse<OriginInner>> beginCreateWithServiceResponseAsync(String resourceGroupName, String profileName, String endpointName, String originName, OriginInner origin) { 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 (endpointName == null) { throw new IllegalArgumentException("Parameter endpointName is required and cannot be null."); } if (originName == null) { throw new IllegalArgumentException("Parameter originName 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 (origin == null) { throw new IllegalArgumentException("Parameter origin 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(origin); return service.beginCreate(resourceGroupName, profileName, endpointName, originName, this.client.subscriptionId(), origin, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OriginInner>>>() { @Override public Observable<ServiceResponse<OriginInner>> call(Response<ResponseBody> response) { try { ServiceResponse<OriginInner> clientResponse = beginCreateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<OriginInner> beginCreateDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<OriginInner, ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<OriginInner>() { }.getType()) .register(201, new TypeToken<OriginInner>() { }.getType()) .register(202, new TypeToken<OriginInner>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); }
Updates an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
  • originUpdateProperties – Origin properties
Throws:
Returns:the OriginInner object if successful.
/** * Updates an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties * @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 OriginInner object if successful. */
public OriginInner update(String resourceGroupName, String profileName, String endpointName, String originName, OriginUpdateParameters originUpdateProperties) { return updateWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName, originUpdateProperties).toBlocking().last().body(); }
Updates an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
  • originUpdateProperties – Origin properties
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Updates an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties * @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<OriginInner> updateAsync(String resourceGroupName, String profileName, String endpointName, String originName, OriginUpdateParameters originUpdateProperties, final ServiceCallback<OriginInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName, originUpdateProperties), serviceCallback); }
Updates an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
  • originUpdateProperties – Origin properties
Throws:
Returns:the observable for the request
/** * Updates an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<OriginInner> updateAsync(String resourceGroupName, String profileName, String endpointName, String originName, OriginUpdateParameters originUpdateProperties) { return updateWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName, originUpdateProperties).map(new Func1<ServiceResponse<OriginInner>, OriginInner>() { @Override public OriginInner call(ServiceResponse<OriginInner> response) { return response.body(); } }); }
Updates an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
  • originUpdateProperties – Origin properties
Throws:
Returns:the observable for the request
/** * Updates an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<OriginInner>> updateWithServiceResponseAsync(String resourceGroupName, String profileName, String endpointName, String originName, OriginUpdateParameters originUpdateProperties) { 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 (endpointName == null) { throw new IllegalArgumentException("Parameter endpointName is required and cannot be null."); } if (originName == null) { throw new IllegalArgumentException("Parameter originName 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 (originUpdateProperties == null) { throw new IllegalArgumentException("Parameter originUpdateProperties 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(originUpdateProperties); Observable<Response<ResponseBody>> observable = service.update(resourceGroupName, profileName, endpointName, originName, this.client.subscriptionId(), originUpdateProperties, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<OriginInner>() { }.getType()); }
Updates an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
  • originUpdateProperties – Origin properties
Throws:
Returns:the OriginInner object if successful.
/** * Updates an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties * @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 OriginInner object if successful. */
public OriginInner beginUpdate(String resourceGroupName, String profileName, String endpointName, String originName, OriginUpdateParameters originUpdateProperties) { return beginUpdateWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName, originUpdateProperties).toBlocking().single().body(); }
Updates an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
  • originUpdateProperties – Origin properties
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Updates an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties * @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<OriginInner> beginUpdateAsync(String resourceGroupName, String profileName, String endpointName, String originName, OriginUpdateParameters originUpdateProperties, final ServiceCallback<OriginInner> serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName, originUpdateProperties), serviceCallback); }
Updates an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
  • originUpdateProperties – Origin properties
Throws:
Returns:the observable to the OriginInner object
/** * Updates an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OriginInner object */
public Observable<OriginInner> beginUpdateAsync(String resourceGroupName, String profileName, String endpointName, String originName, OriginUpdateParameters originUpdateProperties) { return beginUpdateWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName, originUpdateProperties).map(new Func1<ServiceResponse<OriginInner>, OriginInner>() { @Override public OriginInner call(ServiceResponse<OriginInner> response) { return response.body(); } }); }
Updates an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
  • originUpdateProperties – Origin properties
Throws:
Returns:the observable to the OriginInner object
/** * Updates an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OriginInner object */
public Observable<ServiceResponse<OriginInner>> beginUpdateWithServiceResponseAsync(String resourceGroupName, String profileName, String endpointName, String originName, OriginUpdateParameters originUpdateProperties) { 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 (endpointName == null) { throw new IllegalArgumentException("Parameter endpointName is required and cannot be null."); } if (originName == null) { throw new IllegalArgumentException("Parameter originName 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 (originUpdateProperties == null) { throw new IllegalArgumentException("Parameter originUpdateProperties 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(originUpdateProperties); return service.beginUpdate(resourceGroupName, profileName, endpointName, originName, this.client.subscriptionId(), originUpdateProperties, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OriginInner>>>() { @Override public Observable<ServiceResponse<OriginInner>> call(Response<ResponseBody> response) { try { ServiceResponse<OriginInner> clientResponse = beginUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<OriginInner> beginUpdateDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<OriginInner, ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<OriginInner>() { }.getType()) .register(202, new TypeToken<OriginInner>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); }
Deletes an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
Throws:
/** * Deletes an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @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, String endpointName, String originName) { deleteWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName).toBlocking().last().body(); }
Deletes an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @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, String endpointName, String originName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName), serviceCallback); }
Deletes an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
Throws:
Returns:the observable for the request
/** * Deletes an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deleteAsync(String resourceGroupName, String profileName, String endpointName, String originName) { return deleteWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
Throws:
Returns:the observable for the request
/** * Deletes an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String profileName, String endpointName, String originName) { 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 (endpointName == null) { throw new IllegalArgumentException("Parameter endpointName is required and cannot be null."); } if (originName == null) { throw new IllegalArgumentException("Parameter originName 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, endpointName, originName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Deletes an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
Throws:
/** * Deletes an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @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, String endpointName, String originName) { beginDeleteWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName).toBlocking().single().body(); }
Deletes an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @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, String endpointName, String originName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName), serviceCallback); }
Deletes an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginDeleteAsync(String resourceGroupName, String profileName, String endpointName, String originName) { return beginDeleteWithServiceResponseAsync(resourceGroupName, profileName, endpointName, originName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes an existing origin within an endpoint.
Params:
  • resourceGroupName – Name of the Resource group within the Azure subscription.
  • profileName – Name of the CDN profile which is unique within the resource group.
  • endpointName – Name of the endpoint under the profile which is unique globally.
  • originName – Name of the origin which is unique within the endpoint.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes an existing origin within an endpoint. * * @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 endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginDeleteWithServiceResponseAsync(String resourceGroupName, String profileName, String endpointName, String originName) { 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 (endpointName == null) { throw new IllegalArgumentException("Parameter endpointName is required and cannot be null."); } if (originName == null) { throw new IllegalArgumentException("Parameter originName 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, endpointName, originName, 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); }
Lists all of the existing origins within an endpoint.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<OriginInner> object if successful.
/** * Lists all of the existing origins within an endpoint. * * @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&lt;OriginInner&gt; object if successful. */
public PagedList<OriginInner> listByEndpointNext(final String nextPageLink) { ServiceResponse<Page<OriginInner>> response = listByEndpointNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<OriginInner>(response.body()) { @Override public Page<OriginInner> nextPage(String nextPageLink) { return listByEndpointNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Lists all of the existing origins within an endpoint.
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:
Returns:the ServiceFuture object
/** * Lists all of the existing origins within an endpoint. * * @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<OriginInner>> listByEndpointNextAsync(final String nextPageLink, final ServiceFuture<List<OriginInner>> serviceFuture, final ListOperationCallback<OriginInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByEndpointNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<OriginInner>>>>() { @Override public Observable<ServiceResponse<Page<OriginInner>>> call(String nextPageLink) { return listByEndpointNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Lists all of the existing origins within an endpoint.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<OriginInner> object
/** * Lists all of the existing origins within an endpoint. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;OriginInner&gt; object */
public Observable<Page<OriginInner>> listByEndpointNextAsync(final String nextPageLink) { return listByEndpointNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<OriginInner>>, Page<OriginInner>>() { @Override public Page<OriginInner> call(ServiceResponse<Page<OriginInner>> response) { return response.body(); } }); }
Lists all of the existing origins within an endpoint.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<OriginInner> object
/** * Lists all of the existing origins within an endpoint. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;OriginInner&gt; object */
public Observable<ServiceResponse<Page<OriginInner>>> listByEndpointNextWithServiceResponseAsync(final String nextPageLink) { return listByEndpointNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<OriginInner>>, Observable<ServiceResponse<Page<OriginInner>>>>() { @Override public Observable<ServiceResponse<Page<OriginInner>>> call(ServiceResponse<Page<OriginInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByEndpointNextWithServiceResponseAsync(nextPageLink)); } }); }
Lists all of the existing origins within an endpoint. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<OriginInner> object wrapped in ServiceResponse if successful.
/** * Lists all of the existing origins within an endpoint. * ServiceResponse<PageImpl<OriginInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;OriginInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<OriginInner>>> listByEndpointNextSinglePageAsync(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.listByEndpointNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<OriginInner>>>>() { @Override public Observable<ServiceResponse<Page<OriginInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<OriginInner>> result = listByEndpointNextDelegate(response); return Observable.just(new ServiceResponse<Page<OriginInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<OriginInner>> listByEndpointNextDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<OriginInner>, ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<OriginInner>>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } }