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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/**
* 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.resources;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The OperationDefinition model.
*/
public class OperationDefinition {
/**
* The name of the operation.
*/
@JsonProperty(value = "name")
private String name;

/**
* The operation display definition.
*/
@JsonProperty(value = "display")
private OperationDisplay display;

/**
* Get the name value.
*
* @return the name value
*/
public String name() {
return this.name;
}

/**
* Set the name value.
*
* @param name the name value to set
* @return the OperationDefinition object itself.
*/
public OperationDefinition withName(String name) {
this.name = name;
return this;
}

/**
* Get the display value.
*
* @return the display value
*/
public OperationDisplay display() {
return this.display;
}

/**
* Set the display value.
*
* @param display the display value to set
* @return the OperationDefinition object itself.
*/
public OperationDefinition withDisplay(OperationDisplay display) {
this.display = display;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
/**
* 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.resources;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The OperationDisplay model.
*/
public class OperationDisplay {
/**
* Operation provider.
*/
@JsonProperty(value = "provider")
private String provider;

/**
* Operation resource.
*/
@JsonProperty(value = "resource")
private String resource;

/**
* Operation.
*/
@JsonProperty(value = "operation")
private String operation;

/**
* Operation description.
*/
@JsonProperty(value = "description")
private String description;

/**
* Get the provider value.
*
* @return the provider value
*/
public String provider() {
return this.provider;
}

/**
* Set the provider value.
*
* @param provider the provider value to set
* @return the OperationDisplay object itself.
*/
public OperationDisplay withProvider(String provider) {
this.provider = provider;
return this;
}

/**
* Get the resource value.
*
* @return the resource value
*/
public String resource() {
return this.resource;
}

/**
* Set the resource value.
*
* @param resource the resource value to set
* @return the OperationDisplay object itself.
*/
public OperationDisplay withResource(String resource) {
this.resource = resource;
return this;
}

/**
* Get the operation value.
*
* @return the operation value
*/
public String operation() {
return this.operation;
}

/**
* Set the operation value.
*
* @param operation the operation value to set
* @return the OperationDisplay object itself.
*/
public OperationDisplay withOperation(String operation) {
this.operation = operation;
return this;
}

/**
* Get the description value.
*
* @return the description value
*/
public String description() {
return this.description;
}

/**
* Set the description value.
*
* @param description the description value to set
* @return the OperationDisplay object itself.
*/
public OperationDisplay withDescription(String description) {
this.description = description;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ interface FeaturesService {
@GET("subscriptions/{subscriptionId}/providers/Microsoft.Features/features")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Features operations" })
@GET("providers/Microsoft.Features/operations")
Observable<Response<ResponseBody>> operations(@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.resources.Features list1" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features")
Observable<Response<ResponseBody>> list1(@Path("resourceProviderNamespace") String resourceProviderNamespace, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
Expand Down Expand Up @@ -191,6 +195,72 @@ private ServiceResponse<PageImpl<FeatureResultInner>> listDelegate(Response<Resp
.build(response);
}

/**
* Gets all the preview feature operations.
*
* @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 OperationsListInner object if successful.
*/
public OperationsListInner operations() {
return operationsWithServiceResponseAsync().toBlocking().single().body();
}

/**
* Gets all the preview feature operations.
*
* @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<OperationsListInner> operationsAsync(final ServiceCallback<OperationsListInner> serviceCallback) {
return ServiceFuture.fromResponse(operationsWithServiceResponseAsync(), serviceCallback);
}

/**
* Gets all the preview feature operations.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the OperationsListInner object
*/
public Observable<OperationsListInner> operationsAsync() {
return operationsWithServiceResponseAsync().map(new Func1<ServiceResponse<OperationsListInner>, OperationsListInner>() {
@Override
public OperationsListInner call(ServiceResponse<OperationsListInner> response) {
return response.body();
}
});
}

/**
* Gets all the preview feature operations.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the OperationsListInner object
*/
public Observable<ServiceResponse<OperationsListInner>> operationsWithServiceResponseAsync() {
return service.operations(this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OperationsListInner>>>() {
@Override
public Observable<ServiceResponse<OperationsListInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<OperationsListInner> clientResponse = operationsDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}

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

/**
* Gets all the preview features in a provider namespace that are available through AFEC for the subscription.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* 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.resources.implementation;

import java.util.List;
import com.microsoft.azure.management.resources.OperationDefinition;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The OperationsListInner model.
*/
public class OperationsListInner {
/**
* The array of feature operations.
*/
@JsonProperty(value = "operations")
private List<OperationDefinition> operations;

/**
* Get the operations value.
*
* @return the operations value
*/
public List<OperationDefinition> operations() {
return this.operations;
}

/**
* Set the operations value.
*
* @param operations the operations value to set
* @return the OperationsListInner object itself.
*/
public OperationsListInner withOperations(List<OperationDefinition> operations) {
this.operations = operations;
return this;
}

}