Skip to content

Commit

Permalink
Regenerate with 20160906 autorest
Browse files Browse the repository at this point in the history
  • Loading branch information
jianghaolu committed Sep 6, 2016
1 parent 09b070f commit 3552614
Show file tree
Hide file tree
Showing 105 changed files with 19,488 additions and 5,133 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ interface SubscriptionsService {
* @throws CloudException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from invalid parameters
* @return the SubscriptionQuotasGetResultInner object wrapped in {@link ServiceResponse} if successful.
* @return the SubscriptionQuotasGetResultInner object if successful.
*/
public ServiceResponse<SubscriptionQuotasGetResultInner> getSubscriptionQuotas(String locationName) throws CloudException, IOException, IllegalArgumentException {
return getSubscriptionQuotasAsync(locationName).toBlocking().single();
public SubscriptionQuotasGetResultInner getSubscriptionQuotas(String locationName) throws CloudException, IOException, IllegalArgumentException {
return getSubscriptionQuotasWithServiceResponseAsync(locationName).toBlocking().single().getBody();
}

/**
Expand All @@ -79,7 +79,7 @@ public ServiceResponse<SubscriptionQuotasGetResultInner> getSubscriptionQuotas(S
* @return the {@link ServiceCall} object
*/
public ServiceCall<SubscriptionQuotasGetResultInner> getSubscriptionQuotasAsync(String locationName, final ServiceCallback<SubscriptionQuotasGetResultInner> serviceCallback) {
return ServiceCall.create(getSubscriptionQuotasAsync(locationName), serviceCallback);
return ServiceCall.create(getSubscriptionQuotasWithServiceResponseAsync(locationName), serviceCallback);
}

/**
Expand All @@ -88,7 +88,22 @@ public ServiceCall<SubscriptionQuotasGetResultInner> getSubscriptionQuotasAsync(
* @param locationName The desired region for the quotas.
* @return the observable to the SubscriptionQuotasGetResultInner object
*/
public Observable<ServiceResponse<SubscriptionQuotasGetResultInner>> getSubscriptionQuotasAsync(String locationName) {
public Observable<SubscriptionQuotasGetResultInner> getSubscriptionQuotasAsync(String locationName) {
return getSubscriptionQuotasWithServiceResponseAsync(locationName).map(new Func1<ServiceResponse<SubscriptionQuotasGetResultInner>, SubscriptionQuotasGetResultInner>() {
@Override
public SubscriptionQuotasGetResultInner call(ServiceResponse<SubscriptionQuotasGetResultInner> response) {
return response.getBody();
}
});
}

/**
* Gets the Batch service quotas for the specified suscription.
*
* @param locationName The desired region for the quotas.
* @return the observable to the SubscriptionQuotasGetResultInner object
*/
public Observable<ServiceResponse<SubscriptionQuotasGetResultInner>> getSubscriptionQuotasWithServiceResponseAsync(String locationName) {
if (locationName == null) {
throw new IllegalArgumentException("Parameter locationName is required and cannot be null.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.microsoft.azure.management.compute.AvailabilitySet;
import com.microsoft.azure.management.compute.InstanceViewStatus;
import com.microsoft.azure.management.resources.fluentcore.arm.models.implementation.GroupableResourceImpl;
import com.microsoft.rest.ServiceResponse;
import rx.Observable;
import rx.functions.Func1;

Expand Down Expand Up @@ -73,8 +72,8 @@ public List<InstanceViewStatus> statuses() {

@Override
public AvailabilitySet refresh() throws Exception {
ServiceResponse<AvailabilitySetInner> response = client.get(this.resourceGroupName(), this.name());
this.setInner(response.getBody());
AvailabilitySetInner response = client.get(this.resourceGroupName(), this.name());
this.setInner(response);
this.idOfVMsInSet = null;
return this;
}
Expand Down Expand Up @@ -102,10 +101,10 @@ public Observable<AvailabilitySet> applyAsync() {
public Observable<AvailabilitySet> createResourceAsync() {
final AvailabilitySetImpl self = this;
return this.client.createOrUpdateAsync(resourceGroupName(), name(), inner())
.map(new Func1<ServiceResponse<AvailabilitySetInner>, AvailabilitySet>() {
.map(new Func1<AvailabilitySetInner, AvailabilitySet>() {
@Override
public AvailabilitySet call(ServiceResponse<AvailabilitySetInner> availabilitySetInner) {
self.setInner(availabilitySetInner.getBody());
public AvailabilitySet call(AvailabilitySetInner availabilitySetInner) {
self.setInner(availabilitySetInner);
idOfVMsInSet = null;
return self;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl;
import com.microsoft.azure.management.resources.fluentcore.arm.models.implementation.GroupPagedList;
import com.microsoft.rest.RestException;
import com.microsoft.rest.ServiceResponse;

import java.io.IOException;
import java.util.List;
Expand Down Expand Up @@ -41,20 +40,20 @@ public PagedList<AvailabilitySet> list() throws CloudException, IOException {
return new GroupPagedList<AvailabilitySet>(this.myManager.resourceManager().resourceGroups().list()) {
@Override
public List<AvailabilitySet> listNextGroup(String resourceGroupName) throws RestException, IOException {
return wrapList(innerCollection.list(resourceGroupName).getBody());
return wrapList(innerCollection.list(resourceGroupName));
}
};
}

@Override
public PagedList<AvailabilitySet> listByGroup(String groupName) throws CloudException, IOException {
return wrapList(this.innerCollection.list(groupName).getBody());
return wrapList(this.innerCollection.list(groupName));
}

@Override
public AvailabilitySetImpl getByGroup(String groupName, String name) throws CloudException, IOException {
ServiceResponse<AvailabilitySetInner> response = this.innerCollection.get(groupName, name);
return wrapModel(response.getBody());
AvailabilitySetInner response = this.innerCollection.get(groupName, name);
return wrapModel(response);
}

@Override
Expand Down
Loading

0 comments on commit 3552614

Please sign in to comment.