Skip to content
Merged
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
Expand Up @@ -52,11 +52,11 @@ public interface GlobalUsers extends HasInner<GlobalUsersInner> {
* Get personal preferences for a user.
*
* @param userName The name of the user.
* @param personalPerferencesOperationsPayload Represents payload for any Environment operations like get, start, stop, connect
* @param personalPreferencesOperationsPayload Represents payload for any Environment operations like get, start, stop, connect
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<GetPersonalPreferencesResponse> getPersonalPreferencesAsync(String userName, PersonalPerferencesOperationsPayload personalPerferencesOperationsPayload);
Observable<GetPersonalPreferencesResponse> getPersonalPreferencesAsync(String userName, PersonalPreferencesOperationsPayload personalPreferencesOperationsPayload);

/**
* List Environments for the user.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/**
* 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.labservices.v2018_10_15;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Represents payload for any Environment operations like get, start, stop,
* connect.
*/
public class PersonalPreferencesOperationsPayload {
/**
* Resource Id of the lab account.
*/
@JsonProperty(value = "labAccountResourceId")
private String labAccountResourceId;

/**
* Enum indicating if user is adding or removing a favorite lab. Possible
* values include: 'Add', 'Remove'.
*/
@JsonProperty(value = "addRemove")
private AddRemove addRemove;

/**
* Resource Id of the lab to add/remove from the favorites list.
*/
@JsonProperty(value = "labResourceId")
private String labResourceId;

/**
* Get resource Id of the lab account.
*
* @return the labAccountResourceId value
*/
public String labAccountResourceId() {
return this.labAccountResourceId;
}

/**
* Set resource Id of the lab account.
*
* @param labAccountResourceId the labAccountResourceId value to set
* @return the PersonalPreferencesOperationsPayload object itself.
*/
public PersonalPreferencesOperationsPayload withLabAccountResourceId(String labAccountResourceId) {
this.labAccountResourceId = labAccountResourceId;
return this;
}

/**
* Get enum indicating if user is adding or removing a favorite lab. Possible values include: 'Add', 'Remove'.
*
* @return the addRemove value
*/
public AddRemove addRemove() {
return this.addRemove;
}

/**
* Set enum indicating if user is adding or removing a favorite lab. Possible values include: 'Add', 'Remove'.
*
* @param addRemove the addRemove value to set
* @return the PersonalPreferencesOperationsPayload object itself.
*/
public PersonalPreferencesOperationsPayload withAddRemove(AddRemove addRemove) {
this.addRemove = addRemove;
return this;
}

/**
* Get resource Id of the lab to add/remove from the favorites list.
*
* @return the labResourceId value
*/
public String labResourceId() {
return this.labResourceId;
}

/**
* Set resource Id of the lab to add/remove from the favorites list.
*
* @param labResourceId the labResourceId value to set
* @return the PersonalPreferencesOperationsPayload object itself.
*/
public PersonalPreferencesOperationsPayload withLabResourceId(String labResourceId) {
this.labResourceId = labResourceId;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import com.microsoft.azure.management.labservices.v2018_10_15.ListEnvironmentsResponse;
import com.microsoft.azure.management.labservices.v2018_10_15.ListLabsResponse;
import java.util.List;
import com.microsoft.azure.management.labservices.v2018_10_15.PersonalPerferencesOperationsPayload;
import com.microsoft.azure.management.labservices.v2018_10_15.PersonalPreferencesOperationsPayload;
import com.microsoft.azure.management.labservices.v2018_10_15.ResetPasswordPayload;

class GlobalUsersImpl extends WrapperImpl<GlobalUsersInner> implements GlobalUsers {
Expand Down Expand Up @@ -73,9 +73,9 @@ public OperationStatusResponse call(OperationStatusResponseInner inner) {
}

@Override
public Observable<GetPersonalPreferencesResponse> getPersonalPreferencesAsync(String userName, PersonalPerferencesOperationsPayload personalPerferencesOperationsPayload) {
public Observable<GetPersonalPreferencesResponse> getPersonalPreferencesAsync(String userName, PersonalPreferencesOperationsPayload personalPreferencesOperationsPayload) {
GlobalUsersInner client = this.inner();
return client.getPersonalPreferencesAsync(userName, personalPerferencesOperationsPayload)
return client.getPersonalPreferencesAsync(userName, personalPreferencesOperationsPayload)
.map(new Func1<GetPersonalPreferencesResponseInner, GetPersonalPreferencesResponse>() {
@Override
public GetPersonalPreferencesResponse call(GetPersonalPreferencesResponseInner inner) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import com.microsoft.azure.management.labservices.v2018_10_15.ListEnvironmentsPayload;
import com.microsoft.azure.management.labservices.v2018_10_15.OperationBatchStatusPayload;
import com.microsoft.azure.management.labservices.v2018_10_15.OperationStatusPayload;
import com.microsoft.azure.management.labservices.v2018_10_15.PersonalPerferencesOperationsPayload;
import com.microsoft.azure.management.labservices.v2018_10_15.PersonalPreferencesOperationsPayload;
import com.microsoft.azure.management.labservices.v2018_10_15.RegisterPayload;
import com.microsoft.azure.management.labservices.v2018_10_15.ResetPasswordPayload;
import com.microsoft.rest.ServiceCallback;
Expand Down Expand Up @@ -75,7 +75,7 @@ interface GlobalUsersService {

@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.labservices.v2018_10_15.GlobalUsers getPersonalPreferences" })
@POST("providers/Microsoft.LabServices/users/{userName}/getPersonalPreferences")
Observable<Response<ResponseBody>> getPersonalPreferences(@Path("userName") String userName, @Body PersonalPerferencesOperationsPayload personalPerferencesOperationsPayload, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
Observable<Response<ResponseBody>> getPersonalPreferences(@Path("userName") String userName, @Body PersonalPreferencesOperationsPayload personalPreferencesOperationsPayload, @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.labservices.v2018_10_15.GlobalUsers listEnvironments" })
@POST("providers/Microsoft.LabServices/users/{userName}/listEnvironments")
Expand Down Expand Up @@ -458,39 +458,39 @@ private ServiceResponse<OperationStatusResponseInner> getOperationStatusDelegate
* Get personal preferences for a user.
*
* @param userName The name of the user.
* @param personalPerferencesOperationsPayload Represents payload for any Environment operations like get, start, stop, connect
* @param personalPreferencesOperationsPayload Represents payload for any Environment operations like get, start, stop, connect
* @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 GetPersonalPreferencesResponseInner object if successful.
*/
public GetPersonalPreferencesResponseInner getPersonalPreferences(String userName, PersonalPerferencesOperationsPayload personalPerferencesOperationsPayload) {
return getPersonalPreferencesWithServiceResponseAsync(userName, personalPerferencesOperationsPayload).toBlocking().single().body();
public GetPersonalPreferencesResponseInner getPersonalPreferences(String userName, PersonalPreferencesOperationsPayload personalPreferencesOperationsPayload) {
return getPersonalPreferencesWithServiceResponseAsync(userName, personalPreferencesOperationsPayload).toBlocking().single().body();
}

/**
* Get personal preferences for a user.
*
* @param userName The name of the user.
* @param personalPerferencesOperationsPayload Represents payload for any Environment operations like get, start, stop, connect
* @param personalPreferencesOperationsPayload Represents payload for any Environment operations like get, start, stop, connect
* @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<GetPersonalPreferencesResponseInner> getPersonalPreferencesAsync(String userName, PersonalPerferencesOperationsPayload personalPerferencesOperationsPayload, final ServiceCallback<GetPersonalPreferencesResponseInner> serviceCallback) {
return ServiceFuture.fromResponse(getPersonalPreferencesWithServiceResponseAsync(userName, personalPerferencesOperationsPayload), serviceCallback);
public ServiceFuture<GetPersonalPreferencesResponseInner> getPersonalPreferencesAsync(String userName, PersonalPreferencesOperationsPayload personalPreferencesOperationsPayload, final ServiceCallback<GetPersonalPreferencesResponseInner> serviceCallback) {
return ServiceFuture.fromResponse(getPersonalPreferencesWithServiceResponseAsync(userName, personalPreferencesOperationsPayload), serviceCallback);
}

/**
* Get personal preferences for a user.
*
* @param userName The name of the user.
* @param personalPerferencesOperationsPayload Represents payload for any Environment operations like get, start, stop, connect
* @param personalPreferencesOperationsPayload Represents payload for any Environment operations like get, start, stop, connect
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the GetPersonalPreferencesResponseInner object
*/
public Observable<GetPersonalPreferencesResponseInner> getPersonalPreferencesAsync(String userName, PersonalPerferencesOperationsPayload personalPerferencesOperationsPayload) {
return getPersonalPreferencesWithServiceResponseAsync(userName, personalPerferencesOperationsPayload).map(new Func1<ServiceResponse<GetPersonalPreferencesResponseInner>, GetPersonalPreferencesResponseInner>() {
public Observable<GetPersonalPreferencesResponseInner> getPersonalPreferencesAsync(String userName, PersonalPreferencesOperationsPayload personalPreferencesOperationsPayload) {
return getPersonalPreferencesWithServiceResponseAsync(userName, personalPreferencesOperationsPayload).map(new Func1<ServiceResponse<GetPersonalPreferencesResponseInner>, GetPersonalPreferencesResponseInner>() {
@Override
public GetPersonalPreferencesResponseInner call(ServiceResponse<GetPersonalPreferencesResponseInner> response) {
return response.body();
Expand All @@ -502,22 +502,22 @@ public GetPersonalPreferencesResponseInner call(ServiceResponse<GetPersonalPrefe
* Get personal preferences for a user.
*
* @param userName The name of the user.
* @param personalPerferencesOperationsPayload Represents payload for any Environment operations like get, start, stop, connect
* @param personalPreferencesOperationsPayload Represents payload for any Environment operations like get, start, stop, connect
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the GetPersonalPreferencesResponseInner object
*/
public Observable<ServiceResponse<GetPersonalPreferencesResponseInner>> getPersonalPreferencesWithServiceResponseAsync(String userName, PersonalPerferencesOperationsPayload personalPerferencesOperationsPayload) {
public Observable<ServiceResponse<GetPersonalPreferencesResponseInner>> getPersonalPreferencesWithServiceResponseAsync(String userName, PersonalPreferencesOperationsPayload personalPreferencesOperationsPayload) {
if (userName == null) {
throw new IllegalArgumentException("Parameter userName is required and cannot be null.");
}
if (personalPerferencesOperationsPayload == null) {
throw new IllegalArgumentException("Parameter personalPerferencesOperationsPayload is required and cannot be null.");
if (personalPreferencesOperationsPayload == null) {
throw new IllegalArgumentException("Parameter personalPreferencesOperationsPayload is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
Validator.validate(personalPerferencesOperationsPayload);
return service.getPersonalPreferences(userName, personalPerferencesOperationsPayload, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
Validator.validate(personalPreferencesOperationsPayload);
return service.getPersonalPreferences(userName, personalPreferencesOperationsPayload, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<GetPersonalPreferencesResponseInner>>>() {
@Override
public Observable<ServiceResponse<GetPersonalPreferencesResponseInner>> call(Response<ResponseBody> response) {
Expand Down