diff --git a/authorization/resource-manager/v2015_07_01/pom.xml b/authorization/resource-manager/v2015_07_01/pom.xml index 76d72a8b1c95..34e3ed902903 100644 --- a/authorization/resource-manager/v2015_07_01/pom.xml +++ b/authorization/resource-manager/v2015_07_01/pom.xml @@ -1,133 +1,133 @@ - - - 4.0.0 - com.microsoft.azure.authorization.v2015_07_01 - - com.microsoft.azure - azure-arm-parent - 0.0.3-beta - ../../../pom.xml - - azure-mgmt-authorization - 1.0.0-beta-1 - jar - Microsoft Azure SDK for Authorization Management - This package contains Microsoft Authorization Management SDK. - https://github.com/Azure/azure-libraries-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-libraries-for-java - scm:git:git@github.com:Azure/azure-libraries-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-arm-client-runtime - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - com.microsoft.azure - azure-mgmt-resources - test - - - com.microsoft.azure - azure-arm-client-runtime - test-jar - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.8 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
+ + + 4.0.0 + com.microsoft.azure.authorization.v2015_07_01 + + com.microsoft.azure + azure-arm-parent + 0.0.3-beta + ../../../pom.xml + + azure-mgmt-authorization + 1.0.0-beta + jar + Microsoft Azure SDK for Authorization Management + This package contains Microsoft Authorization Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ClassicAdministratorProperties.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ClassicAdministratorProperties.java index e3eb75781ece..bff2c9f529d6 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ClassicAdministratorProperties.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ClassicAdministratorProperties.java @@ -27,7 +27,7 @@ public class ClassicAdministratorProperties { private String role; /** - * Get the emailAddress value. + * Get the email address of the administrator. * * @return the emailAddress value */ @@ -36,7 +36,7 @@ public String emailAddress() { } /** - * Set the emailAddress value. + * Set the email address of the administrator. * * @param emailAddress the emailAddress value to set * @return the ClassicAdministratorProperties object itself. @@ -47,7 +47,7 @@ public ClassicAdministratorProperties withEmailAddress(String emailAddress) { } /** - * Get the role value. + * Get the role of the administrator. * * @return the role value */ @@ -56,7 +56,7 @@ public String role() { } /** - * Set the role value. + * Set the role of the administrator. * * @param role the role value to set * @return the ClassicAdministratorProperties object itself. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ProviderOperation.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ProviderOperation.java index 516e35ad30eb..2dcf21d9d89a 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ProviderOperation.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ProviderOperation.java @@ -45,7 +45,7 @@ public class ProviderOperation { private Object properties; /** - * Get the name value. + * Get the operation name. * * @return the name value */ @@ -54,7 +54,7 @@ public String name() { } /** - * Set the name value. + * Set the operation name. * * @param name the name value to set * @return the ProviderOperation object itself. @@ -65,7 +65,7 @@ public ProviderOperation withName(String name) { } /** - * Get the displayName value. + * Get the operation display name. * * @return the displayName value */ @@ -74,7 +74,7 @@ public String displayName() { } /** - * Set the displayName value. + * Set the operation display name. * * @param displayName the displayName value to set * @return the ProviderOperation object itself. @@ -85,7 +85,7 @@ public ProviderOperation withDisplayName(String displayName) { } /** - * Get the description value. + * Get the operation description. * * @return the description value */ @@ -94,7 +94,7 @@ public String description() { } /** - * Set the description value. + * Set the operation description. * * @param description the description value to set * @return the ProviderOperation object itself. @@ -105,7 +105,7 @@ public ProviderOperation withDescription(String description) { } /** - * Get the origin value. + * Get the operation origin. * * @return the origin value */ @@ -114,7 +114,7 @@ public String origin() { } /** - * Set the origin value. + * Set the operation origin. * * @param origin the origin value to set * @return the ProviderOperation object itself. @@ -125,7 +125,7 @@ public ProviderOperation withOrigin(String origin) { } /** - * Get the properties value. + * Get the operation properties. * * @return the properties value */ @@ -134,7 +134,7 @@ public Object properties() { } /** - * Set the properties value. + * Set the operation properties. * * @param properties the properties value to set * @return the ProviderOperation object itself. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ResourceType.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ResourceType.java index 43058913c697..53a0bfa0a169 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ResourceType.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/ResourceType.java @@ -34,7 +34,7 @@ public class ResourceType { private List operations; /** - * Get the name value. + * Get the resource type name. * * @return the name value */ @@ -43,7 +43,7 @@ public String name() { } /** - * Set the name value. + * Set the resource type name. * * @param name the name value to set * @return the ResourceType object itself. @@ -54,7 +54,7 @@ public ResourceType withName(String name) { } /** - * Get the displayName value. + * Get the resource type display name. * * @return the displayName value */ @@ -63,7 +63,7 @@ public String displayName() { } /** - * Set the displayName value. + * Set the resource type display name. * * @param displayName the displayName value to set * @return the ResourceType object itself. @@ -74,7 +74,7 @@ public ResourceType withDisplayName(String displayName) { } /** - * Get the operations value. + * Get the resource type operations. * * @return the operations value */ @@ -83,7 +83,7 @@ public List operations() { } /** - * Set the operations value. + * Set the resource type operations. * * @param operations the operations value to set * @return the ResourceType object itself. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignment.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignment.java index 54b1220aa774..266a33ff66b8 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignment.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignment.java @@ -44,7 +44,7 @@ public interface RoleAssignment extends HasInner, Indexable /** * The entirety of the RoleAssignment definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithProvider, DefinitionStages.WithScope, DefinitionStages.WithCreate { + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithProvider, DefinitionStages.WithScope, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -63,6 +63,7 @@ interface Blank extends WithProvider { interface WithProvider { /** * Specifies . + * @return the next definition stage */ WithScope withExistingProvider(); } @@ -73,8 +74,22 @@ interface WithProvider { interface WithScope { /** * Specifies scope. + * @param scope The scope of the role assignment to create. The scope can be any REST resource instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource + * @return the next definition stage */ - WithCreate withScope(String scope); + WithProperties withScope(String scope); + } + + /** + * The stage of the roleassignment definition allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Role assignment properties + * @return the next definition stage + */ + WithCreate withProperties(RoleAssignmentProperties properties); } /** @@ -88,12 +103,24 @@ interface WithCreate extends Creatable { /** * The template for a RoleAssignment update operation, containing all the settings that can be modified. */ - interface Update extends Appliable { + interface Update extends Appliable, UpdateStages.WithProperties { } /** * Grouping of RoleAssignment update stages. */ interface UpdateStages { + /** + * The stage of the roleassignment update allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Role assignment properties + * @return the next update stage + */ + Update withProperties(RoleAssignmentProperties properties); + } + } } diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentCreateParameters.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentCreateParameters.java index 8b441f76a52f..94292f6ee6a8 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentCreateParameters.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentCreateParameters.java @@ -17,11 +17,11 @@ public class RoleAssignmentCreateParameters { /** * Role assignment properties. */ - @JsonProperty(value = "properties") + @JsonProperty(value = "properties", required = true) private RoleAssignmentProperties properties; /** - * Get the properties value. + * Get role assignment properties. * * @return the properties value */ @@ -30,7 +30,7 @@ public RoleAssignmentProperties properties() { } /** - * Set the properties value. + * Set role assignment properties. * * @param properties the properties value to set * @return the RoleAssignmentCreateParameters object itself. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentFilter.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentFilter.java index 84b49ad13e85..e8ea9b579c18 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentFilter.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentFilter.java @@ -21,7 +21,7 @@ public class RoleAssignmentFilter { private String principalId; /** - * Get the principalId value. + * Get returns role assignment of the specific principal. * * @return the principalId value */ @@ -30,7 +30,7 @@ public String principalId() { } /** - * Set the principalId value. + * Set returns role assignment of the specific principal. * * @param principalId the principalId value to set * @return the RoleAssignmentFilter object itself. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentProperties.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentProperties.java index 914f72e42356..da7d7c7c8b19 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentProperties.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentProperties.java @@ -17,7 +17,7 @@ public class RoleAssignmentProperties { /** * The role definition ID used in the role assignment. */ - @JsonProperty(value = "roleDefinitionId") + @JsonProperty(value = "roleDefinitionId", required = true) private String roleDefinitionId; /** @@ -25,11 +25,11 @@ public class RoleAssignmentProperties { * Active Directory. It can point to a user, service principal, or security * group. */ - @JsonProperty(value = "principalId") + @JsonProperty(value = "principalId", required = true) private String principalId; /** - * Get the roleDefinitionId value. + * Get the role definition ID used in the role assignment. * * @return the roleDefinitionId value */ @@ -38,7 +38,7 @@ public String roleDefinitionId() { } /** - * Set the roleDefinitionId value. + * Set the role definition ID used in the role assignment. * * @param roleDefinitionId the roleDefinitionId value to set * @return the RoleAssignmentProperties object itself. @@ -49,7 +49,7 @@ public RoleAssignmentProperties withRoleDefinitionId(String roleDefinitionId) { } /** - * Get the principalId value. + * Get the principal ID assigned to the role. This maps to the ID inside the Active Directory. It can point to a user, service principal, or security group. * * @return the principalId value */ @@ -58,7 +58,7 @@ public String principalId() { } /** - * Set the principalId value. + * Set the principal ID assigned to the role. This maps to the ID inside the Active Directory. It can point to a user, service principal, or security group. * * @param principalId the principalId value to set * @return the RoleAssignmentProperties object itself. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentPropertiesWithScope.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentPropertiesWithScope.java index b8ae30c87e00..451a9ed2d3f7 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentPropertiesWithScope.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignmentPropertiesWithScope.java @@ -33,7 +33,7 @@ public class RoleAssignmentPropertiesWithScope { private String principalId; /** - * Get the scope value. + * Get the role assignment scope. * * @return the scope value */ @@ -42,7 +42,7 @@ public String scope() { } /** - * Set the scope value. + * Set the role assignment scope. * * @param scope the scope value to set * @return the RoleAssignmentPropertiesWithScope object itself. @@ -53,7 +53,7 @@ public RoleAssignmentPropertiesWithScope withScope(String scope) { } /** - * Get the roleDefinitionId value. + * Get the role definition ID. * * @return the roleDefinitionId value */ @@ -62,7 +62,7 @@ public String roleDefinitionId() { } /** - * Set the roleDefinitionId value. + * Set the role definition ID. * * @param roleDefinitionId the roleDefinitionId value to set * @return the RoleAssignmentPropertiesWithScope object itself. @@ -73,7 +73,7 @@ public RoleAssignmentPropertiesWithScope withRoleDefinitionId(String roleDefinit } /** - * Get the principalId value. + * Get the principal ID. * * @return the principalId value */ @@ -82,7 +82,7 @@ public String principalId() { } /** - * Set the principalId value. + * Set the principal ID. * * @param principalId the principalId value to set * @return the RoleAssignmentPropertiesWithScope object itself. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignments.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignments.java index 5cfd88b2899e..33509fae2d68 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignments.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleAssignments.java @@ -39,7 +39,7 @@ public interface RoleAssignments extends SupportsCreating deleteAsync(String scope, String roleAssignmentName); /** * Get the specified role assignment. @@ -58,16 +58,17 @@ public interface RoleAssignments extends SupportsCreating deleteByIdAsync(String roleAssignmentId); /** * Creates a role assignment by ID. * * @param roleAssignmentId The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. + * @param properties Role assignment properties. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable createByIdAsync(String roleAssignmentId); + Observable createByIdAsync(String roleAssignmentId, RoleAssignmentProperties properties); /** * Gets a role assignment by ID. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinition.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinition.java index aa2307a08a40..05c3456f5f3d 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinition.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinition.java @@ -17,6 +17,8 @@ import com.microsoft.azure.arm.model.Refreshable; import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.authorization.v2015_07_01.implementation.AuthorizationManager; +import java.util.List; +import com.microsoft.azure.management.authorization.v2015_07_01.implementation.PermissionInner; /** * Type representing RoleDefinition. @@ -45,7 +47,7 @@ public interface RoleDefinition extends HasInner, Indexable /** * The entirety of the RoleDefinition definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithScope, DefinitionStages.WithCreate { + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithScope, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -64,8 +66,22 @@ interface Blank extends WithScope { interface WithScope { /** * Specifies scope. + * @param scope The scope of the role definition + * @return the next definition stage */ - WithCreate withScope(String scope); + WithProperties withScope(String scope); + } + + /** + * The stage of the roledefinition definition allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Role definition properties + * @return the next definition stage + */ + WithCreate withProperties(RoleDefinitionProperties properties); } /** @@ -79,12 +95,24 @@ interface WithCreate extends Creatable { /** * The template for a RoleDefinition update operation, containing all the settings that can be modified. */ - interface Update extends Appliable { + interface Update extends Appliable, UpdateStages.WithProperties { } /** * Grouping of RoleDefinition update stages. */ interface UpdateStages { + /** + * The stage of the roledefinition update allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Role definition properties + * @return the next update stage + */ + Update withProperties(RoleDefinitionProperties properties); + } + } } diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinitionFilter.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinitionFilter.java index 41c7b5672f68..05ecf284bb63 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinitionFilter.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinitionFilter.java @@ -21,7 +21,7 @@ public class RoleDefinitionFilter { private String roleName; /** - * Get the roleName value. + * Get returns role definition with the specific name. * * @return the roleName value */ @@ -30,7 +30,7 @@ public String roleName() { } /** - * Set the roleName value. + * Set returns role definition with the specific name. * * @param roleName the roleName value to set * @return the RoleDefinitionFilter object itself. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinitionProperties.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinitionProperties.java index 6b27aa0a5683..9035cdf86e74 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinitionProperties.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinitionProperties.java @@ -47,7 +47,7 @@ public class RoleDefinitionProperties { private List assignableScopes; /** - * Get the roleName value. + * Get the role name. * * @return the roleName value */ @@ -56,7 +56,7 @@ public String roleName() { } /** - * Set the roleName value. + * Set the role name. * * @param roleName the roleName value to set * @return the RoleDefinitionProperties object itself. @@ -67,7 +67,7 @@ public RoleDefinitionProperties withRoleName(String roleName) { } /** - * Get the description value. + * Get the role definition description. * * @return the description value */ @@ -76,7 +76,7 @@ public String description() { } /** - * Set the description value. + * Set the role definition description. * * @param description the description value to set * @return the RoleDefinitionProperties object itself. @@ -87,7 +87,7 @@ public RoleDefinitionProperties withDescription(String description) { } /** - * Get the type value. + * Get the role type. * * @return the type value */ @@ -96,7 +96,7 @@ public String type() { } /** - * Set the type value. + * Set the role type. * * @param type the type value to set * @return the RoleDefinitionProperties object itself. @@ -107,7 +107,7 @@ public RoleDefinitionProperties withType(String type) { } /** - * Get the permissions value. + * Get role definition permissions. * * @return the permissions value */ @@ -116,7 +116,7 @@ public List permissions() { } /** - * Set the permissions value. + * Set role definition permissions. * * @param permissions the permissions value to set * @return the RoleDefinitionProperties object itself. @@ -127,7 +127,7 @@ public RoleDefinitionProperties withPermissions(List permission } /** - * Get the assignableScopes value. + * Get role definition assignable scopes. * * @return the assignableScopes value */ @@ -136,7 +136,7 @@ public List assignableScopes() { } /** - * Set the assignableScopes value. + * Set role definition assignable scopes. * * @param assignableScopes the assignableScopes value to set * @return the RoleDefinitionProperties object itself. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinitions.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinitions.java index 166743c2b597..dea84accf81a 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinitions.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/RoleDefinitions.java @@ -26,7 +26,7 @@ public interface RoleDefinitions extends SupportsCreating deleteAsync(String scope, String roleDefinitionId); /** * Get role definition by name (GUID). diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManagementClientImpl.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManagementClientImpl.java index 242aee21eeb9..de1757b192e5 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManagementClientImpl.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManagementClientImpl.java @@ -51,11 +51,11 @@ public AuthorizationManagementClientImpl withSubscriptionId(String subscriptionI return this; } - /** The API version to use for the operation. */ + /** The API version to use for this operation. */ private String apiVersion; /** - * Gets The API version to use for the operation. + * Gets The API version to use for this operation. * * @return the apiVersion value. */ @@ -63,11 +63,11 @@ public String apiVersion() { return this.apiVersion; } - /** Gets or sets the preferred language for the response. */ + /** The preferred language for the response. */ private String acceptLanguage; /** - * Gets Gets or sets the preferred language for the response. + * Gets The preferred language for the response. * * @return the acceptLanguage value. */ @@ -76,7 +76,7 @@ public String acceptLanguage() { } /** - * Sets Gets or sets the preferred language for the response. + * Sets The preferred language for the response. * * @param acceptLanguage the acceptLanguage value. * @return the service client itself @@ -86,11 +86,11 @@ public AuthorizationManagementClientImpl withAcceptLanguage(String acceptLanguag return this; } - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ private int longRunningOperationRetryTimeout; /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. * * @return the longRunningOperationRetryTimeout value. */ @@ -99,7 +99,7 @@ public int longRunningOperationRetryTimeout() { } /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. * * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. * @return the service client itself @@ -109,11 +109,11 @@ public AuthorizationManagementClientImpl withLongRunningOperationRetryTimeout(in return this; } - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ private boolean generateClientRequestId; /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * * @return the generateClientRequestId value. */ @@ -122,7 +122,7 @@ public boolean generateClientRequestId() { } /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * * @param generateClientRequestId the generateClientRequestId value. * @return the service client itself @@ -132,19 +132,6 @@ public AuthorizationManagementClientImpl withGenerateClientRequestId(boolean gen return this; } - /** - * The ClassicAdministratorsInner object to access its operations. - */ - private ClassicAdministratorsInner classicAdministrators; - - /** - * Gets the ClassicAdministratorsInner object to access its operations. - * @return the ClassicAdministratorsInner object. - */ - public ClassicAdministratorsInner classicAdministrators() { - return this.classicAdministrators; - } - /** * The PermissionsInner object to access its operations. */ @@ -197,6 +184,19 @@ public RoleDefinitionsInner roleDefinitions() { return this.roleDefinitions; } + /** + * The ClassicAdministratorsInner object to access its operations. + */ + private ClassicAdministratorsInner classicAdministrators; + + /** + * Gets the ClassicAdministratorsInner object to access its operations. + * @return the ClassicAdministratorsInner object. + */ + public ClassicAdministratorsInner classicAdministrators() { + return this.classicAdministrators; + } + /** * Initializes an instance of AuthorizationManagementClient client. * @@ -232,11 +232,11 @@ protected void initialize() { this.acceptLanguage = "en-US"; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; - this.classicAdministrators = new ClassicAdministratorsInner(restClient().retrofit(), this); this.permissions = new PermissionsInner(restClient().retrofit(), this); this.providerOperationsMetadatas = new ProviderOperationsMetadatasInner(restClient().retrofit(), this); this.roleAssignments = new RoleAssignmentsInner(restClient().retrofit(), this); this.roleDefinitions = new RoleDefinitionsInner(restClient().retrofit(), this); + this.classicAdministrators = new ClassicAdministratorsInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); } @@ -247,6 +247,6 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "AuthorizationManagementClient", "2015-07-01"); + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "AuthorizationManagementClient", "2015-07-01"); } } diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManager.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManager.java index 7db8bddf7dfd..2f96613e2d2d 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManager.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/AuthorizationManager.java @@ -16,11 +16,11 @@ import com.microsoft.azure.arm.resources.AzureConfigurable; import com.microsoft.azure.serializer.AzureJacksonAdapter; import com.microsoft.rest.RestClient; -import com.microsoft.azure.management.authorization.v2015_07_01.ClassicAdministrators; import com.microsoft.azure.management.authorization.v2015_07_01.Permissions; import com.microsoft.azure.management.authorization.v2015_07_01.ProviderOperationsMetadatas; import com.microsoft.azure.management.authorization.v2015_07_01.RoleAssignments; import com.microsoft.azure.management.authorization.v2015_07_01.RoleDefinitions; +import com.microsoft.azure.management.authorization.v2015_07_01.ClassicAdministrators; import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; import com.microsoft.azure.arm.resources.implementation.ManagerCore; @@ -28,11 +28,11 @@ * Entry point to Azure Authorization resource management. */ public final class AuthorizationManager extends ManagerCore { - private ClassicAdministrators classicAdministrators; private Permissions permissions; private ProviderOperationsMetadatas providerOperationsMetadatas; private RoleAssignments roleAssignments; private RoleDefinitions roleDefinitions; + private ClassicAdministrators classicAdministrators; /** * Get a Configurable instance that can be used to create AuthorizationManager with optional configuration. * @@ -80,16 +80,6 @@ public interface Configurable extends AzureConfigurable { AuthorizationManager authenticate(AzureTokenCredentials credentials, String subscriptionId); } - /** - * @return Entry point to manage ClassicAdministrators. - */ - public ClassicAdministrators classicAdministrators() { - if (this.classicAdministrators == null) { - this.classicAdministrators = new ClassicAdministratorsImpl(this); - } - return this.classicAdministrators; - } - /** * @return Entry point to manage Permissions. */ @@ -130,6 +120,16 @@ public RoleDefinitions roleDefinitions() { return this.roleDefinitions; } + /** + * @return Entry point to manage ClassicAdministrators. + */ + public ClassicAdministrators classicAdministrators() { + if (this.classicAdministrators == null) { + this.classicAdministrators = new ClassicAdministratorsImpl(this); + } + return this.classicAdministrators; + } + /** * The implementation for Configurable interface. */ diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorInner.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorInner.java index 960ce37b97c2..7f18e6610235 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorInner.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorInner.java @@ -40,7 +40,7 @@ public class ClassicAdministratorInner { private ClassicAdministratorProperties properties; /** - * Get the id value. + * Get the ID of the administrator. * * @return the id value */ @@ -49,7 +49,7 @@ public String id() { } /** - * Set the id value. + * Set the ID of the administrator. * * @param id the id value to set * @return the ClassicAdministratorInner object itself. @@ -60,7 +60,7 @@ public ClassicAdministratorInner withId(String id) { } /** - * Get the name value. + * Get the name of the administrator. * * @return the name value */ @@ -69,7 +69,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the administrator. * * @param name the name value to set * @return the ClassicAdministratorInner object itself. @@ -80,7 +80,7 @@ public ClassicAdministratorInner withName(String name) { } /** - * Get the type value. + * Get the type of the administrator. * * @return the type value */ @@ -89,7 +89,7 @@ public String type() { } /** - * Set the type value. + * Set the type of the administrator. * * @param type the type value to set * @return the ClassicAdministratorInner object itself. @@ -100,7 +100,7 @@ public ClassicAdministratorInner withType(String type) { } /** - * Get the properties value. + * Get properties for the classic administrator. * * @return the properties value */ @@ -109,7 +109,7 @@ public ClassicAdministratorProperties properties() { } /** - * Set the properties value. + * Set properties for the classic administrator. * * @param properties the properties value to set * @return the ClassicAdministratorInner object itself. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorsImpl.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorsImpl.java index a5b62e090fea..1875e44be030 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorsImpl.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ClassicAdministratorsImpl.java @@ -37,7 +37,8 @@ public Observable listAsync(final String apiVersion) { public Iterable call(Page page) { return page.items(); } - }) .map(new Func1() { + }) + .map(new Func1() { @Override public ClassicAdministrator call(ClassicAdministratorInner inner) { return new ClassicAdministratorImpl(inner, manager()); diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/PermissionInner.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/PermissionInner.java index e926a8876118..70d897f38dc6 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/PermissionInner.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/PermissionInner.java @@ -28,7 +28,7 @@ public class PermissionInner { private List notActions; /** - * Get the actions value. + * Get allowed actions. * * @return the actions value */ @@ -37,7 +37,7 @@ public List actions() { } /** - * Set the actions value. + * Set allowed actions. * * @param actions the actions value to set * @return the PermissionInner object itself. @@ -48,7 +48,7 @@ public PermissionInner withActions(List actions) { } /** - * Get the notActions value. + * Get denied actions. * * @return the notActions value */ @@ -57,7 +57,7 @@ public List notActions() { } /** - * Set the notActions value. + * Set denied actions. * * @param notActions the notActions value to set * @return the PermissionInner object itself. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/PermissionsImpl.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/PermissionsImpl.java index af0f288fac5c..99ca623ba097 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/PermissionsImpl.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/PermissionsImpl.java @@ -37,7 +37,8 @@ public Observable listForResourceAsync(final String resourceGroupNam public Iterable call(Page page) { return page.items(); } - }) .map(new Func1() { + }) + .map(new Func1() { @Override public Permission call(PermissionInner inner) { return new PermissionImpl(inner, manager()); @@ -54,7 +55,8 @@ public Observable listByResourceGroupAsync(final String resourceGrou public Iterable call(Page page) { return page.items(); } - }) .map(new Func1() { + }) + .map(new Func1() { @Override public Permission call(PermissionInner inner) { return new PermissionImpl(inner, manager()); diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ProviderOperationsMetadataInner.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ProviderOperationsMetadataInner.java index 30e3110e6115..bcf0a7c91218 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ProviderOperationsMetadataInner.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ProviderOperationsMetadataInner.java @@ -54,7 +54,7 @@ public class ProviderOperationsMetadataInner { private List operations; /** - * Get the id value. + * Get the provider id. * * @return the id value */ @@ -63,7 +63,7 @@ public String id() { } /** - * Set the id value. + * Set the provider id. * * @param id the id value to set * @return the ProviderOperationsMetadataInner object itself. @@ -74,7 +74,7 @@ public ProviderOperationsMetadataInner withId(String id) { } /** - * Get the name value. + * Get the provider name. * * @return the name value */ @@ -83,7 +83,7 @@ public String name() { } /** - * Set the name value. + * Set the provider name. * * @param name the name value to set * @return the ProviderOperationsMetadataInner object itself. @@ -94,7 +94,7 @@ public ProviderOperationsMetadataInner withName(String name) { } /** - * Get the type value. + * Get the provider type. * * @return the type value */ @@ -103,7 +103,7 @@ public String type() { } /** - * Set the type value. + * Set the provider type. * * @param type the type value to set * @return the ProviderOperationsMetadataInner object itself. @@ -114,7 +114,7 @@ public ProviderOperationsMetadataInner withType(String type) { } /** - * Get the displayName value. + * Get the provider display name. * * @return the displayName value */ @@ -123,7 +123,7 @@ public String displayName() { } /** - * Set the displayName value. + * Set the provider display name. * * @param displayName the displayName value to set * @return the ProviderOperationsMetadataInner object itself. @@ -134,7 +134,7 @@ public ProviderOperationsMetadataInner withDisplayName(String displayName) { } /** - * Get the resourceTypes value. + * Get the provider resource types. * * @return the resourceTypes value */ @@ -143,7 +143,7 @@ public List resourceTypes() { } /** - * Set the resourceTypes value. + * Set the provider resource types. * * @param resourceTypes the resourceTypes value to set * @return the ProviderOperationsMetadataInner object itself. @@ -154,7 +154,7 @@ public ProviderOperationsMetadataInner withResourceTypes(List reso } /** - * Get the operations value. + * Get the provider operations. * * @return the operations value */ @@ -163,7 +163,7 @@ public List operations() { } /** - * Set the operations value. + * Set the provider operations. * * @param operations the operations value to set * @return the ProviderOperationsMetadataInner object itself. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ProviderOperationsMetadatasImpl.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ProviderOperationsMetadatasImpl.java index 9ef4374e9326..6a5123cf61e0 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ProviderOperationsMetadatasImpl.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ProviderOperationsMetadatasImpl.java @@ -49,7 +49,8 @@ public Observable listAsync(final String apiVersion) public Iterable call(Page page) { return page.items(); } - }) .map(new Func1() { + }) + .map(new Func1() { @Override public ProviderOperationsMetadata call(ProviderOperationsMetadataInner inner) { return new ProviderOperationsMetadataImpl(inner, manager()); diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentImpl.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentImpl.java index 5054ca743196..1732a7c3279c 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentImpl.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentImpl.java @@ -11,12 +11,16 @@ import com.microsoft.azure.management.authorization.v2015_07_01.RoleAssignment; import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; import rx.Observable; +import com.microsoft.azure.management.authorization.v2015_07_01.RoleAssignmentProperties; import com.microsoft.azure.management.authorization.v2015_07_01.RoleAssignmentPropertiesWithScope; +import rx.functions.Func1; class RoleAssignmentImpl extends CreatableUpdatableImpl implements RoleAssignment, RoleAssignment.Definition, RoleAssignment.Update { private final AuthorizationManager manager; private String scope; private String roleAssignmentName; + private RoleAssignmentProperties cproperties; + private RoleAssignmentProperties uproperties; RoleAssignmentImpl(String name, AuthorizationManager manager) { super(name, new RoleAssignmentInner()); @@ -24,6 +28,8 @@ class RoleAssignmentImpl extends CreatableUpdatableImpl createResourceAsync() { RoleAssignmentsInner client = this.manager().inner().roleAssignments(); - return client.createAsync(this.scope, this.roleAssignmentName) + return client.createAsync(this.scope, this.roleAssignmentName, this.cproperties) + .map(new Func1() { + @Override + public RoleAssignmentInner call(RoleAssignmentInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) .map(innerToFluentMap(this)); } @Override public Observable updateResourceAsync() { RoleAssignmentsInner client = this.manager().inner().roleAssignments(); - return client.createAsync(this.scope, this.roleAssignmentName) + return client.createAsync(this.scope, this.roleAssignmentName, this.uproperties) + .map(new Func1() { + @Override + public RoleAssignmentInner call(RoleAssignmentInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) .map(innerToFluentMap(this)); } @@ -67,6 +89,10 @@ public boolean isInCreateMode() { return this.inner().id() == null; } + private void resetCreateUpdateParameters() { + this.cproperties = new RoleAssignmentProperties(); + this.uproperties = new RoleAssignmentProperties(); + } @Override public String id() { @@ -99,4 +125,14 @@ public RoleAssignmentImpl withScope(String scope) { return this; } + @Override + public RoleAssignmentImpl withProperties(RoleAssignmentProperties properties) { + if (isInCreateMode()) { + this.cproperties = properties; + } else { + this.uproperties = properties; + } + return this; + } + } diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentInner.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentInner.java index 0785899f77b8..d712b7c21511 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentInner.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentInner.java @@ -40,7 +40,7 @@ public class RoleAssignmentInner { private RoleAssignmentPropertiesWithScope properties; /** - * Get the id value. + * Get the role assignment ID. * * @return the id value */ @@ -49,7 +49,7 @@ public String id() { } /** - * Get the name value. + * Get the role assignment name. * * @return the name value */ @@ -58,7 +58,7 @@ public String name() { } /** - * Get the type value. + * Get the role assignment type. * * @return the type value */ @@ -67,7 +67,7 @@ public String type() { } /** - * Get the properties value. + * Get role assignment properties. * * @return the properties value */ @@ -76,7 +76,7 @@ public RoleAssignmentPropertiesWithScope properties() { } /** - * Set the properties value. + * Set role assignment properties. * * @param properties the properties value to set * @return the RoleAssignmentInner object itself. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsImpl.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsImpl.java index 5594ab890264..3542de7f8bb2 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsImpl.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsImpl.java @@ -11,11 +11,11 @@ import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.authorization.v2015_07_01.RoleAssignments; -import rx.Completable; import rx.functions.Func1; import rx.Observable; import com.microsoft.azure.Page; import com.microsoft.azure.management.authorization.v2015_07_01.RoleAssignment; +import com.microsoft.azure.management.authorization.v2015_07_01.RoleAssignmentProperties; class RoleAssignmentsImpl extends WrapperImpl implements RoleAssignments { private final AuthorizationManager manager; @@ -51,7 +51,8 @@ public Observable listForResourceAsync(final String resourceGrou public Iterable call(Page page) { return page.items(); } - }) .map(new Func1() { + }) + .map(new Func1() { @Override public RoleAssignment call(RoleAssignmentInner inner) { return new RoleAssignmentImpl(inner, manager()); @@ -60,9 +61,15 @@ public RoleAssignment call(RoleAssignmentInner inner) { } @Override - public Completable deleteAsync(String scope, String roleAssignmentName) { + public Observable deleteAsync(String scope, String roleAssignmentName) { RoleAssignmentsInner client = this.inner(); - return client.deleteAsync(scope, roleAssignmentName).toCompletable(); + return client.deleteAsync(scope, roleAssignmentName) + .map(new Func1() { + @Override + public RoleAssignment call(RoleAssignmentInner inner) { + return new RoleAssignmentImpl(inner, manager()); + } + }); } @Override @@ -78,15 +85,21 @@ public RoleAssignment call(RoleAssignmentInner inner) { } @Override - public Completable deleteByIdAsync(String roleAssignmentId) { + public Observable deleteByIdAsync(String roleAssignmentId) { RoleAssignmentsInner client = this.inner(); - return client.deleteByIdAsync(roleAssignmentId).toCompletable(); + return client.deleteByIdAsync(roleAssignmentId) + .map(new Func1() { + @Override + public RoleAssignment call(RoleAssignmentInner inner) { + return new RoleAssignmentImpl(inner, manager()); + } + }); } @Override - public Observable createByIdAsync(String roleAssignmentId) { + public Observable createByIdAsync(String roleAssignmentId, RoleAssignmentProperties properties) { RoleAssignmentsInner client = this.inner(); - return client.createByIdAsync(roleAssignmentId) + return client.createByIdAsync(roleAssignmentId, properties) .map(new Func1() { @Override public RoleAssignment call(RoleAssignmentInner inner) { @@ -116,7 +129,8 @@ public Observable listByResourceGroupAsync(final String resource public Iterable call(Page page) { return page.items(); } - }) .map(new Func1() { + }) + .map(new Func1() { @Override public RoleAssignment call(RoleAssignmentInner inner) { return new RoleAssignmentImpl(inner, manager()); @@ -133,7 +147,8 @@ public Observable listAsync() { public Iterable call(Page page) { return page.items(); } - }) .map(new Func1() { + }) + .map(new Func1() { @Override public RoleAssignment call(RoleAssignmentInner inner) { return new RoleAssignmentImpl(inner, manager()); @@ -150,7 +165,8 @@ public Observable listForScopeAsync(final String scope) { public Iterable call(Page page) { return page.items(); } - }) .map(new Func1() { + }) + .map(new Func1() { @Override public RoleAssignment call(RoleAssignmentInner inner) { return new RoleAssignmentImpl(inner, manager()); diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsInner.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsInner.java index 5262b3a53cfc..67a00ca66d68 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsInner.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsInner.java @@ -728,85 +728,6 @@ private ServiceResponse deleteDelegate(Response createAsync(String scope, String roleAssignmentName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createWithServiceResponseAsync(scope, roleAssignmentName), serviceCallback); - } - - /** - * Creates a role assignment. - * - * @param scope The scope of the role assignment to create. The scope can be any REST resource instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource. - * @param roleAssignmentName The name of the role assignment to create. It can be any valid GUID. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RoleAssignmentInner object - */ - public Observable createAsync(String scope, String roleAssignmentName) { - return createWithServiceResponseAsync(scope, roleAssignmentName).map(new Func1, RoleAssignmentInner>() { - @Override - public RoleAssignmentInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a role assignment. - * - * @param scope The scope of the role assignment to create. The scope can be any REST resource instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource. - * @param roleAssignmentName The name of the role assignment to create. It can be any valid GUID. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RoleAssignmentInner object - */ - public Observable> createWithServiceResponseAsync(String scope, String roleAssignmentName) { - if (scope == null) { - throw new IllegalArgumentException("Parameter scope is required and cannot be null."); - } - if (roleAssignmentName == null) { - throw new IllegalArgumentException("Parameter roleAssignmentName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final RoleAssignmentProperties properties = null; - RoleAssignmentCreateParameters parameters = new RoleAssignmentCreateParameters(); - parameters.withProperties(null); - return service.create(scope, roleAssignmentName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - /** * Creates a role assignment. * @@ -873,6 +794,9 @@ public Observable> createWithServiceRespons if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } Validator.validate(properties); RoleAssignmentCreateParameters parameters = new RoleAssignmentCreateParameters(); parameters.withProperties(properties); @@ -1056,78 +980,6 @@ private ServiceResponse deleteByIdDelegate(Response createByIdAsync(String roleAssignmentId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createByIdWithServiceResponseAsync(roleAssignmentId), serviceCallback); - } - - /** - * Creates a role assignment by ID. - * - * @param roleAssignmentId The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RoleAssignmentInner object - */ - public Observable createByIdAsync(String roleAssignmentId) { - return createByIdWithServiceResponseAsync(roleAssignmentId).map(new Func1, RoleAssignmentInner>() { - @Override - public RoleAssignmentInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates a role assignment by ID. - * - * @param roleAssignmentId The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RoleAssignmentInner object - */ - public Observable> createByIdWithServiceResponseAsync(String roleAssignmentId) { - if (roleAssignmentId == null) { - throw new IllegalArgumentException("Parameter roleAssignmentId is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final RoleAssignmentProperties properties = null; - RoleAssignmentCreateParameters parameters = new RoleAssignmentCreateParameters(); - parameters.withProperties(null); - return service.createById(roleAssignmentId, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createByIdDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - /** * Creates a role assignment by ID. * @@ -1187,6 +1039,9 @@ public Observable> createByIdWithServiceRes if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } Validator.validate(properties); RoleAssignmentCreateParameters parameters = new RoleAssignmentCreateParameters(); parameters.withProperties(properties); diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionImpl.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionImpl.java index 8ccbb48b121e..ac4f77c3aafc 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionImpl.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionImpl.java @@ -13,10 +13,14 @@ import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; import rx.Observable; import com.microsoft.azure.management.authorization.v2015_07_01.RoleDefinitionProperties; +import java.util.List; +import rx.functions.Func1; class RoleDefinitionImpl extends CreatableUpdatableImpl implements RoleDefinition, RoleDefinition.Definition, RoleDefinition.Update { private String scope; private String roleDefinitionId; + private RoleDefinitionProperties cproperties; + private RoleDefinitionProperties uproperties; private final AuthorizationManager manager; RoleDefinitionImpl(String name, AuthorizationManager manager) { @@ -25,6 +29,8 @@ class RoleDefinitionImpl extends CreatableUpdatableImpl createResourceAsync() { RoleDefinitionsInner client = this.manager().inner().roleDefinitions(); - return client.createOrUpdateAsync(this.scope, this.roleDefinitionId) + return client.createOrUpdateAsync(this.scope, this.roleDefinitionId, this.cproperties) + .map(new Func1() { + @Override + public RoleDefinitionInner call(RoleDefinitionInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) .map(innerToFluentMap(this)); } @Override public Observable updateResourceAsync() { RoleDefinitionsInner client = this.manager().inner().roleDefinitions(); - return client.createOrUpdateAsync(this.scope, this.roleDefinitionId) + return client.createOrUpdateAsync(this.scope, this.roleDefinitionId, this.uproperties) + .map(new Func1() { + @Override + public RoleDefinitionInner call(RoleDefinitionInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) .map(innerToFluentMap(this)); } @@ -68,6 +90,10 @@ public boolean isInCreateMode() { return this.inner().id() == null; } + private void resetCreateUpdateParameters() { + this.cproperties = new RoleDefinitionProperties(); + this.uproperties = new RoleDefinitionProperties(); + } @Override public String id() { @@ -95,4 +121,14 @@ public RoleDefinitionImpl withScope(String scope) { return this; } + @Override + public RoleDefinitionImpl withProperties(RoleDefinitionProperties properties) { + if (isInCreateMode()) { + this.cproperties = properties; + } else { + this.uproperties = properties; + } + return this; + } + } diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionInner.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionInner.java index 9e9ebbd70bff..b9051b7e60a7 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionInner.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionInner.java @@ -40,7 +40,7 @@ public class RoleDefinitionInner { private RoleDefinitionProperties properties; /** - * Get the id value. + * Get the role definition ID. * * @return the id value */ @@ -49,7 +49,7 @@ public String id() { } /** - * Get the name value. + * Get the role definition name. * * @return the name value */ @@ -58,7 +58,7 @@ public String name() { } /** - * Get the type value. + * Get the role definition type. * * @return the type value */ @@ -67,7 +67,7 @@ public String type() { } /** - * Get the properties value. + * Get role definition properties. * * @return the properties value */ @@ -76,7 +76,7 @@ public RoleDefinitionProperties properties() { } /** - * Set the properties value. + * Set role definition properties. * * @param properties the properties value to set * @return the RoleDefinitionInner object itself. diff --git a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionsImpl.java b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionsImpl.java index 3e209b725f8d..9f870bb615ab 100644 --- a/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionsImpl.java +++ b/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleDefinitionsImpl.java @@ -11,7 +11,6 @@ import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.authorization.v2015_07_01.RoleDefinitions; -import rx.Completable; import rx.functions.Func1; import rx.Observable; import com.microsoft.azure.Page; @@ -43,9 +42,15 @@ private RoleDefinitionImpl wrapModel(String name) { } @Override - public Completable deleteAsync(String scope, String roleDefinitionId) { + public Observable deleteAsync(String scope, String roleDefinitionId) { RoleDefinitionsInner client = this.inner(); - return client.deleteAsync(scope, roleDefinitionId).toCompletable(); + return client.deleteAsync(scope, roleDefinitionId) + .map(new Func1() { + @Override + public RoleDefinition call(RoleDefinitionInner inner) { + return new RoleDefinitionImpl(inner, manager()); + } + }); } @Override @@ -81,7 +86,8 @@ public Observable listAsync(final String scope) { public Iterable call(Page page) { return page.items(); } - }) .map(new Func1() { + }) + .map(new Func1() { @Override public RoleDefinition call(RoleDefinitionInner inner) { return new RoleDefinitionImpl(inner, manager());