diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/api/Azure.ResourceManager.Authorization.netstandard2.0.cs b/sdk/authorization/Azure.ResourceManager.Authorization/api/Azure.ResourceManager.Authorization.netstandard2.0.cs index ed3fb94481bae..2b1f8838054dd 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/api/Azure.ResourceManager.Authorization.netstandard2.0.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/api/Azure.ResourceManager.Authorization.netstandard2.0.cs @@ -141,10 +141,14 @@ public partial class AuthorizationRoleDefinitionData : Azure.ResourceManager.Mod { public AuthorizationRoleDefinitionData() { } public System.Collections.Generic.IList AssignableScopes { get { throw null; } } + public string CreatedBy { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } public string Description { get { throw null; } set { } } public System.Collections.Generic.IList Permissions { get { throw null; } } public string RoleName { get { throw null; } set { } } public Azure.ResourceManager.Authorization.Models.AuthorizationRoleType? RoleType { get { throw null; } set { } } + public string UpdatedBy { get { throw null; } } + public System.DateTimeOffset? UpdatedOn { get { throw null; } } } public partial class AuthorizationRoleDefinitionResource : Azure.ResourceManager.ArmResource { @@ -176,6 +180,10 @@ protected DenyAssignmentCollection() { } public partial class DenyAssignmentData : Azure.ResourceManager.Models.ResourceData { internal DenyAssignmentData() { } + public string Condition { get { throw null; } } + public string ConditionVersion { get { throw null; } } + public string CreatedBy { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } public string DenyAssignmentName { get { throw null; } } public string Description { get { throw null; } } public System.Collections.Generic.IReadOnlyList ExcludePrincipals { get { throw null; } } @@ -184,6 +192,8 @@ internal DenyAssignmentData() { } public System.Collections.Generic.IReadOnlyList Permissions { get { throw null; } } public System.Collections.Generic.IReadOnlyList Principals { get { throw null; } } public string Scope { get { throw null; } } + public string UpdatedBy { get { throw null; } } + public System.DateTimeOffset? UpdatedOn { get { throw null; } } } public partial class DenyAssignmentResource : Azure.ResourceManager.ArmResource { diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationRoleDefinitionData.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationRoleDefinitionData.cs index 6f9a275066bcc..0849c2bc105a7 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationRoleDefinitionData.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationRoleDefinitionData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Authorization.Models; @@ -32,13 +33,21 @@ public AuthorizationRoleDefinitionData() /// The role type. /// Role definition permissions. /// Role definition assignable scopes. - internal AuthorizationRoleDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string roleName, string description, AuthorizationRoleType? roleType, IList permissions, IList assignableScopes) : base(id, name, resourceType, systemData) + /// Time it was created. + /// Time it was updated. + /// Id of the user who created the assignment. + /// Id of the user who updated the assignment. + internal AuthorizationRoleDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string roleName, string description, AuthorizationRoleType? roleType, IList permissions, IList assignableScopes, DateTimeOffset? createdOn, DateTimeOffset? updatedOn, string createdBy, string updatedBy) : base(id, name, resourceType, systemData) { RoleName = roleName; Description = description; RoleType = roleType; Permissions = permissions; AssignableScopes = assignableScopes; + CreatedOn = createdOn; + UpdatedOn = updatedOn; + CreatedBy = createdBy; + UpdatedBy = updatedBy; } /// The role name. @@ -51,5 +60,13 @@ internal AuthorizationRoleDefinitionData(ResourceIdentifier id, string name, Res public IList Permissions { get; } /// Role definition assignable scopes. public IList AssignableScopes { get; } + /// Time it was created. + public DateTimeOffset? CreatedOn { get; } + /// Time it was updated. + public DateTimeOffset? UpdatedOn { get; } + /// Id of the user who created the assignment. + public string CreatedBy { get; } + /// Id of the user who updated the assignment. + public string UpdatedBy { get; } } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/DenyAssignmentData.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/DenyAssignmentData.cs index e780ebf4826a9..c2f3fea26770e 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/DenyAssignmentData.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/DenyAssignmentData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Authorization.Models; @@ -36,7 +37,13 @@ internal DenyAssignmentData() /// Array of principals to which the deny assignment applies. /// Array of principals to which the deny assignment does not apply. /// Specifies whether this deny assignment was created by Azure and cannot be edited or deleted. - internal DenyAssignmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string denyAssignmentName, string description, IReadOnlyList permissions, string scope, bool? isAppliedToChildScopes, IReadOnlyList principals, IReadOnlyList excludePrincipals, bool? isSystemProtected) : base(id, name, resourceType, systemData) + /// The conditions on the deny assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'. + /// Version of the condition. + /// Time it was created. + /// Time it was updated. + /// Id of the user who created the assignment. + /// Id of the user who updated the assignment. + internal DenyAssignmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string denyAssignmentName, string description, IReadOnlyList permissions, string scope, bool? isAppliedToChildScopes, IReadOnlyList principals, IReadOnlyList excludePrincipals, bool? isSystemProtected, string condition, string conditionVersion, DateTimeOffset? createdOn, DateTimeOffset? updatedOn, string createdBy, string updatedBy) : base(id, name, resourceType, systemData) { DenyAssignmentName = denyAssignmentName; Description = description; @@ -46,6 +53,12 @@ internal DenyAssignmentData(ResourceIdentifier id, string name, ResourceType res Principals = principals; ExcludePrincipals = excludePrincipals; IsSystemProtected = isSystemProtected; + Condition = condition; + ConditionVersion = conditionVersion; + CreatedOn = createdOn; + UpdatedOn = updatedOn; + CreatedBy = createdBy; + UpdatedBy = updatedBy; } /// The display name of the deny assignment. @@ -64,5 +77,17 @@ internal DenyAssignmentData(ResourceIdentifier id, string name, ResourceType res public IReadOnlyList ExcludePrincipals { get; } /// Specifies whether this deny assignment was created by Azure and cannot be edited or deleted. public bool? IsSystemProtected { get; } + /// The conditions on the deny assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'. + public string Condition { get; } + /// Version of the condition. + public string ConditionVersion { get; } + /// Time it was created. + public DateTimeOffset? CreatedOn { get; } + /// Time it was updated. + public DateTimeOffset? UpdatedOn { get; } + /// Id of the user who created the assignment. + public string CreatedBy { get; } + /// Id of the user who updated the assignment. + public string UpdatedBy { get; } } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/AuthorizationRoleDefinitionData.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/AuthorizationRoleDefinitionData.Serialization.cs index 4174b1eb4eded..0fc5bc067f2c3 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/AuthorizationRoleDefinitionData.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/AuthorizationRoleDefinitionData.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -70,6 +71,10 @@ internal static AuthorizationRoleDefinitionData DeserializeAuthorizationRoleDefi Optional type0 = default; Optional> permissions = default; Optional> assignableScopes = default; + Optional createdOn = default; + Optional updatedOn = default; + Optional createdBy = default; + Optional updatedBy = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -156,11 +161,41 @@ internal static AuthorizationRoleDefinitionData DeserializeAuthorizationRoleDefi assignableScopes = array; continue; } + if (property0.NameEquals("createdOn"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("updatedOn"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + updatedOn = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("createdBy"u8)) + { + createdBy = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("updatedBy"u8)) + { + updatedBy = property0.Value.GetString(); + continue; + } } continue; } } - return new AuthorizationRoleDefinitionData(id, name, type, systemData.Value, roleName.Value, description.Value, Optional.ToNullable(type0), Optional.ToList(permissions), Optional.ToList(assignableScopes)); + return new AuthorizationRoleDefinitionData(id, name, type, systemData.Value, roleName.Value, description.Value, Optional.ToNullable(type0), Optional.ToList(permissions), Optional.ToList(assignableScopes), Optional.ToNullable(createdOn), Optional.ToNullable(updatedOn), createdBy.Value, updatedBy.Value); } } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/DenyAssignmentData.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/DenyAssignmentData.Serialization.cs index 578cf9fc71042..8f3dedcf3d0df 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/DenyAssignmentData.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/Models/DenyAssignmentData.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -29,6 +30,12 @@ internal static DenyAssignmentData DeserializeDenyAssignmentData(JsonElement ele Optional> principals = default; Optional> excludePrincipals = default; Optional isSystemProtected = default; + Optional condition = default; + Optional conditionVersion = default; + Optional createdOn = default; + Optional updatedOn = default; + Optional createdBy = default; + Optional updatedBy = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -145,11 +152,51 @@ internal static DenyAssignmentData DeserializeDenyAssignmentData(JsonElement ele isSystemProtected = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("condition"u8)) + { + condition = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("conditionVersion"u8)) + { + conditionVersion = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("createdOn"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("updatedOn"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + updatedOn = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("createdBy"u8)) + { + createdBy = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("updatedBy"u8)) + { + updatedBy = property0.Value.GetString(); + continue; + } } continue; } } - return new DenyAssignmentData(id, name, type, systemData.Value, denyAssignmentName.Value, description.Value, Optional.ToList(permissions), scope.Value, Optional.ToNullable(doNotApplyToChildScopes), Optional.ToList(principals), Optional.ToList(excludePrincipals), Optional.ToNullable(isSystemProtected)); + return new DenyAssignmentData(id, name, type, systemData.Value, denyAssignmentName.Value, description.Value, Optional.ToList(permissions), scope.Value, Optional.ToNullable(doNotApplyToChildScopes), Optional.ToList(principals), Optional.ToList(excludePrincipals), Optional.ToNullable(isSystemProtected), condition.Value, conditionVersion.Value, Optional.ToNullable(createdOn), Optional.ToNullable(updatedOn), createdBy.Value, updatedBy.Value); } } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/autorest.md b/sdk/authorization/Azure.ResourceManager.Authorization/src/autorest.md index fe85c59a3d644..70fb1b44b5603 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/autorest.md +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/autorest.md @@ -9,7 +9,7 @@ generate-model-factory: false csharp: true library-name: Authorization namespace: Azure.ResourceManager.Authorization -require: https://github.com/Azure/azure-rest-api-specs/blob/a436672b07fb1fe276c203b086b3f0e0d0c4aa24/specification/authorization/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/authorization/resource-manager/readme.md tag: package-2022-04-01 output-folder: Generated/ clear-output-folder: true