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 @@ -15,23 +15,43 @@

package com.microsoft.windowsazure.services.management.models;


/**
* The base result class for all the result of service management operation.
*
*/
public class GetAffinityGroupResult extends OperationResult {

/** The value. */
private AffinityGroupInfo value;

/**
* Instantiates a new gets the affinity group result.
*
* @param statusCode
* the status code
* @param requestId
* the request id
*/
public GetAffinityGroupResult(int statusCode, String requestId) {
super(statusCode, requestId);
}

/**
* Gets the value.
*
* @return the value
*/
public AffinityGroupInfo getValue() {
return value;
}

/**
* Sets the value.
*
* @param affinityGroupInfo
* the affinity group info
* @return the gets the affinity group result
*/
public GetAffinityGroupResult setValue(AffinityGroupInfo affinityGroupInfo) {
this.value = affinityGroupInfo;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,127 +25,209 @@
/**
* Wrapper class for all returned lists from service management.
*
* @param <T>
* the generic type
*/
public class ListResult<T> extends OperationResult implements List<T> {

/** The contents. */
private final List<T> contents;

/**
* Instantiates a new list result.
*
* @param statusCode
* the status code
* @param requestId
* the request id
* @param contentList
* the content list
*/
public ListResult(int statusCode, String requestId, Collection<T> contentList) {
super(statusCode, requestId);
contents = Collections.unmodifiableList(new ArrayList<T>(contentList));
}

/* (non-Javadoc)
* @see java.util.List#add(java.lang.Object)
*/
@Override
public boolean add(T element) {
return contents.add(element);
}

/* (non-Javadoc)
* @see java.util.List#add(int, java.lang.Object)
*/
@Override
public void add(int index, T element) {
contents.add(index, element);
}

/* (non-Javadoc)
* @see java.util.List#addAll(java.util.Collection)
*/
@Override
public boolean addAll(Collection<? extends T> c) {
return contents.addAll(c);
}

/* (non-Javadoc)
* @see java.util.List#addAll(int, java.util.Collection)
*/
@Override
public boolean addAll(int index, Collection<? extends T> c) {
return contents.addAll(index, c);
}

/* (non-Javadoc)
* @see java.util.List#clear()
*/
@Override
public void clear() {
contents.clear();
}

/* (non-Javadoc)
* @see java.util.List#contains(java.lang.Object)
*/
@Override
public boolean contains(Object object) {
return contents.contains(object);
}

/* (non-Javadoc)
* @see java.util.List#containsAll(java.util.Collection)
*/
@Override
public boolean containsAll(Collection<?> c) {
return contents.containsAll(c);
}

/* (non-Javadoc)
* @see java.util.List#get(int)
*/
@Override
public T get(int index) {
return contents.get(index);
}

/* (non-Javadoc)
* @see java.util.List#indexOf(java.lang.Object)
*/
@Override
public int indexOf(Object object) {
return contents.indexOf(object);
}

/* (non-Javadoc)
* @see java.util.List#isEmpty()
*/
@Override
public boolean isEmpty() {
return contents.isEmpty();
}

/* (non-Javadoc)
* @see java.util.List#iterator()
*/
@Override
public Iterator<T> iterator() {
return contents.iterator();
}

/* (non-Javadoc)
* @see java.util.List#lastIndexOf(java.lang.Object)
*/
@Override
public int lastIndexOf(Object object) {
return contents.lastIndexOf(object);
}

/* (non-Javadoc)
* @see java.util.List#listIterator()
*/
@Override
public ListIterator<T> listIterator() {
return contents.listIterator();
}

/* (non-Javadoc)
* @see java.util.List#listIterator(int)
*/
@Override
public ListIterator<T> listIterator(int index) {
return contents.listIterator(index);

}

/* (non-Javadoc)
* @see java.util.List#remove(java.lang.Object)
*/
@Override
public boolean remove(Object o) {
return contents.remove(o);
}

/* (non-Javadoc)
* @see java.util.List#remove(int)
*/
@Override
public T remove(int index) {
return contents.remove(index);
}

/* (non-Javadoc)
* @see java.util.List#removeAll(java.util.Collection)
*/
@Override
public boolean removeAll(Collection<?> c) {
return contents.removeAll(c);
}

/* (non-Javadoc)
* @see java.util.List#retainAll(java.util.Collection)
*/
@Override
public boolean retainAll(Collection<?> c) {
return contents.retainAll(c);
}

/* (non-Javadoc)
* @see java.util.List#set(int, java.lang.Object)
*/
@Override
public T set(int index, T element) {
return contents.set(index, element);
}

/* (non-Javadoc)
* @see java.util.List#size()
*/
@Override
public int size() {
return contents.size();
}

/* (non-Javadoc)
* @see java.util.List#subList(int, int)
*/
@Override
public List<T> subList(int fromIndex, int toIndex) {
return contents.subList(fromIndex, toIndex);
}

/* (non-Javadoc)
* @see java.util.List#toArray()
*/
@Override
public Object[] toArray() {
return contents.toArray();
}

/* (non-Javadoc)
* @see java.util.List#toArray(T[])
*/
@Override
public <U> U[] toArray(U[] a) {
return contents.toArray(a);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,45 @@

package com.microsoft.windowsazure.services.management.models;


/**
* The base result class for all the result of service management operation.
*
*/
public class OperationResult {

/** The request id. */
protected final String requestId;

/** The status code. */
protected final int statusCode;

/**
* Instantiates a new operation result.
*
* @param statusCode
* the status code
* @param requestId
* the request id
*/
public OperationResult(int statusCode, String requestId) {
this.statusCode = statusCode;
this.requestId = requestId;
}

/**
* Gets the status code.
*
* @return the status code
*/
public int getStatusCode() {
return this.statusCode;
}

/**
* Gets the request id.
*
* @return the request id
*/
public String getRequestId() {
return this.requestId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,63 @@
*/
public class UpdateAffinityGroupOptions {

/** The description. */
private String description;

/** The name. */
private final String name;

/** The label. */
private final String label;

/**
* Instantiates a new update affinity group options.
*
* @param name
* the name
* @param label
* the label
*/
public UpdateAffinityGroupOptions(String name, String label) {
this.name = name;
this.label = label;
}

/**
* Sets the description.
*
* @param description
* the description
* @return the update affinity group options
*/
public UpdateAffinityGroupOptions setDescription(String description) {
this.description = description;
return this;
}

/**
* Gets the description.
*
* @return the description
*/
public String getDescription() {
return this.description;
}

/**
* Gets the name.
*
* @return the name
*/
public String getName() {
return this.name;
}

/**
* Gets the label.
*
* @return the label
*/
public String getLabel() {
return this.label;
}
Expand Down
Loading