Skip to content
Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/quota/Azure.ResourceManager.Quota/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "net",
"TagPrefix": "net/quota/Azure.ResourceManager.Quota",
"Tag": "net/quota/Azure.ResourceManager.Quota_b57234e5a7"
"Tag": "net/quota/Azure.ResourceManager.Quota_94121380a5"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System.Collections.Generic;
using System.Linq;

namespace Azure.ResourceManager.Quota.Models
{
public static partial class ArmQuotaModelFactory
{
/// <summary> Initializes a new instance of <see cref="Models.GroupQuotaDetails"/>. </summary>
/// <param name="resourceName"> The resource name, such as SKU name. </param>
/// <param name="limit"> The current Group Quota Limit at the parentId level. </param>
/// <param name="comment"> Any comment related to quota request. </param>
/// <param name="unit"> The usages units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in the request body of your PUT operation. </param>
/// <param name="value"> Resource name. </param>
/// <param name="localizedValue"> Resource display name. </param>
/// <param name="availableLimit"> The available Group Quota Limit at the MG level. This Group quota can be allocated to subscription(s). </param>
/// <param name="allocatedToSubscriptionsValue"> Quota allocated to subscriptions. </param>
/// <returns> A new <see cref="Models.GroupQuotaDetails"/> instance for mocking. </returns>
public static GroupQuotaDetails GroupQuotaDetails(string resourceName, long? limit, string comment, string unit, long? availableLimit = null, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Quota.Models.SubscriptionAllocatedQuota> allocatedToSubscriptionsValue = null, string value = null, string localizedValue = null)
Copy link

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter order in this method differs from the order used in the internal constructor call (lines 25-33). Consider reordering the parameters to match the constructor signature for better maintainability and to reduce confusion.

Suggested change
public static GroupQuotaDetails GroupQuotaDetails(string resourceName, long? limit, string comment, string unit, long? availableLimit = null, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Quota.Models.SubscriptionAllocatedQuota> allocatedToSubscriptionsValue = null, string value = null, string localizedValue = null)
public static GroupQuotaDetails GroupQuotaDetails(string resourceName, long? limit, string comment, string unit, string value = null, string localizedValue = null, long? availableLimit = null, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Quota.Models.SubscriptionAllocatedQuota> allocatedToSubscriptionsValue = null)

Copilot uses AI. Check for mistakes.
{
return GroupQuotaDetails(
resourceName,
limit,
comment,
unit,
value,
localizedValue,
availableLimit,
allocatedToSubscriptionsValue);
}

/// <summary> Initializes a new instance of <see cref="Models.GroupQuotaLimitProperties"/>. </summary>
/// <param name="resourceName"> The resource name, such as SKU name. </param>
/// <param name="limit"> The current Group Quota Limit at the parentId level. </param>
/// <param name="comment"> Any comment related to quota request. </param>
/// <param name="unit"> The usages units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in the request body of your PUT operation. </param>
/// <param name="value"> Resource name. </param>
/// <param name="localizedValue"> Resource display name. </param>
/// <param name="availableLimit"> The available Group Quota Limit at the MG level. This Group quota can be allocated to subscription(s). </param>
/// <param name="allocatedToSubscriptionsValue"> Quota allocated to subscriptions. </param>
/// <returns> A new <see cref="Models.GroupQuotaLimitProperties"/> instance for mocking. </returns>
public static GroupQuotaLimitProperties GroupQuotaLimitProperties(string resourceName, long? limit, string comment, string unit, long? availableLimit = null, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Quota.Models.SubscriptionAllocatedQuota> allocatedToSubscriptionsValue = null, string value = null, string localizedValue = null)
Copy link

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to GroupQuotaDetails, the parameter order in this method differs from the order used in the internal constructor call (lines 48-56). Consider reordering the parameters to match the constructor signature for consistency.

Suggested change
public static GroupQuotaLimitProperties GroupQuotaLimitProperties(string resourceName, long? limit, string comment, string unit, long? availableLimit = null, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Quota.Models.SubscriptionAllocatedQuota> allocatedToSubscriptionsValue = null, string value = null, string localizedValue = null)
public static GroupQuotaLimitProperties GroupQuotaLimitProperties(string resourceName, long? limit, string comment, string unit, string value = null, string localizedValue = null, long? availableLimit = null, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Quota.Models.SubscriptionAllocatedQuota> allocatedToSubscriptionsValue = null)

Copilot uses AI. Check for mistakes.
{
return GroupQuotaLimitProperties(
resourceName,
limit,
comment,
unit,
value,
localizedValue,
availableLimit,
allocatedToSubscriptionsValue);
}

// Add this custom code because its properties order changed, but the changed properties are all string, this actually replaces its generated overload.
/// <summary> Initializes a new instance of <see cref="Models.GroupQuotaRequestBase"/>. </summary>
/// <param name="limit"> The new quota limit for the subscription. The incremental quota will be allocated from pre-approved group quota. </param>
/// <param name="value"> Resource name. </param>
/// <param name="localizedValue"> Resource display name. </param>
/// <param name="region"> Location/Azure region for the quota requested for resource. </param>
/// <param name="comments"> GroupQuota Request comments and details for request. This is optional paramter to provide more details related to the requested resource. </param>
/// <returns> A new <see cref="Models.GroupQuotaRequestBase"/> instance for mocking. </returns>
public static GroupQuotaRequestBase GroupQuotaRequestBase(long? limit = default(long?), string region = null, string comments = null, string value = null, string localizedValue = null)
{
return new GroupQuotaRequestBase(
limit,
value,
localizedValue,
region,
comments,
serializedAdditionalRawData: null);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using Azure.Core;

namespace Azure.ResourceManager.Quota.Models
{
// This is a workaround for the code generator does not support to rename the type UnknownQuotaLimitJsonObject
[CodeGenType("UnknownQuotaLimitJsonObject")]
internal partial class UnknownLimitJsonObject
{
}
}
Loading
Loading