-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[NewRelic] SDK validation for TypeSpec swagger #53254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bfa73f6
16f8459
b3a275f
1c4ff06
2e981ed
780f924
9ae36c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,83 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||||||||||||||||||||||||||||||||||||||||||||||||
| // Licensed under the MIT License. | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| #nullable disable | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| using System.Collections.Generic; | ||||||||||||||||||||||||||||||||||||||||||||||||
| using System.ComponentModel; | ||||||||||||||||||||||||||||||||||||||||||||||||
| using Azure.Core; | ||||||||||||||||||||||||||||||||||||||||||||||||
| using Azure.ResourceManager.Models; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| namespace Azure.ResourceManager.NewRelicObservability.Models | ||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <summary> Model factory for models. </summary> | ||||||||||||||||||||||||||||||||||||||||||||||||
| public static partial class ArmNewRelicObservabilityModelFactory | ||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <summary> Initializes a new instance of <see cref="NewRelicObservability.NewRelicMonitorResourceData"/>. </summary> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="id"> The id. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="name"> The name. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="resourceType"> The resourceType. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="systemData"> The systemData. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="tags"> The tags. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="location"> The location. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="identity"> The managed service identities assigned to this resource. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="provisioningState"> Provisioning State of the resource. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="monitoringStatus"> MonitoringStatus of the resource. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="marketplaceSubscriptionStatus"> NewRelic Organization properties of the resource. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="marketplaceSubscriptionId"> Marketplace Subscription Id. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="newRelicAccountProperties"> MarketplaceSubscriptionStatus of the resource. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="userInfo"> User Info. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="planData"> Plan details. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="liftrResourceCategory"> Liftr resource category. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="liftrResourcePreference"> Liftr resource preference. The priority of the resource. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="orgCreationSource"> Source of org creation. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="accountCreationSource"> Source of account creation. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="subscriptionState"> State of the Azure Subscription containing the monitor resource. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="saaSAzureSubscriptionStatus"> Status of Azure Subscription where Marketplace SaaS is located. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <returns> A new <see cref="NewRelicObservability.NewRelicMonitorResourceData"/> instance for mocking. </returns> | ||||||||||||||||||||||||||||||||||||||||||||||||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||||||||||||||||||||||||||||||||||||||||||||||||
| public static NewRelicMonitorResourceData NewRelicMonitorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, ManagedServiceIdentity identity = null, NewRelicProvisioningState? provisioningState = null, NewRelicObservabilityMonitoringStatus? monitoringStatus = null, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = null, string marketplaceSubscriptionId = null, NewRelicAccountProperties newRelicAccountProperties = null, NewRelicObservabilityUserInfo userInfo = null, NewRelicPlanDetails planData = null, NewRelicLiftrResourceCategory? liftrResourceCategory = null, int? liftrResourcePreference = null, NewRelicObservabilityOrgCreationSource? orgCreationSource = null, NewRelicObservabilityAccountCreationSource? accountCreationSource = null, string subscriptionState = null, string saaSAzureSubscriptionStatus = null) | ||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||
| return NewRelicMonitorResourceData(id, name, resourceType, systemData, tags, location, identity, provisioningState, monitoringStatus, marketplaceSubscriptionStatus, marketplaceSubscriptionId, newRelicAccountProperties, userInfo, planData, saaSResourceId: default, liftrResourceCategory, liftrResourcePreference, orgCreationSource, accountCreationSource); | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| /// <summary> Initializes a new instance of <see cref="T:Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData" />. </summary> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="id"> The id. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="name"> The name. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="resourceType"> The resourceType. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="systemData"> The systemData. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="tags"> The tags. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="location"> The location. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="identity"> The managed service identities assigned to this resource. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="provisioningState"> Provisioning State of the resource. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="monitoringStatus"> MonitoringStatus of the resource. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="marketplaceSubscriptionStatus"> NewRelic Organization properties of the resource. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="marketplaceSubscriptionId"> Marketplace Subscription Id. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="newRelicAccountProperties"> MarketplaceSubscriptionStatus of the resource. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="userInfo"> User Info. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="planData"> Plan details. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="liftrResourceCategory"> Liftr resource category. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="liftrResourcePreference"> Liftr resource preference. The priority of the resource. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="orgCreationSource"> Source of org creation. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <param name="accountCreationSource"> Source of account creation. </param> | ||||||||||||||||||||||||||||||||||||||||||||||||
| /// <returns> A new <see cref="T:Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData" /> instance for mocking. </returns> | ||||||||||||||||||||||||||||||||||||||||||||||||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||||||||||||||||||||||||||||||||||||||||||||||||
| public static NewRelicMonitorResourceData NewRelicMonitorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, ManagedServiceIdentity identity, NewRelicProvisioningState? provisioningState, NewRelicObservabilityMonitoringStatus? monitoringStatus, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, string marketplaceSubscriptionId, NewRelicAccountProperties newRelicAccountProperties, NewRelicObservabilityUserInfo userInfo, NewRelicPlanDetails planData, NewRelicLiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, NewRelicObservabilityOrgCreationSource? orgCreationSource, NewRelicObservabilityAccountCreationSource? accountCreationSource) | ||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||
| return NewRelicMonitorResourceData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, identity: identity, provisioningState: provisioningState, monitoringStatus: monitoringStatus, marketplaceSubscriptionStatus: marketplaceSubscriptionStatus, marketplaceSubscriptionId: marketplaceSubscriptionId, newRelicAccountProperties: newRelicAccountProperties, userInfo: userInfo, planData: planData, liftrResourceCategory: liftrResourceCategory, liftrResourcePreference: liftrResourcePreference, orgCreationSource: orgCreationSource, accountCreationSource: accountCreationSource, subscriptionState: default, saaSAzureSubscriptionStatus: default); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
| return NewRelicMonitorResourceData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, identity: identity, provisioningState: provisioningState, monitoringStatus: monitoringStatus, marketplaceSubscriptionStatus: marketplaceSubscriptionStatus, marketplaceSubscriptionId: marketplaceSubscriptionId, newRelicAccountProperties: newRelicAccountProperties, userInfo: userInfo, planData: planData, liftrResourceCategory: liftrResourceCategory, liftrResourcePreference: liftrResourcePreference, orgCreationSource: orgCreationSource, accountCreationSource: accountCreationSource, subscriptionState: default, saaSAzureSubscriptionStatus: default); | |
| return NewRelicMonitorResourceData( | |
| id: id, | |
| name: name, | |
| resourceType: resourceType, | |
| systemData: systemData, | |
| tags: tags, | |
| location: location, | |
| identity: identity, | |
| provisioningState: provisioningState, | |
| monitoringStatus: monitoringStatus, | |
| marketplaceSubscriptionStatus: marketplaceSubscriptionStatus, | |
| marketplaceSubscriptionId: marketplaceSubscriptionId, | |
| newRelicAccountProperties: newRelicAccountProperties, | |
| userInfo: userInfo, | |
| planData: planData, | |
| liftrResourceCategory: liftrResourceCategory, | |
| liftrResourcePreference: liftrResourcePreference, | |
| orgCreationSource: orgCreationSource, | |
| accountCreationSource: accountCreationSource, | |
| subscriptionState: default, | |
| saaSAzureSubscriptionStatus: default | |
| ); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| #nullable disable | ||
|
|
||
| namespace Azure.ResourceManager.NewRelicObservability.Models | ||
| { | ||
| // Add missing public parameterless constructor | ||
| public partial class NewRelicMonitoredSubscriptionInfo | ||
| { | ||
| /// <summary> Initializes a new instance of <see cref="NewRelicMonitoredSubscriptionInfo"/>. </summary> | ||
| public NewRelicMonitoredSubscriptionInfo() | ||
| { | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The method call is extremely long with many parameters. Consider breaking this into multiple lines with proper parameter alignment for better readability.