Skip to content

Commit

Permalink
Merge pull request #1136 from martinsawicki/martin-plumbing
Browse files Browse the repository at this point in the history
adding @method where needed on various interfaces
  • Loading branch information
Martin Sawicki authored Sep 29, 2016
2 parents 1f498a7 + 7886b46 commit 4481626
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 1 deletion.
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();
}
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();
}

0 comments on commit 4481626

Please sign in to comment.