From c1cdb8da01b80c29ccb7ce4affe26296c63953e9 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 29 Sep 2016 11:50:37 -0700 Subject: [PATCH 1/2] Update key vault with latest annotations --- .../management/graphrbac/ActiveDirectoryGroup.java | 7 ++----- .../microsoft/azure/management/graphrbac/Groups.java | 3 ++- .../azure/management/graphrbac/ServicePrincipal.java | 7 ++----- .../azure/management/graphrbac/ServicePrincipals.java | 3 ++- .../microsoft/azure/management/graphrbac/User.java | 7 ++----- .../microsoft/azure/management/graphrbac/Users.java | 3 ++- .../azure/management/keyvault/AccessPolicy.java | 11 ++++++++++- .../microsoft/azure/management/keyvault/Vault.java | 5 ++++- .../microsoft/azure/management/keyvault/Vaults.java | 2 +- 9 files changed, 27 insertions(+), 21 deletions(-) diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ActiveDirectoryGroup.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ActiveDirectoryGroup.java index cbff51255dea8..906c95e7499ac 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ActiveDirectoryGroup.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ActiveDirectoryGroup.java @@ -6,6 +6,7 @@ package com.microsoft.azure.management.graphrbac; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.graphrbac.implementation.ADGroupInner; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; @@ -14,7 +15,7 @@ /** * An immutable client-side representation of an Azure AD group. */ -@LangDefinition +@Fluent(ContainerName = "/Microsoft.Azure.Management.Fluent.Graph.RBAC") public interface ActiveDirectoryGroup extends Wrapper { /** @@ -49,7 +50,6 @@ public interface ActiveDirectoryGroup extends /** * Container interface for all the definitions that need to be implemented. */ - @LangDefinition(ContainerName = "~/ActiveDirectoryGroup.Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithDisplayName, @@ -60,7 +60,6 @@ interface Definition extends /** * Grouping of all the group definition stages. */ - @LangDefinition(ContainerName = "~/ActiveDirectoryGroup.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of the group definition. @@ -107,14 +106,12 @@ interface WithCreate extends /** * Grouping of all the group update stages. */ - @LangDefinition(ContainerName = "~/ActiveDirectoryGroup.Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { } /** * The template for a group update operation, containing all the settings that can be modified. */ - @LangDefinition(ContainerName = "~/ActiveDirectoryGroup.Update", ContainerFileName = "IUpdate") interface Update { } } diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Groups.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Groups.java index b54155736e1fc..f8b8454f312bd 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Groups.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Groups.java @@ -7,6 +7,7 @@ package com.microsoft.azure.management.graphrbac; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting; @@ -18,7 +19,7 @@ /** * Entry point to AD group management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent(ContainerName = "/Microsoft.Azure.Management.Fluent.Graph.RBAC") public interface Groups extends SupportsCreating, SupportsListing, diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipal.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipal.java index da38f832162a1..d149eb6fe6222 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipal.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipal.java @@ -6,6 +6,7 @@ package com.microsoft.azure.management.graphrbac; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.graphrbac.implementation.ServicePrincipalInner; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; @@ -16,7 +17,7 @@ /** * An immutable client-side representation of an Azure AD service principal. */ -@LangDefinition +@Fluent(ContainerName = "/Microsoft.Azure.Management.Fluent.Graph.RBAC") public interface ServicePrincipal extends Wrapper { /** @@ -51,7 +52,6 @@ public interface ServicePrincipal extends /** * Container interface for all the definitions that need to be implemented. */ - @LangDefinition(ContainerName = "~/ServicePrincipal.Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithCreate { @@ -60,7 +60,6 @@ interface Definition extends /** * Grouping of all the service principal definition stages. */ - @LangDefinition(ContainerName = "~/ServicePrincipal.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of the service principal definition. @@ -95,14 +94,12 @@ interface WithCreate extends /** * Grouping of all the service principal update stages. */ - @LangDefinition(ContainerName = "~/ServicePrincipal.Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { } /** * The template for a service principal update operation, containing all the settings that can be modified. */ - @LangDefinition(ContainerName = "~/ServicePrincipal.Update", ContainerFileName = "IUpdate") interface Update { } } diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipals.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipals.java index 2df78735ead5e..9383ae2dd6e6b 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipals.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipals.java @@ -6,6 +6,7 @@ package com.microsoft.azure.management.graphrbac; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; @@ -16,7 +17,7 @@ /** * Entry point to service principal management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent(ContainerName = "/Microsoft.Azure.Management.Fluent.Graph.RBAC") public interface ServicePrincipals extends SupportsCreating, SupportsListing { diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/User.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/User.java index 5eab2a4d85635..b92cd9a9c3cce 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/User.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/User.java @@ -6,6 +6,7 @@ package com.microsoft.azure.management.graphrbac; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.graphrbac.implementation.UserInner; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; @@ -14,7 +15,7 @@ /** * An immutable client-side representation of an Azure AD user. */ -@LangDefinition +@Fluent(ContainerName = "/Microsoft.Azure.Management.Fluent.Graph.RBAC") public interface User extends Wrapper { @@ -60,7 +61,6 @@ public interface User extends /** * Container interface for all the definitions that need to be implemented. */ - @LangDefinition(ContainerName = "~/User.Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithDisplayName, @@ -72,7 +72,6 @@ interface Definition extends /** * Grouping of all the user definition stages. */ - @LangDefinition(ContainerName = "~/User.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of the user definition. @@ -155,14 +154,12 @@ interface WithCreate extends /** * Grouping of all the user update stages. */ - @LangDefinition(ContainerName = "~/User.Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { } /** * The template for a user update operation, containing all the settings that can be modified. */ - @LangDefinition(ContainerName = "~/User.Update", ContainerFileName = "IUpdate") interface Update { } } diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Users.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Users.java index 32399ef5ecf45..bfc2bb3eed8f7 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Users.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Users.java @@ -6,6 +6,7 @@ package com.microsoft.azure.management.graphrbac; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; @@ -16,7 +17,7 @@ /** * Entry point to AD user management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent(ContainerName = "/Microsoft.Azure.Management.Fluent.Graph.RBAC") public interface Users extends SupportsCreating, SupportsListing { diff --git a/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/AccessPolicy.java b/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/AccessPolicy.java index 0d017ae06b200..a75072b430aff 100644 --- a/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/AccessPolicy.java +++ b/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/AccessPolicy.java @@ -7,6 +7,7 @@ package com.microsoft.azure.management.keyvault; import com.microsoft.azure.management.apigeneration.Fluent; +import com.microsoft.azure.management.apigeneration.Method; import com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup; import com.microsoft.azure.management.graphrbac.ServicePrincipal; import com.microsoft.azure.management.graphrbac.User; @@ -21,7 +22,7 @@ /** * An immutable client-side representation of a key vault access policy. */ -@Fluent() +@Fluent(ContainerName = "/Microsoft.Azure.Management.Fluent.KeyVault") public interface AccessPolicy extends ChildResource, Wrapper { @@ -136,6 +137,7 @@ interface WithPermissions { * * @return the next stage of access policy definition */ + @Method WithAttach allowKeyAllPermissions(); /** @@ -159,6 +161,7 @@ interface WithPermissions { * * @return the next stage of access policy definition */ + @Method WithAttach allowSecretAllPermissions(); /** @@ -276,6 +279,7 @@ interface WithPermissions { * * @return the next stage of access policy definition */ + @Method WithAttach allowKeyAllPermissions(); /** @@ -299,6 +303,7 @@ interface WithPermissions { * * @return the next stage of access policy definition */ + @Method WithAttach allowSecretAllPermissions(); /** @@ -344,6 +349,7 @@ interface WithPermissions { * * @return the next stage of access policy update */ + @Method Update allowKeyAllPermissions(); /** @@ -367,6 +373,7 @@ interface WithPermissions { * * @return the next stage of access policy update */ + @Method Update disallowKeyAllPermissions(); /** @@ -390,6 +397,7 @@ interface WithPermissions { * * @return the next stage of access policy definition */ + @Method Update allowSecretAllPermissions(); /** @@ -413,6 +421,7 @@ interface WithPermissions { * * @return the next stage of access policy update */ + @Method Update disallowSecretAllPermissions(); /** diff --git a/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/Vault.java b/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/Vault.java index 228b7738e3906..be7094a8ff5d2 100644 --- a/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/Vault.java +++ b/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/Vault.java @@ -7,6 +7,7 @@ package com.microsoft.azure.management.keyvault; import com.microsoft.azure.management.apigeneration.Fluent; +import com.microsoft.azure.management.apigeneration.Method; import com.microsoft.azure.management.keyvault.implementation.VaultInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.model.Appliable; @@ -20,7 +21,7 @@ /** * An immutable client-side representation of an Azure Key Vault. */ -@Fluent +@Fluent(ContainerName = "/Microsoft.Azure.Management.Fluent.KeyVault") public interface Vault extends GroupableResource, Refreshable, @@ -134,6 +135,7 @@ interface WithAccessPolicy { * * @return the first stage of the access policy definition */ + @Method AccessPolicy.DefinitionStages.Blank defineAccessPolicy(); } @@ -227,6 +229,7 @@ interface WithAccessPolicy { * * @return the first stage of the access policy definition */ + @Method AccessPolicy.UpdateDefinitionStages.Blank defineAccessPolicy(); /** diff --git a/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/Vaults.java b/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/Vaults.java index 7298a7b4ad604..d7cb26fc0fbe2 100644 --- a/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/Vaults.java +++ b/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/Vaults.java @@ -18,7 +18,7 @@ /** * Entry point for key vaults management API. */ -@Fluent +@Fluent(ContainerName = "/Microsoft.Azure.Management.Fluent.KeyVault") public interface Vaults extends SupportsListing, SupportsCreating, From 4b96a7588d681dcbf215bf5e610e46d6d332adfa Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 29 Sep 2016 13:16:50 -0700 Subject: [PATCH 2/2] Fix checkstyle --- .../azure/management/graphrbac/ActiveDirectoryGroup.java | 1 - .../java/com/microsoft/azure/management/graphrbac/Groups.java | 1 - .../microsoft/azure/management/graphrbac/ServicePrincipal.java | 1 - .../microsoft/azure/management/graphrbac/ServicePrincipals.java | 1 - .../main/java/com/microsoft/azure/management/graphrbac/User.java | 1 - .../java/com/microsoft/azure/management/graphrbac/Users.java | 1 - 6 files changed, 6 deletions(-) diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ActiveDirectoryGroup.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ActiveDirectoryGroup.java index 906c95e7499ac..b5b58eff8e363 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ActiveDirectoryGroup.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ActiveDirectoryGroup.java @@ -7,7 +7,6 @@ package com.microsoft.azure.management.graphrbac; import com.microsoft.azure.management.apigeneration.Fluent; -import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.graphrbac.implementation.ADGroupInner; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Groups.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Groups.java index f8b8454f312bd..059c06b0284da 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Groups.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Groups.java @@ -8,7 +8,6 @@ import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.Fluent; -import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipal.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipal.java index d149eb6fe6222..69accaa884699 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipal.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipal.java @@ -7,7 +7,6 @@ package com.microsoft.azure.management.graphrbac; import com.microsoft.azure.management.apigeneration.Fluent; -import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.graphrbac.implementation.ServicePrincipalInner; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipals.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipals.java index 9383ae2dd6e6b..b9708af224e5f 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipals.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipals.java @@ -7,7 +7,6 @@ package com.microsoft.azure.management.graphrbac; import com.microsoft.azure.management.apigeneration.Fluent; -import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; import com.microsoft.rest.ServiceCall; diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/User.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/User.java index b92cd9a9c3cce..933dd9371e595 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/User.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/User.java @@ -7,7 +7,6 @@ package com.microsoft.azure.management.graphrbac; import com.microsoft.azure.management.apigeneration.Fluent; -import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.graphrbac.implementation.UserInner; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Users.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Users.java index bfc2bb3eed8f7..9a982426ebe08 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Users.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Users.java @@ -7,7 +7,6 @@ package com.microsoft.azure.management.graphrbac; import com.microsoft.azure.management.apigeneration.Fluent; -import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; import com.microsoft.rest.ServiceCall;