diff --git a/sdk/appplatform/mgmt-v2019_05_01_preview/pom.xml b/sdk/appplatform/mgmt-v2019_05_01_preview/pom.xml
index 98f72fb94143..6d091c6304ef 100644
--- a/sdk/appplatform/mgmt-v2019_05_01_preview/pom.xml
+++ b/sdk/appplatform/mgmt-v2019_05_01_preview/pom.xml
@@ -11,11 +11,11 @@
com.microsoft.azure
azure-arm-parent
- 1.2.0
+ 1.1.0
../../../pom.management.xml
azure-mgmt-appplatform
- 1.0.0-beta-1
+ 1.0.0-beta
jar
Microsoft Azure SDK for AppPlatform Management
This package contains Microsoft AppPlatform Management SDK.
diff --git a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProperties.java b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProperties.java
index 272ff8751b6c..c9c15bd9ccb3 100644
--- a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProperties.java
+++ b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProperties.java
@@ -29,7 +29,7 @@ public class AppResourceProperties {
/**
* Provisioning state of the App. Possible values include: 'Succeeded',
- * 'Failed'.
+ * 'Failed', 'Creating', 'Updating'.
*/
@JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private AppResourceProvisioningState provisioningState;
@@ -88,7 +88,7 @@ public String url() {
}
/**
- * Get provisioning state of the App. Possible values include: 'Succeeded', 'Failed'.
+ * Get provisioning state of the App. Possible values include: 'Succeeded', 'Failed', 'Creating', 'Updating'.
*
* @return the provisioningState value
*/
diff --git a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProvisioningState.java b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProvisioningState.java
index 75583dfa840c..5de11d53fd2d 100644
--- a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProvisioningState.java
+++ b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/AppResourceProvisioningState.java
@@ -22,6 +22,12 @@ public final class AppResourceProvisioningState extends ExpandableStringEnum createOrUpdateAsync(String resourceGroupName, String serviceName);
+ Observable createOrUpdateAsync(String resourceGroupName, String serviceName, ServiceResourceInner resource);
/**
* Operation to delete a Service.
@@ -50,10 +52,11 @@ public interface Services {
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
+ * @param resource Parameters for the update operation
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
- Observable updateAsync(String resourceGroupName, String serviceName);
+ Observable updateAsync(String resourceGroupName, String serviceName, ServiceResourceInner resource);
/**
* Regenerate a test key for a Service.
diff --git a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppPlatformManagementClientImpl.java b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppPlatformManagementClientImpl.java
index 6e5eb0418d75..94ae1b62eaab 100644
--- a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppPlatformManagementClientImpl.java
+++ b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppPlatformManagementClientImpl.java
@@ -10,6 +10,8 @@
import com.microsoft.azure.AzureClient;
import com.microsoft.azure.AzureServiceClient;
+import com.microsoft.azure.LongRunningFinalState;
+import com.microsoft.azure.LongRunningOperationOptions;
import com.microsoft.rest.credentials.ServiceClientCredentials;
import com.microsoft.rest.RestClient;
diff --git a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppsInner.java b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppsInner.java
index 70e18cc35be9..5b2221d77694 100644
--- a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppsInner.java
+++ b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/AppsInner.java
@@ -66,12 +66,16 @@ public AppsInner(Retrofit retrofit, AppPlatformManagementClientImpl client) {
interface AppsService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Apps get" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}")
- Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Query("syncStatus") String syncStatus, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Query("api-version") String apiVersion, @Query("syncStatus") String syncStatus, @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.appplatform.v2019_05_01_preview.Apps createOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}")
Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AppResourceInner appResource, @Header("User-Agent") String userAgent);
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Apps beginCreateOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}")
+ Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AppResourceInner appResource, @Header("User-Agent") String userAgent);
+
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Apps delete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}", method = "DELETE", hasBody = true)
Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@@ -80,6 +84,10 @@ interface AppsService {
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}")
Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AppResourceInner appResource, @Header("User-Agent") String userAgent);
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Apps beginUpdate" })
+ @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}")
+ Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AppResourceInner appResource, @Header("User-Agent") String userAgent);
+
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Apps list" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps")
Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@@ -164,7 +172,7 @@ public Observable> getWithServiceResponseAsync
throw new IllegalArgumentException("Parameter appName is required and cannot be null.");
}
final String syncStatus = null;
- return service.get(this.client.subscriptionId(), resourceGroupName, serviceName, appName, syncStatus, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ return service.get(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), syncStatus, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
@@ -251,7 +259,7 @@ public Observable> getWithServiceResponseAsync
if (appName == null) {
throw new IllegalArgumentException("Parameter appName is required and cannot be null.");
}
- return service.get(this.client.subscriptionId(), resourceGroupName, serviceName, appName, syncStatus, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ return service.get(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), syncStatus, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
@@ -284,7 +292,7 @@ private ServiceResponse getDelegate(Response res
* @return the AppResourceInner object if successful.
*/
public AppResourceInner createOrUpdate(String resourceGroupName, String serviceName, String appName) {
- return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName).toBlocking().single().body();
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName).toBlocking().last().body();
}
/**
@@ -308,7 +316,7 @@ public ServiceFuture createOrUpdateAsync(String resourceGroupN
* @param serviceName The name of the Service resource.
* @param appName The name of the App resource.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the AppResourceInner object
+ * @return the observable for the request
*/
public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String appName) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName).map(new Func1, AppResourceInner>() {
@@ -326,7 +334,7 @@ public AppResourceInner call(ServiceResponse response) {
* @param serviceName The name of the Service resource.
* @param appName The name of the App resource.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the AppResourceInner object
+ * @return the observable for the request
*/
public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName) {
if (this.client.subscriptionId() == null) {
@@ -344,12 +352,167 @@ public Observable> createOrUpdateWithServiceRe
final AppResourceProperties properties = null;
AppResourceInner appResource = new AppResourceInner();
appResource.withProperties(null);
- return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, this.client.userAgent())
+ Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+ /**
+ * Create a new App or update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @param properties Properties of the App resource
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the AppResourceInner object if successful.
+ */
+ public AppResourceInner createOrUpdate(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).toBlocking().last().body();
+ }
+
+ /**
+ * Create a new App or update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @param properties Properties of the App resource
+ * @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 createOrUpdateAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties), serviceCallback);
+ }
+
+ /**
+ * Create a new App or update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @param properties Properties of the App resource
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).map(new Func1, AppResourceInner>() {
+ @Override
+ public AppResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create a new App or update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @param properties Properties of the App resource
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serviceName == null) {
+ throw new IllegalArgumentException("Parameter serviceName is required and cannot be null.");
+ }
+ if (appName == null) {
+ throw new IllegalArgumentException("Parameter appName is required and cannot be null.");
+ }
+ Validator.validate(properties);
+ AppResourceInner appResource = new AppResourceInner();
+ appResource.withProperties(properties);
+ Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Create a new App or update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the AppResourceInner object if successful.
+ */
+ public AppResourceInner beginCreateOrUpdate(String resourceGroupName, String serviceName, String appName) {
+ return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName).toBlocking().single().body();
+ }
+
+ /**
+ * Create a new App or update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @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 beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, String appName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName), serviceCallback);
+ }
+
+ /**
+ * Create a new App or update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AppResourceInner object
+ */
+ public Observable beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, String appName) {
+ return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName).map(new Func1, AppResourceInner>() {
+ @Override
+ public AppResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create a new App or update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AppResourceInner object
+ */
+ public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serviceName == null) {
+ throw new IllegalArgumentException("Parameter serviceName is required and cannot be null.");
+ }
+ if (appName == null) {
+ throw new IllegalArgumentException("Parameter appName is required and cannot be null.");
+ }
+ final AppResourceProperties properties = null;
+ AppResourceInner appResource = new AppResourceInner();
+ appResource.withProperties(null);
+ return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
try {
- ServiceResponse clientResponse = createOrUpdateDelegate(response);
+ ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
@@ -370,8 +533,8 @@ public Observable> call(Response
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the AppResourceInner object if successful.
*/
- public AppResourceInner createOrUpdate(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
- return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).toBlocking().single().body();
+ public AppResourceInner beginCreateOrUpdate(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
+ return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).toBlocking().single().body();
}
/**
@@ -385,8 +548,8 @@ public AppResourceInner createOrUpdate(String resourceGroupName, String serviceN
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
- public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties), serviceCallback);
+ public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties), serviceCallback);
}
/**
@@ -399,8 +562,8 @@ public ServiceFuture createOrUpdateAsync(String resourceGroupN
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the AppResourceInner object
*/
- public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
- return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).map(new Func1, AppResourceInner>() {
+ public Observable beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
+ return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).map(new Func1, AppResourceInner>() {
@Override
public AppResourceInner call(ServiceResponse response) {
return response.body();
@@ -418,7 +581,7 @@ public AppResourceInner call(ServiceResponse response) {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the AppResourceInner object
*/
- public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
+ public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
@@ -432,17 +595,14 @@ public Observable> createOrUpdateWithServiceRe
throw new IllegalArgumentException("Parameter appName is required and cannot be null.");
}
Validator.validate(properties);
- AppResourceInner appResource = null;
- if (properties != null) {
- appResource = new AppResourceInner();
- appResource.withProperties(properties);
- }
- return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, this.client.userAgent())
+ AppResourceInner appResource = new AppResourceInner();
+ appResource.withProperties(properties);
+ return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
try {
- ServiceResponse clientResponse = createOrUpdateDelegate(response);
+ ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
@@ -451,9 +611,10 @@ public Observable> call(Response
});
}
- private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
+ .register(201, new TypeToken() { }.getType())
.registerError(CloudException.class)
.build(response);
}
@@ -560,7 +721,7 @@ private ServiceResponse deleteDelegate(Response response) th
* @return the AppResourceInner object if successful.
*/
public AppResourceInner update(String resourceGroupName, String serviceName, String appName) {
- return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName).toBlocking().single().body();
+ return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName).toBlocking().last().body();
}
/**
@@ -584,7 +745,7 @@ public ServiceFuture updateAsync(String resourceGroupName, Str
* @param serviceName The name of the Service resource.
* @param appName The name of the App resource.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the AppResourceInner object
+ * @return the observable for the request
*/
public Observable updateAsync(String resourceGroupName, String serviceName, String appName) {
return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName).map(new Func1, AppResourceInner>() {
@@ -602,7 +763,7 @@ public AppResourceInner call(ServiceResponse response) {
* @param serviceName The name of the Service resource.
* @param appName The name of the App resource.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the AppResourceInner object
+ * @return the observable for the request
*/
public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName) {
if (this.client.subscriptionId() == null) {
@@ -620,12 +781,167 @@ public Observable> updateWithServiceResponseAs
final AppResourceProperties properties = null;
AppResourceInner appResource = new AppResourceInner();
appResource.withProperties(null);
- return service.update(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, this.client.userAgent())
+ Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+ /**
+ * Operation to update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @param properties Properties of the App resource
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the AppResourceInner object if successful.
+ */
+ public AppResourceInner update(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
+ return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).toBlocking().last().body();
+ }
+
+ /**
+ * Operation to update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @param properties Properties of the App resource
+ * @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 updateAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties), serviceCallback);
+ }
+
+ /**
+ * Operation to update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @param properties Properties of the App resource
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable updateAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
+ return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).map(new Func1, AppResourceInner>() {
+ @Override
+ public AppResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Operation to update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @param properties Properties of the App resource
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serviceName == null) {
+ throw new IllegalArgumentException("Parameter serviceName is required and cannot be null.");
+ }
+ if (appName == null) {
+ throw new IllegalArgumentException("Parameter appName is required and cannot be null.");
+ }
+ Validator.validate(properties);
+ AppResourceInner appResource = new AppResourceInner();
+ appResource.withProperties(properties);
+ Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Operation to update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the AppResourceInner object if successful.
+ */
+ public AppResourceInner beginUpdate(String resourceGroupName, String serviceName, String appName) {
+ return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName).toBlocking().single().body();
+ }
+
+ /**
+ * Operation to update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @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 beginUpdateAsync(String resourceGroupName, String serviceName, String appName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName), serviceCallback);
+ }
+
+ /**
+ * Operation to update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AppResourceInner object
+ */
+ public Observable beginUpdateAsync(String resourceGroupName, String serviceName, String appName) {
+ return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName).map(new Func1, AppResourceInner>() {
+ @Override
+ public AppResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Operation to update an exiting App.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serviceName The name of the Service resource.
+ * @param appName The name of the App resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AppResourceInner object
+ */
+ public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serviceName == null) {
+ throw new IllegalArgumentException("Parameter serviceName is required and cannot be null.");
+ }
+ if (appName == null) {
+ throw new IllegalArgumentException("Parameter appName is required and cannot be null.");
+ }
+ final AppResourceProperties properties = null;
+ AppResourceInner appResource = new AppResourceInner();
+ appResource.withProperties(null);
+ return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
try {
- ServiceResponse clientResponse = updateDelegate(response);
+ ServiceResponse clientResponse = beginUpdateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
@@ -646,8 +962,8 @@ public Observable> call(Response
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the AppResourceInner object if successful.
*/
- public AppResourceInner update(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
- return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).toBlocking().single().body();
+ public AppResourceInner beginUpdate(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
+ return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).toBlocking().single().body();
}
/**
@@ -661,8 +977,8 @@ public AppResourceInner update(String resourceGroupName, String serviceName, Str
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
- public ServiceFuture updateAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties), serviceCallback);
+ public ServiceFuture beginUpdateAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties), serviceCallback);
}
/**
@@ -675,8 +991,8 @@ public ServiceFuture updateAsync(String resourceGroupName, Str
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the AppResourceInner object
*/
- public Observable updateAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
- return updateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).map(new Func1, AppResourceInner>() {
+ public Observable beginUpdateAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
+ return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName, appName, properties).map(new Func1, AppResourceInner>() {
@Override
public AppResourceInner call(ServiceResponse response) {
return response.body();
@@ -694,7 +1010,7 @@ public AppResourceInner call(ServiceResponse response) {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the AppResourceInner object
*/
- public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
+ public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String appName, AppResourceProperties properties) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
@@ -708,17 +1024,14 @@ public Observable> updateWithServiceResponseAs
throw new IllegalArgumentException("Parameter appName is required and cannot be null.");
}
Validator.validate(properties);
- AppResourceInner appResource = null;
- if (properties != null) {
- appResource = new AppResourceInner();
- appResource.withProperties(properties);
- }
- return service.update(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, this.client.userAgent())
+ AppResourceInner appResource = new AppResourceInner();
+ appResource.withProperties(properties);
+ return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), this.client.acceptLanguage(), appResource, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
try {
- ServiceResponse clientResponse = updateDelegate(response);
+ ServiceResponse clientResponse = beginUpdateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
@@ -727,9 +1040,10 @@ public Observable> call(Response
});
}
- private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
+ .register(202, new TypeToken() { }.getType())
.registerError(CloudException.class)
.build(response);
}
diff --git a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingsInner.java b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingsInner.java
index eb4453ff46de..36790bb837aa 100644
--- a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingsInner.java
+++ b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/BindingsInner.java
@@ -360,11 +360,8 @@ public Observable> createOrUpdateWithServi
throw new IllegalArgumentException("Parameter bindingName is required and cannot be null.");
}
Validator.validate(properties);
- BindingResourceInner bindingResource = null;
- if (properties != null) {
- bindingResource = new BindingResourceInner();
- bindingResource.withProperties(properties);
- }
+ BindingResourceInner bindingResource = new BindingResourceInner();
+ bindingResource.withProperties(properties);
return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, bindingName, this.client.apiVersion(), this.client.acceptLanguage(), bindingResource, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
@@ -657,11 +654,8 @@ public Observable> updateWithServiceRespon
throw new IllegalArgumentException("Parameter bindingName is required and cannot be null.");
}
Validator.validate(properties);
- BindingResourceInner bindingResource = null;
- if (properties != null) {
- bindingResource = new BindingResourceInner();
- bindingResource.withProperties(properties);
- }
+ BindingResourceInner bindingResource = new BindingResourceInner();
+ bindingResource.withProperties(properties);
return service.update(this.client.subscriptionId(), resourceGroupName, serviceName, appName, bindingName, this.client.apiVersion(), this.client.acceptLanguage(), bindingResource, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
diff --git a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentsInner.java b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentsInner.java
index cc60083c5c06..c4488fa12457 100644
--- a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentsInner.java
+++ b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/DeploymentsInner.java
@@ -40,8 +40,6 @@
import rx.Observable;
import com.microsoft.azure.LongRunningFinalState;
import com.microsoft.azure.LongRunningOperationOptions;
-import com.microsoft.azure.LongRunningFinalState;
-import com.microsoft.azure.LongRunningOperationOptions;
/**
* An instance of this class provides access to all the operations defined
@@ -95,11 +93,11 @@ interface DeploymentsService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Deployments list" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments")
- Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Query("version") String version, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("appName") String appName, @Query("api-version") String apiVersion, @Query("version") String version, @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.appplatform.v2019_05_01_preview.Deployments listClusterAllDeployments" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/deployments")
- Observable> listClusterAllDeployments(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Query("version") String version, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ Observable> listClusterAllDeployments(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Query("version") String version, @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.appplatform.v2019_05_01_preview.Deployments start" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/start")
@@ -399,11 +397,8 @@ public Observable> createOrUpdateWithSe
throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null.");
}
Validator.validate(properties);
- DeploymentResourceInner deploymentResource = null;
- if (properties != null) {
- deploymentResource = new DeploymentResourceInner();
- deploymentResource.withProperties(properties);
- }
+ DeploymentResourceInner deploymentResource = new DeploymentResourceInner();
+ deploymentResource.withProperties(properties);
Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), deploymentResource, this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
}
@@ -582,11 +577,8 @@ public Observable> beginCreateOrUpdateW
throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null.");
}
Validator.validate(properties);
- DeploymentResourceInner deploymentResource = null;
- if (properties != null) {
- deploymentResource = new DeploymentResourceInner();
- deploymentResource.withProperties(properties);
- }
+ DeploymentResourceInner deploymentResource = new DeploymentResourceInner();
+ deploymentResource.withProperties(properties);
return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), deploymentResource, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
@@ -869,11 +861,8 @@ public Observable> updateWithServiceRes
throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null.");
}
Validator.validate(properties);
- DeploymentResourceInner deploymentResource = null;
- if (properties != null) {
- deploymentResource = new DeploymentResourceInner();
- deploymentResource.withProperties(properties);
- }
+ DeploymentResourceInner deploymentResource = new DeploymentResourceInner();
+ deploymentResource.withProperties(properties);
Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), deploymentResource, this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
}
@@ -1052,11 +1041,8 @@ public Observable> beginUpdateWithServi
throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null.");
}
Validator.validate(properties);
- DeploymentResourceInner deploymentResource = null;
- if (properties != null) {
- deploymentResource = new DeploymentResourceInner();
- deploymentResource.withProperties(properties);
- }
+ DeploymentResourceInner deploymentResource = new DeploymentResourceInner();
+ deploymentResource.withProperties(properties);
return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, appName, deploymentName, this.client.apiVersion(), this.client.acceptLanguage(), deploymentResource, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
@@ -1188,7 +1174,7 @@ public Observable>> listSinglePage
}
final List version = null;
String versionConverted = this.client.serializerAdapter().serializeList(version, CollectionFormat.MULTI);
- return service.list(this.client.subscriptionId(), resourceGroupName, serviceName, appName, versionConverted, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ return service.list(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), versionConverted, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>>() {
@Override
public Observable>> call(Response response) {
@@ -1316,7 +1302,7 @@ public Observable>> listSinglePage
}
Validator.validate(version);
String versionConverted = this.client.serializerAdapter().serializeList(version, CollectionFormat.MULTI);
- return service.list(this.client.subscriptionId(), resourceGroupName, serviceName, appName, versionConverted, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ return service.list(this.client.subscriptionId(), resourceGroupName, serviceName, appName, this.client.apiVersion(), versionConverted, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>>() {
@Override
public Observable>> call(Response response) {
@@ -1438,7 +1424,7 @@ public Observable>> listClusterAll
}
final List version = null;
String versionConverted = this.client.serializerAdapter().serializeList(version, CollectionFormat.MULTI);
- return service.listClusterAllDeployments(this.client.subscriptionId(), resourceGroupName, serviceName, versionConverted, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ return service.listClusterAllDeployments(this.client.subscriptionId(), resourceGroupName, serviceName, this.client.apiVersion(), versionConverted, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>>() {
@Override
public Observable>> call(Response response) {
@@ -1558,7 +1544,7 @@ public Observable>> listClusterAll
}
Validator.validate(version);
String versionConverted = this.client.serializerAdapter().serializeList(version, CollectionFormat.MULTI);
- return service.listClusterAllDeployments(this.client.subscriptionId(), resourceGroupName, serviceName, versionConverted, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ return service.listClusterAllDeployments(this.client.subscriptionId(), resourceGroupName, serviceName, this.client.apiVersion(), versionConverted, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>>() {
@Override
public Observable>> call(Response response) {
diff --git a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesImpl.java b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesImpl.java
index 377b9a7f7fdd..8bd1c5bf441c 100644
--- a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesImpl.java
+++ b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesImpl.java
@@ -46,9 +46,9 @@ public ServiceResource call(ServiceResourceInner inner) {
}
@Override
- public Observable createOrUpdateAsync(String resourceGroupName, String serviceName) {
+ public Observable createOrUpdateAsync(String resourceGroupName, String serviceName, ServiceResourceInner resource) {
ServicesInner client = this.inner();
- return client.createOrUpdateAsync(resourceGroupName, serviceName)
+ return client.createOrUpdateAsync(resourceGroupName, serviceName, resource)
.map(new Func1() {
@Override
public ServiceResource call(ServiceResourceInner inner) {
@@ -64,9 +64,9 @@ public Completable deleteAsync(String resourceGroupName, String serviceName) {
}
@Override
- public Observable updateAsync(String resourceGroupName, String serviceName) {
+ public Observable updateAsync(String resourceGroupName, String serviceName, ServiceResourceInner resource) {
ServicesInner client = this.inner();
- return client.updateAsync(resourceGroupName, serviceName)
+ return client.updateAsync(resourceGroupName, serviceName, resource)
.map(new Func1() {
@Override
public ServiceResource call(ServiceResourceInner inner) {
diff --git a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesInner.java b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesInner.java
index bb1d14453825..2bd3d9c1d88b 100644
--- a/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesInner.java
+++ b/sdk/appplatform/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/appplatform/v2019_05_01_preview/implementation/ServicesInner.java
@@ -75,11 +75,11 @@ interface ServicesService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Services createOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}")
- Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Body ServiceResourceInner resource, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Body ServiceResourceInner resource, @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.appplatform.v2019_05_01_preview.Services beginCreateOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}")
- Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Body ServiceResourceInner resource, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Body ServiceResourceInner resource, @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.appplatform.v2019_05_01_preview.Services delete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}", method = "DELETE", hasBody = true)
@@ -91,11 +91,11 @@ interface ServicesService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Services update" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}")
- Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Body ServiceResourceInner resource, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Body ServiceResourceInner resource, @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.appplatform.v2019_05_01_preview.Services beginUpdate" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}")
- Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Body ServiceResourceInner resource, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Body ServiceResourceInner resource, @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.appplatform.v2019_05_01_preview.Services listTestKeys" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/listTestKeys")
@@ -115,7 +115,7 @@ interface ServicesService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appplatform.v2019_05_01_preview.Services checkNameAvailability" })
@POST("subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/locations/{location}/checkNameAvailability")
- Observable> checkNameAvailability(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Body NameAvailabilityParameters availabilityParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Body NameAvailabilityParameters availabilityParameters, @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.appplatform.v2019_05_01_preview.Services list" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/Spring")
@@ -218,72 +218,6 @@ private ServiceResponse getByResourceGroupDelegate(Respons
.build(response);
}
- /**
- * Create a new Service or update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- * @return the ServiceResourceInner object if successful.
- */
- public ServiceResourceInner createOrUpdate(String resourceGroupName, String serviceName) {
- return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().last().body();
- }
-
- /**
- * Create a new Service or update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @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 createOrUpdateAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback);
- }
-
- /**
- * Create a new Service or update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable for the request
- */
- public Observable createOrUpdateAsync(String resourceGroupName, String serviceName) {
- return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, ServiceResourceInner>() {
- @Override
- public ServiceResourceInner call(ServiceResponse response) {
- return response.body();
- }
- });
- }
-
- /**
- * Create a new Service or update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable for the request
- */
- public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName) {
- if (this.client.subscriptionId() == null) {
- throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
- }
- if (resourceGroupName == null) {
- throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
- }
- if (serviceName == null) {
- throw new IllegalArgumentException("Parameter serviceName is required and cannot be null.");
- }
- final ServiceResourceInner resource = null;
- Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, resource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
- return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
- }
/**
* Create a new Service or update an exiting Service.
*
@@ -350,88 +284,14 @@ public Observable> createOrUpdateWithServi
if (serviceName == null) {
throw new IllegalArgumentException("Parameter serviceName is required and cannot be null.");
}
+ if (resource == null) {
+ throw new IllegalArgumentException("Parameter resource is required and cannot be null.");
+ }
Validator.validate(resource);
- Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, resource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
+ Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, this.client.apiVersion(), resource, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
}
- /**
- * Create a new Service or update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- * @return the ServiceResourceInner object if successful.
- */
- public ServiceResourceInner beginCreateOrUpdate(String resourceGroupName, String serviceName) {
- return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body();
- }
-
- /**
- * Create a new Service or update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @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 beginCreateOrUpdateAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback);
- }
-
- /**
- * Create a new Service or update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the ServiceResourceInner object
- */
- public Observable beginCreateOrUpdateAsync(String resourceGroupName, String serviceName) {
- return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, ServiceResourceInner>() {
- @Override
- public ServiceResourceInner call(ServiceResponse response) {
- return response.body();
- }
- });
- }
-
- /**
- * Create a new Service or update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the ServiceResourceInner object
- */
- public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName) {
- if (this.client.subscriptionId() == null) {
- throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
- }
- if (resourceGroupName == null) {
- throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
- }
- if (serviceName == null) {
- throw new IllegalArgumentException("Parameter serviceName is required and cannot be null.");
- }
- final ServiceResourceInner resource = null;
- return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, resource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
- .flatMap(new Func1, Observable>>() {
- @Override
- public Observable> call(Response response) {
- try {
- ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response);
- return Observable.just(clientResponse);
- } catch (Throwable t) {
- return Observable.error(t);
- }
- }
- });
- }
-
/**
* Create a new Service or update an exiting Service.
*
@@ -498,8 +358,11 @@ public Observable> beginCreateOrUpdateWith
if (serviceName == null) {
throw new IllegalArgumentException("Parameter serviceName is required and cannot be null.");
}
+ if (resource == null) {
+ throw new IllegalArgumentException("Parameter resource is required and cannot be null.");
+ }
Validator.validate(resource);
- return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, resource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, this.client.apiVersion(), resource, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
@@ -669,72 +532,6 @@ private ServiceResponse beginDeleteDelegate(Response respons
.build(response);
}
- /**
- * Operation to update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- * @return the ServiceResourceInner object if successful.
- */
- public ServiceResourceInner update(String resourceGroupName, String serviceName) {
- return updateWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().last().body();
- }
-
- /**
- * Operation to update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @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 updateAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback);
- }
-
- /**
- * Operation to update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable for the request
- */
- public Observable updateAsync(String resourceGroupName, String serviceName) {
- return updateWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, ServiceResourceInner>() {
- @Override
- public ServiceResourceInner call(ServiceResponse response) {
- return response.body();
- }
- });
- }
-
- /**
- * Operation to update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable for the request
- */
- public Observable> updateWithServiceResponseAsync(String resourceGroupName, String serviceName) {
- if (this.client.subscriptionId() == null) {
- throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
- }
- if (resourceGroupName == null) {
- throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
- }
- if (serviceName == null) {
- throw new IllegalArgumentException("Parameter serviceName is required and cannot be null.");
- }
- final ServiceResourceInner resource = null;
- Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, serviceName, resource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
- return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
- }
/**
* Operation to update an exiting Service.
*
@@ -801,88 +598,14 @@ public Observable> updateWithServiceRespon
if (serviceName == null) {
throw new IllegalArgumentException("Parameter serviceName is required and cannot be null.");
}
+ if (resource == null) {
+ throw new IllegalArgumentException("Parameter resource is required and cannot be null.");
+ }
Validator.validate(resource);
- Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, serviceName, resource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
+ Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, serviceName, this.client.apiVersion(), resource, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
}
- /**
- * Operation to update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws CloudException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- * @return the ServiceResourceInner object if successful.
- */
- public ServiceResourceInner beginUpdate(String resourceGroupName, String serviceName) {
- return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().body();
- }
-
- /**
- * Operation to update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @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 beginUpdateAsync(String resourceGroupName, String serviceName, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName), serviceCallback);
- }
-
- /**
- * Operation to update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the ServiceResourceInner object
- */
- public Observable beginUpdateAsync(String resourceGroupName, String serviceName) {
- return beginUpdateWithServiceResponseAsync(resourceGroupName, serviceName).map(new Func1, ServiceResourceInner>() {
- @Override
- public ServiceResourceInner call(ServiceResponse response) {
- return response.body();
- }
- });
- }
-
- /**
- * Operation to update an exiting Service.
- *
- * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- * @param serviceName The name of the Service resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the ServiceResourceInner object
- */
- public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName) {
- if (this.client.subscriptionId() == null) {
- throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
- }
- if (resourceGroupName == null) {
- throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
- }
- if (serviceName == null) {
- throw new IllegalArgumentException("Parameter serviceName is required and cannot be null.");
- }
- final ServiceResourceInner resource = null;
- return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, serviceName, resource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
- .flatMap(new Func1, Observable