From c8ba7006ab61f212f91bfd40dd92748d9c01709c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Sep 2016 11:19:40 -0700 Subject: [PATCH 1/4] adding @Method where needed on som base interfaces --- .../microsoft/azure/management/resources/Deployment.java | 3 +++ .../management/resources/fluentcore/model/Appliable.java | 3 +++ .../management/resources/fluentcore/model/Attachable.java | 6 ++++++ .../management/resources/fluentcore/model/Creatable.java | 7 ++++++- .../management/resources/fluentcore/model/Settable.java | 2 ++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployment.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployment.java index d199599caea90..08a03b95adac1 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployment.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployment.java @@ -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; @@ -113,6 +114,7 @@ public interface Deployment extends * * @return the export result */ + @Method DeploymentExportResult exportTemplate(); /** @@ -236,6 +238,7 @@ interface WithMode { * deployment in the cloud, but exposing additional optional inputs to specify. */ interface WithCreate extends Creatable { + @Method Deployment beginCreate(); } } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Appliable.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Appliable.java index c675270d1d62a..9065f982f997b 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Appliable.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Appliable.java @@ -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; @@ -23,6 +24,7 @@ public interface Appliable extends Indexable { * * @return the updated resource */ + @Method T apply(); /** @@ -30,6 +32,7 @@ public interface Appliable extends Indexable { * * @return the handle to the REST call */ + @Method Observable applyAsync(); /** diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Attachable.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Attachable.java index 150bb181f6b4c..4b7da4ff27204 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Attachable.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Attachable.java @@ -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()}. @@ -19,6 +20,7 @@ public interface Attachable { * Attaches this child object's definition to its parent's definition. * @return the next stage of the parent object's definition */ + @Method ParentT attach(); /** @@ -31,6 +33,7 @@ interface InDefinition { * Attaches the child definition to the parent resource definiton. * @return the next stage of the parent definition */ + @Method ParentT attach(); } @@ -43,6 +46,7 @@ interface InDefinitionAlt { * Attaches the child definition to the parent resource definition. * @return the next stage of the parent definition */ + @Method ParentT attach(); } @@ -56,6 +60,7 @@ interface InUpdate { * Attaches the child definition to the parent resource update. * @return the next stage of the parent definition */ + @Method ParentT attach(); } @@ -68,6 +73,7 @@ interface InUpdateAlt { * Attaches the child definition to the parent resource update. * @return the next stage of the parent definition */ + @Method ParentT attach(); } } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java index 375101ee45f29..b3e6e8fa2e2a6 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java @@ -6,13 +6,15 @@ package com.microsoft.azure.management.resources.fluentcore.model; +import com.microsoft.azure.management.apigeneration.Fluent; 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 the fluent type of the resource to be created */ @@ -28,6 +30,7 @@ public interface Creatable extends Indexable { * * @return the create resource */ + @Method T create(); /** @@ -37,6 +40,7 @@ public interface Creatable extends Indexable { * @param callback the callback to handle success and failure * @return a handle to cancel the request */ + @Method ServiceCall createAsync(final ServiceCallback callback); /** @@ -45,5 +49,6 @@ public interface Creatable extends Indexable { * * @return an observable of the request */ + @Method Observable createAsync(); } \ No newline at end of file diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Settable.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Settable.java index 76de599d95403..114f2cc319c33 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Settable.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Settable.java @@ -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 @@ -19,5 +20,6 @@ public interface Settable { * * @return the stage of parent resource update */ + @Method ParentT parent(); } From 63a920cb6ec797cfaf4f3ab477f35b6796e15c4f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Sep 2016 11:21:47 -0700 Subject: [PATCH 2/4] more @Method --- .../azure/management/resources/fluentcore/model/Updatable.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Updatable.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Updatable.java index ccec3b3094b1f..53fe6a4768ee8 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Updatable.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Updatable.java @@ -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. @@ -24,5 +25,6 @@ public interface Updatable { * * @return the stage of new resource update */ + @Method T update(); } From 9a37663e12548cc56426e5e1c52f9eb9492357e4 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Sep 2016 11:24:05 -0700 Subject: [PATCH 3/4] checkstyle fix --- .../azure/management/resources/fluentcore/model/Creatable.java | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java index b3e6e8fa2e2a6..3539330c4a203 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java @@ -6,7 +6,6 @@ package com.microsoft.azure.management.resources.fluentcore.model; -import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.apigeneration.Method; import com.microsoft.rest.ServiceCall; From 7886b462d91d57aa45f1c1e2884202665b73d098 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Sep 2016 11:32:01 -0700 Subject: [PATCH 4/4] more @Method --- .../resources/fluentcore/collection/SupportsListing.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListing.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListing.java index 52edb0d3dc0dc..b8ac4f06b2285 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListing.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListing.java @@ -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. @@ -24,5 +25,6 @@ public interface SupportsListing { * * @return list of resources */ + @Method PagedList list(); }