Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding @Method where needed on various interfaces #1136

Merged
merged 4 commits into from
Sep 29, 2016
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 @@ -9,6 +9,7 @@
import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.apigeneration.LangMethodDefinition;
import com.microsoft.azure.management.apigeneration.LangMethodDefinition.LangMethodType;
import com.microsoft.azure.management.apigeneration.Method;
import com.microsoft.azure.management.resources.fluentcore.arm.Region;
import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource;
import com.microsoft.azure.management.resources.fluentcore.model.Appliable;
Expand Down Expand Up @@ -113,6 +114,7 @@ public interface Deployment extends
*
* @return the export result
*/
@Method
DeploymentExportResult exportTemplate();

/**
Expand Down Expand Up @@ -236,6 +238,7 @@ interface WithMode {
* deployment in the cloud, but exposing additional optional inputs to specify.
*/
interface WithCreate extends Creatable<Deployment> {
@Method
Deployment beginCreate();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.microsoft.azure.PagedList;
import com.microsoft.azure.management.apigeneration.LangDefinition;
import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion;
import com.microsoft.azure.management.apigeneration.Method;

/**
* Provides access to listing Azure resources of a specific type in a subscription.
Expand All @@ -24,5 +25,6 @@ public interface SupportsListing<T> {
*
* @return list of resources
*/
@Method
PagedList<T> list();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this needs @method annotation?

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package com.microsoft.azure.management.resources.fluentcore.model;

import com.microsoft.azure.management.apigeneration.LangDefinition;
import com.microsoft.azure.management.apigeneration.Method;
import com.microsoft.rest.ServiceCall;
import com.microsoft.rest.ServiceCallback;
import rx.Observable;
Expand All @@ -23,13 +24,15 @@ public interface Appliable<T> extends Indexable {
*
* @return the updated resource
*/
@Method
T apply();

/**
* Execute the update request asynchronously.
*
* @return the handle to the REST call
*/
@Method
Observable<T> applyAsync();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package com.microsoft.azure.management.resources.fluentcore.model;

import com.microsoft.azure.management.apigeneration.LangDefinition;
import com.microsoft.azure.management.apigeneration.Method;

/**
* The final stage of the child object definition, at which it can be attached to the parent, using {@link Attachable#attach()}.
Expand All @@ -19,6 +20,7 @@ public interface Attachable<ParentT> {
* Attaches this child object's definition to its parent's definition.
* @return the next stage of the parent object's definition
*/
@Method
ParentT attach();

/**
Expand All @@ -31,6 +33,7 @@ interface InDefinition<ParentT> {
* Attaches the child definition to the parent resource definiton.
* @return the next stage of the parent definition
*/
@Method
ParentT attach();
}

Expand All @@ -43,6 +46,7 @@ interface InDefinitionAlt<ParentT> {
* Attaches the child definition to the parent resource definition.
* @return the next stage of the parent definition
*/
@Method
ParentT attach();
}

Expand All @@ -56,6 +60,7 @@ interface InUpdate<ParentT> {
* Attaches the child definition to the parent resource update.
* @return the next stage of the parent definition
*/
@Method
ParentT attach();
}

Expand All @@ -68,6 +73,7 @@ interface InUpdateAlt<ParentT> {
* Attaches the child definition to the parent resource update.
* @return the next stage of the parent definition
*/
@Method
ParentT attach();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
package com.microsoft.azure.management.resources.fluentcore.model;

import com.microsoft.azure.management.apigeneration.LangDefinition;
import com.microsoft.azure.management.apigeneration.Method;
import com.microsoft.rest.ServiceCall;
import com.microsoft.rest.ServiceCallback;
import rx.Observable;

/**
* The final stage of the resource definition, at which it can be create, using {@link #create()}.
* The final stage of the resource definition, at which it can be created using create().
*
* @param <T> the fluent type of the resource to be created
*/
Expand All @@ -28,6 +29,7 @@ public interface Creatable<T> extends Indexable {
*
* @return the create resource
*/
@Method
T create();

/**
Expand All @@ -37,6 +39,7 @@ public interface Creatable<T> extends Indexable {
* @param callback the callback to handle success and failure
* @return a handle to cancel the request
*/
@Method
ServiceCall<T> createAsync(final ServiceCallback<T> callback);

/**
Expand All @@ -45,5 +48,6 @@ public interface Creatable<T> extends Indexable {
*
* @return an observable of the request
*/
@Method
Observable<T> createAsync();
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.microsoft.azure.management.resources.fluentcore.model;

import com.microsoft.azure.management.apigeneration.LangDefinition;
import com.microsoft.azure.management.apigeneration.Method;

/**
* The base interface for all template interfaces for child resources that support
Expand All @@ -19,5 +20,6 @@ public interface Settable<ParentT> {
*
* @return the stage of parent resource update
*/
@Method
ParentT parent();
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package com.microsoft.azure.management.resources.fluentcore.model;

import com.microsoft.azure.management.apigeneration.LangDefinition;
import com.microsoft.azure.management.apigeneration.Method;

/**
* Base class for resource that can be updated.
Expand All @@ -24,5 +25,6 @@ public interface Updatable<T> {
*
* @return the stage of new resource update
*/
@Method
T update();
}